Skip to content

Commit 6f28494

Browse files
author
Andrew
authored
Merge pull request PowerShell#47 from sdwheeler/sdw-help
2 parents 1cc9c83 + 6be66f7 commit 6f28494

8 files changed

+698
-3
lines changed

docs/api_reference.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/help/Get-GpioPin.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
external help file: Microsoft.PowerShell.IoT.dll-Help.xml
3+
Module Name: Microsoft.PowerShell.IoT
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-GpioPin
9+
10+
## SYNOPSIS
11+
Reads data from a GPIO pin.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-GpioPin [[-Id] <Int32[]>] [[-PullMode] <PullMode>] [-Raw] [<CommonParameters>]
17+
```
18+
19+
## DESCRIPTION
20+
21+
Reads data from a GPIO pin.
22+
23+
## EXAMPLES
24+
25+
### Example 1 - Read raw data from a GPIO pin
26+
27+
```powershell
28+
$raw = Get-GpioPin -Id 5 -Raw
29+
```
30+
31+
## PARAMETERS
32+
33+
### -Id
34+
35+
The ID number of the pin to be read.
36+
37+
```yaml
38+
Type: Int32[]
39+
Parameter Sets: (All)
40+
Aliases:
41+
42+
Required: False
43+
Position: 0
44+
Default value: None
45+
Accept pipeline input: True (ByPropertyName, ByValue)
46+
Accept wildcard characters: False
47+
```
48+
49+
### -PullMode
50+
51+
Specifies the mode to use when reading the data. Possible values are: **Off**, **PullDown**,
52+
**PullUp**. Consult the documentation of your chipset to determine the requirements.
53+
54+
```yaml
55+
Type: PullMode
56+
Parameter Sets: (All)
57+
Aliases:
58+
Accepted values: Off, PullDown, PullUp
59+
60+
Required: False
61+
Position: 1
62+
Default value: None
63+
Accept pipeline input: True (ByPropertyName)
64+
Accept wildcard characters: False
65+
```
66+
67+
### -Raw
68+
69+
When this switch is used, the cmdlet only returns a pin state value of **High** or **Low**.
70+
71+
```yaml
72+
Type: SwitchParameter
73+
Parameter Sets: (All)
74+
Aliases:
75+
76+
Required: False
77+
Position: Named
78+
Default value: None
79+
Accept pipeline input: True (ByPropertyName)
80+
Accept wildcard characters: False
81+
```
82+
83+
### CommonParameters
84+
85+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
86+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
87+
-WarningAction, and -WarningVariable. For more information, see
88+
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
89+
90+
## INPUTS
91+
92+
### System.Int32[]
93+
94+
### System.Nullable`1[[Microsoft.PowerShell.IoT.PullMode, Microsoft.PowerShell.IoT, Version=0.1.1.0, Culture=neutral, PublicKeyToken=null]]
95+
96+
### System.Management.Automation.SwitchParameter
97+
98+
## OUTPUTS
99+
100+
### System.Object
101+
102+
## NOTES
103+
104+
## RELATED LINKS
105+
106+
[Set-GpioPin](Set-GpioPin.md)

