Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Fixes PowerShell-Docs#5484 - add docs for cmdlets #47

Merged
merged 1 commit into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/api_reference.md

This file was deleted.

106 changes: 106 additions & 0 deletions docs/help/Get-GpioPin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
external help file: Microsoft.PowerShell.IoT.dll-Help.xml
Module Name: Microsoft.PowerShell.IoT
online version:
schema: 2.0.0
---

# Get-GpioPin

## SYNOPSIS
Reads data from a GPIO pin.

## SYNTAX

```
Get-GpioPin [[-Id] <Int32[]>] [[-PullMode] <PullMode>] [-Raw] [<CommonParameters>]
```

## DESCRIPTION

Reads data from a GPIO pin.

## EXAMPLES

### Example 1 - Read raw data from a GPIO pin

```powershell
$raw = Get-GpioPin -Id 5 -Raw
```

## PARAMETERS

### -Id

The ID number of the pin to be read.

```yaml
Type: Int32[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -PullMode

Specifies the mode to use when reading the data. Possible values are: **Off**, **PullDown**,
**PullUp**. Consult the documentation of your chipset to determine the requirements.

```yaml
Type: PullMode
Parameter Sets: (All)
Aliases:
Accepted values: Off, PullDown, PullUp

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Raw

When this switch is used, the cmdlet only returns a pin state value of **High** or **Low**.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.Int32[]

### System.Nullable`1[[Microsoft.PowerShell.IoT.PullMode, Microsoft.PowerShell.IoT, Version=0.1.1.0, Culture=neutral, PublicKeyToken=null]]

### System.Management.Automation.SwitchParameter

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

[Set-GpioPin](Set-GpioPin.md)
83 changes: 83 additions & 0 deletions docs/help/Get-I2CDevice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
external help file: Microsoft.PowerShell.IoT.dll-Help.xml
Module Name: Microsoft.PowerShell.IoT
online version:
schema: 2.0.0
---

# Get-I2CDevice

## SYNOPSIS
Returns an **I2CDevice** object.

## SYNTAX

```
Get-I2CDevice [-Id] <Int32> [[-FriendlyName] <String>] [<CommonParameters>]
```

## DESCRIPTION

Returns an **I2CDevice** object.}

## EXAMPLES

### Example 1 - Get an I2C device object

```powershell
$Device = Get-I2CDevice -Id $Id -FriendlyName $FriendlyName
```

## PARAMETERS

### -FriendlyName

The friendly name of the device.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Id

The I2c address of the device.

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.Int32

### System.String

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS
120 changes: 120 additions & 0 deletions docs/help/Get-I2CRegister.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
external help file: Microsoft.PowerShell.IoT.dll-Help.xml
Module Name: Microsoft.PowerShell.IoT
online version:
schema: 2.0.0
---

# Get-I2CRegister

## SYNOPSIS
Reads the value of a register of an **I2CDevice**.

## SYNTAX

```
Get-I2CRegister [-Device] <I2CDevice> [-Register] <UInt16> [[-ByteCount] <Byte>] [-Raw]
[<CommonParameters>]
```

## DESCRIPTION

Reads the value of a register of an **I2CDevice**.

## EXAMPLES

### Example 1 - Read the chip identifier from the register

```powershell
$ChipId = Get-I2CRegister -Device $Device -Register 0xD0 -Raw
```

## PARAMETERS

### -ByteCount

The number of bytes to be returned from the register.

```yaml
Type: Byte
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Device

An **I2CDevice** object to be read from.

```yaml
Type: I2CDevice
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -Raw

Returns only the value stored in the register rather than a **I2CDeviceRegisterData** object.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Register

The address of the register to be read.

```yaml
Type: UInt16
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### Microsoft.PowerShell.IoT.I2CDevice

### System.UInt16

### System.Byte

### System.Management.Automation.SwitchParameter

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS
36 changes: 36 additions & 0 deletions docs/help/Microsoft.PowerShell.IoT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
Module Name: Microsoft.PowerShell.IoT
Module Guid: eb74e8da-9ae2-482a-a648-e96550fb8745
Download Help Link: {{ Update Download Link }}
Help Version: {{ Please enter version of help manually (X.X.X.X) format }}
Locale: en-US
---

# Microsoft.PowerShell.IoT Module

## Description

A PowerShell module for interacting with hardware sensors and devices using common protocols: GPIO,
I2C & SPI.

> Note: PowerShell IoT is still in Preview

## Microsoft.PowerShell.IoT Cmdlets

### [Get-GpioPin](Get-GpioPin.md)
Reads data from a GPIO pin.

### [Get-I2CDevice](Get-I2CDevice.md)
Returns an **I2CDevice** object.

### [Get-I2CRegister](Get-I2CRegister.md)
Reads the value of a register of an **I2CDevice**.

### [Send-SPIData](Send-SPIData.md)
Sends data on an Serial Peripheral Interface (SPI) channel.

### [Set-GpioPin](Set-GpioPin.md)
Writes a value to a GPIO pin.

### [Set-I2CRegister](Set-I2CRegister.md)
Writes a value to a register of an **I2CDevice**.
Loading