diff --git a/docs/api_reference.md b/docs/api_reference.md deleted file mode 100644 index c0bddc3..0000000 --- a/docs/api_reference.md +++ /dev/null @@ -1,3 +0,0 @@ -# API Reference - -Coming soon... Need to hook this up to platyps. \ No newline at end of file diff --git a/docs/help/Get-GpioPin.md b/docs/help/Get-GpioPin.md new file mode 100644 index 0000000..f2dcd06 --- /dev/null +++ b/docs/help/Get-GpioPin.md @@ -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] ] [[-PullMode] ] [-Raw] [] +``` + +## 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) diff --git a/docs/help/Get-I2CDevice.md b/docs/help/Get-I2CDevice.md new file mode 100644 index 0000000..585f535 --- /dev/null +++ b/docs/help/Get-I2CDevice.md @@ -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] [[-FriendlyName] ] [] +``` + +## 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 diff --git a/docs/help/Get-I2CRegister.md b/docs/help/Get-I2CRegister.md new file mode 100644 index 0000000..29830a8 --- /dev/null +++ b/docs/help/Get-I2CRegister.md @@ -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] [-Register] [[-ByteCount] ] [-Raw] + [] +``` + +## 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 diff --git a/docs/help/Microsoft.PowerShell.IoT.md b/docs/help/Microsoft.PowerShell.IoT.md new file mode 100644 index 0000000..0e3da47 --- /dev/null +++ b/docs/help/Microsoft.PowerShell.IoT.md @@ -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**. diff --git a/docs/help/Send-SPIData.md b/docs/help/Send-SPIData.md new file mode 100644 index 0000000..5b26b4e --- /dev/null +++ b/docs/help/Send-SPIData.md @@ -0,0 +1,120 @@ +--- +external help file: Microsoft.PowerShell.IoT.dll-Help.xml +Module Name: Microsoft.PowerShell.IoT +online version: +schema: 2.0.0 +--- + +# Send-SPIData + +## SYNOPSIS +Sends data on an Serial Peripheral Interface (SPI) channel. + +## SYNTAX + +``` +Send-SPIData [-Data] [[-Channel] ] [[-Frequency] ] [-Raw] [] +``` + +## DESCRIPTION + +Sends data on an Serial Peripheral Interface (SPI) channel. + +## EXAMPLES + +### Example 1 + +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Channel + +The channel number to be written to. + +```yaml +Type: UInt32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Data + +The data to be written to the channel. + +```yaml +Type: Byte[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Frequency + +The frequency in Hertz that is used to send data on the channel. + +```yaml +Type: UInt32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Raw + +Return the result code of the write operation rather than a full **SPIData** object. + +```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.Byte[] + +### System.UInt32 + +### System.Management.Automation.SwitchParameter + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS diff --git a/docs/help/Set-GpioPin.md b/docs/help/Set-GpioPin.md new file mode 100644 index 0000000..a648b5a --- /dev/null +++ b/docs/help/Set-GpioPin.md @@ -0,0 +1,113 @@ +--- +external help file: Microsoft.PowerShell.IoT.dll-Help.xml +Module Name: Microsoft.PowerShell.IoT +online version: +schema: 2.0.0 +--- + +# Set-GpioPin + +## SYNOPSIS +Writes a value to a GPIO pin. + +## SYNTAX + +``` +Set-GpioPin [-Id] [-Value] [-PassThru] [] +``` + +## DESCRIPTION + +Writes a value to a GPIO pin. + +## EXAMPLES + +### Example 1 - Write a value to a GPIO pin + +This example writes the value of a variable to GPIO pin 2. + +```powershell +Set-GpioPin -Id 2 -Value $value +``` + +### Example 2 - Set a GPIO pin state to **Low** + +This example sets the state of GPIO pin 0 to **Low**. + +```powershell +Set-GpioPin -Id 0 -Value "Low" +``` + +## PARAMETERS + +### -Id + +The ID number of the pin to be written. + +```yaml +Type: Int32[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PassThru + +Normally this cmdlet does not return any output. When **PassThru** is used, the cmdlet returns a +**PinData** object showing the value that was set. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Value + +The value to set on the GPIO pin. + +```yaml +Type: SignalLevel +Parameter Sets: (All) +Aliases: +Accepted values: Low, High + +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 + +### System.Int32[] + +### Microsoft.PowerShell.IoT.SignalLevel + +### System.Management.Automation.SwitchParameter + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS diff --git a/docs/help/Set-I2CRegister.md b/docs/help/Set-I2CRegister.md new file mode 100644 index 0000000..014d1db --- /dev/null +++ b/docs/help/Set-I2CRegister.md @@ -0,0 +1,120 @@ +--- +external help file: Microsoft.PowerShell.IoT.dll-Help.xml +Module Name: Microsoft.PowerShell.IoT +online version: +schema: 2.0.0 +--- + +# Set-I2CRegister + +## SYNOPSIS +Writes a value to a register of an **I2CDevice**. + +## SYNTAX + +``` +Set-I2CRegister [-Device] [-Register] [-Data] [-PassThru] [] +``` + +## DESCRIPTION + +Writes a value to a register of an **I2CDevice**. + +## EXAMPLES + +### Example 1 + +```powershell +Set-I2CRegister -Device $Device -Register 0x00 -Data 0xF1 +``` + +## PARAMETERS + +### -Data + +The data to be written to the register. + +```yaml +Type: Byte[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Device + +An **I2CDevice** object to be written to. + +```yaml +Type: I2CDevice +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PassThru + +Normally this cmdlet does not return any output. When **PassThru** is used, the cmdlet returns a +**I2CDeviceRegisterData** object showing the value that was set. + +```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 written. + +```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