Skip to content

Raspberry.IO.GeneralPurpose.GpioConnection

raspberry-sharp edited this page Oct 14, 2012 · 23 revisions

The GpioConnection class is used in conjunction with PinConfiguration in order to manage connection to a consistent set of pins (either input or output).

Please refer to PinConfiguration documentation for detailed information concerning configuration of GPIO pins.

Initializer

The following initializers may be used to create an instance of GpioConnection:

GpioConnection(params PinConfiguration[] pins);
GpioConnection(IEnumerable<PinConfiguration> pins);
GpioConnection(IConnectionDriver driver, params PinConfiguration[] pins);
GpioConnection(IConnectionDriver driver, IEnumerable<PinConfiguration> pins);
GpioConnection(bool open, params PinConfiguration[] pins);
GpioConnection(bool open, IEnumerable<PinConfiguration> pins);
GpioConnection(bool open, IConnectionDriver driver, params PinConfiguration[] pins);
GpioConnection(bool open, IConnectionDriver driver, IEnumerable<PinConfiguration> pins);

With:

  • pins: configurations of pins that must be allocated when connection is established.
  • driver: the driver that must be used. If omitted or set to null, a default driver is chosen, depending on .config file.
  • open: a boolean value indicating whether connection must be opened on initialization or not. Default is true.
Clone this wiki locally