docs/help/Get-I2CDevice.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
external help file: Microsoft.PowerShell.IoT.dll-Help.xml
3+
Module Name: Microsoft.PowerShell.IoT
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-I2CDevice
9+
10+
## SYNOPSIS
11+
Returns an **I2CDevice** object.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-I2CDevice [-Id] <Int32> [[-FriendlyName] <String>] [<CommonParameters>]
17+
```
18+
19+
## DESCRIPTION
20+
21+
Returns an **I2CDevice** object.}
22+
23+
## EXAMPLES
24+
25+
### Example 1 - Get an I2C device object
26+
27+
```powershell
28+
$Device = Get-I2CDevice -Id $Id -FriendlyName $FriendlyName
29+
```
30+
31+
## PARAMETERS
32+
33+
### -FriendlyName
34+
35+
The friendly name of the device.
36+
37+
```yaml
38+
Type: String
39+
Parameter Sets: (All)
40+
Aliases:
41+
42+
Required: False
43+
Position: 1
44+
Default value: None
45+
Accept pipeline input: True (ByPropertyName)
46+
Accept wildcard characters: False
47+
```
48+
49+
### -Id
50+
51+
The I2c address of the device.
52+
53+
```yaml
54+
Type: Int32
55+
Parameter Sets: (All)
56+
Aliases:
57+
58+
Required: True
59+
Position: 0
60+
Default value: None
61+
Accept pipeline input: True (ByPropertyName)
62+
Accept wildcard characters: False
63+
```
64+
65+
### CommonParameters
66+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
67+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
68+
-WarningAction, and -WarningVariable. For more information, see
69+
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
70+
71+
## INPUTS
72+
73+
### System.Int32
74+
75+
### System.String
76+
77+
## OUTPUTS
78+
79+
### System.Object
80+
81+
## NOTES
82+
83+
## RELATED LINKS

docs/help/Get-I2CRegister.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
external help file: Microsoft.PowerShell.IoT.dll-Help.xml
3+
Module Name: Microsoft.PowerShell.IoT
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-I2CRegister
9+
10+
## SYNOPSIS
11+
Reads the value of a register of an **I2CDevice**.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-I2CRegister [-Device] <I2CDevice> [-Register] <UInt16> [[-ByteCount] <Byte>] [-Raw]
17+
[<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
22+
Reads the value of a register of an **I2CDevice**.
23+
24+
## EXAMPLES
25+
26+
### Example 1 - Read the chip identifier from the register
27+
28+
```powershell
29+
$ChipId = Get-I2CRegister -Device $Device -Register 0xD0 -Raw
30+
```
31+
32+
## PARAMETERS
33+
34+
### -ByteCount
35+
36+
The number of bytes to be returned from the register.
37+
38+
```yaml
39+
Type: Byte
40+
Parameter Sets: (All)
41+
Aliases:
42+
43+
Required: False
44+
Position: 2
45+
Default value: None
46+
Accept pipeline input: True (ByPropertyName)
47+
Accept wildcard characters: False
48+
```
49+
50+
### -Device
51+
52+
An **I2CDevice** object to be read from.
53+
54+
```yaml
55+
Type: I2CDevice
56+
Parameter Sets: (All)
57+
Aliases:
58+
59+
Required: True
60+
Position: 0
61+
Default value: None
62+
Accept pipeline input: True (ByPropertyName, ByValue)
63+
Accept wildcard characters: False
64+
```
65+
66+
### -Raw
67+
68+
Returns only the value stored in the register rather than a **I2CDeviceRegisterData** object.
69+
70+
```yaml
71+
Type: SwitchParameter
72+
Parameter Sets: (All)
73+
Aliases:
74+
75+
Required: False
76+
Position: Named
77+
Default value: None
78+
Accept pipeline input: True (ByPropertyName)
79+
Accept wildcard characters: False
80+
```
81+
82+
### -Register
83+
84+
The address of the register to be read.
85+
86+
```yaml
87+
Type: UInt16
88+
Parameter Sets: (All)
89+
Aliases:
90+
91+
Required: True
92+
Position: 1
93+
Default value: None
94+
Accept pipeline input: True (ByPropertyName)
95+
Accept wildcard characters: False
96+
```
97+
98+
### CommonParameters
99+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
100+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
101+
-WarningAction, and -WarningVariable. For more information, see
102+
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
103+
104+
## INPUTS
105+
106+
### Microsoft.PowerShell.IoT.I2CDevice
107+
108+
### System.UInt16
109+
110+
### System.Byte
111+
112+
### System.Management.Automation.SwitchParameter
113+
114+
## OUTPUTS
115+
116+
### System.Object
117+
118+
## NOTES
119+
120+
## RELATED LINKS

docs/help/Microsoft.PowerShell.IoT.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
Module Name: Microsoft.PowerShell.IoT
3+
Module Guid: eb74e8da-9ae2-482a-a648-e96550fb8745
4+
Download Help Link: {{ Update Download Link }}
5+
Help Version: {{ Please enter version of help manually (X.X.X.X) format }}
6+
Locale: en-US
7+
---
8+
9+
# Microsoft.PowerShell.IoT Module
10+
11+
## Description
12+
13+
A PowerShell module for interacting with hardware sensors and devices using common protocols: GPIO,
14+
I2C & SPI.
15+
16+
> Note: PowerShell IoT is still in Preview
17+
18+
## Microsoft.PowerShell.IoT Cmdlets
19+
20+
### [Get-GpioPin](Get-GpioPin.md)
21+
Reads data from a GPIO pin.
22+
23+
### [Get-I2CDevice](Get-I2CDevice.md)
24+
Returns an **I2CDevice** object.
25+
26+
### [Get-I2CRegister](Get-I2CRegister.md)
27+
Reads the value of a register of an **I2CDevice**.
28+
29+
### [Send-SPIData](Send-SPIData.md)
30+
Sends data on an Serial Peripheral Interface (SPI) channel.
31+
32+
### [Set-GpioPin](Set-GpioPin.md)
33+
Writes a value to a GPIO pin.
34+
35+
### [Set-I2CRegister](Set-I2CRegister.md)
36+
Writes a value to a register of an **I2CDevice**.

0 commit comments

Comments
 (0)