Export (0) Print
Expand All

Cpu.Pin Enumeration

Indentifies the General Purpose Input/Output (GPIO) pins.

Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

public enum Cpu.Pin

 Member nameDescription
GPIO_NONEIndicates that no GPIO pin is specified.
GPIO_Pin0Specifies GPIO pin 0.
GPIO_Pin1Specifies GPIO pin 1.
GPIO_Pin2Specifies GPIO pin 2.
GPIO_Pin3Specifies GPIO pin 3.
GPIO_Pin4Specifies GPIO pin 4.
GPIO_Pin5Specifies GPIO pin 5.
GPIO_Pin6Specifies GPIO pin 6.
GPIO_Pin7Specifies GPIO pin 7.
GPIO_Pin8Specifies GPIO pin 8.
GPIO_Pin9Specifies GPIO pin 9.
GPIO_Pin10Specifies GPIO pin 10.
GPIO_Pin11Specifies GPIO pin 11.
GPIO_Pin12Specifies GPIO pin 12.
GPIO_Pin13Specifies GPIO pin 13.
GPIO_Pin14Specifies GPIO pin 14.
GPIO_Pin15Specifies GPIO pin 15.

Because pin assignments are implementation-specific, this enumeration defines only constant for the first 16 pins and well as GPIO_NONE. When the SDK is ported to a specific hardware platform, it is expected that those who do the port will use this enumeration as the basis of an enumerated type for that platform that defines the GPIO pin assignments. Doing so will enable the platform-specific enumeration to be cast to the type Cpu.Pin. In this way, all SDK methods maintain type safety while still enabling full portability.

To use the correct pin definitions, you probably need to include a using statement in your code. For example, an application that uses the sample Freescale implementation would require the following statement in its .cs files:

using Microsoft.SPOT.Hardware.FreescaleMXSDemo;

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

Community Additions

ADD
Show:
© 2014 Microsoft