Property | Type | Description | |
---|---|---|---|
PinPollFailed | PinPollFailEventHandler | ||
PinStateChanged | PinStateChangeEventHandler |
Method | Description | |
---|---|---|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.PCF.PCF8574GpioProvider. The Dispose method leaves the CyrusBuilt.MonoPi.IO.PCF.PCF8574GpioProvider in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.PCF.PCF8574GpioProvider so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.PCF.PCF8574GpioProvider was occupying. |
|
GetPinMode ( IPCF8574Pin pin ) : PinMode |
Gets the mode of the specified pin.
|
|
GetPinState ( IPCF8574Pin pin ) : PinState |
Gets the current state of the specified pin in the pin cache.
|
|
InterruptPoll ( ) : void |
Interrupts a poll cycle (if running).
|
|
PCF8574GpioProvider ( II2CBus device, |
Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574GpioProvider class with the I2C bus device that is the connection to the PCF8574, and the bus address of the device.
|
|
PCF8574GpioProvider ( |
Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574GpioProvider class with the bus address of the device. This overload assumes a Rev 2 or higher board and creates a default I2C connection instance.
|
|
Poll ( ) : void |
Polls the state of the all the pins once every ~50ms.
|
|
SetPinMode ( IPCF8574Pin pin, PinMode mode ) : void |
Sets the mode of the specified pin.
|
|
SetPinState ( IPCF8574Pin pin, PinState state ) : void |
Sets the state of the specified pin.
|
Method | Description | |
---|---|---|
OnPinPollFailed ( PinPollFailEventArgs e ) : void |
Raises the PinPollFailed event.
|
|
OnPinStateChanged ( PinStateChangeEventArgs e ) : void |
Raises the PinStateChanged event.
|
Method | Description | |
---|---|---|
BackgroundExecutePoll ( ) : void |
Executes the poll cycle on a background thread.
|
|
ExecutePoll ( ) : void |
Polls all the pins on the PCF8574 every ~50ms and refreshes their states. This will fire a state change event for any and all pins that have changed state since the last check. This will also fire a failure event if any exceptions are thrown.
|
public GetPinMode ( IPCF8574Pin pin ) : PinMode | ||
pin | IPCF8574Pin | /// A pin in the pin cache to get the mode from. /// |
return | PinMode |
public GetPinState ( IPCF8574Pin pin ) : PinState | ||
pin | IPCF8574Pin | /// The pin to get the state from. /// |
return | PinState |
protected OnPinPollFailed ( PinPollFailEventArgs e ) : void | ||
e | PinPollFailEventArgs | /// The event arguments. /// |
return | void |
protected OnPinStateChanged ( PinStateChangeEventArgs e ) : void | ||
e | PinStateChangeEventArgs | /// The event arguments. /// |
return | void |
public PCF8574GpioProvider ( II2CBus device, |
||
device | II2CBus | /// The I2C bus device that is the connection to the PCF8574. /// |
address | /// The bus address of the device. /// | |
return | System |
public PCF8574GpioProvider ( |
||
address | /// The bus address of the device. /// | |
return | System |
public SetPinMode ( IPCF8574Pin pin, PinMode mode ) : void | ||
pin | IPCF8574Pin | /// The pin to alter. /// |
mode | PinMode | /// The mode to set. /// |
return | void |
public SetPinState ( IPCF8574Pin pin, PinState state ) : void | ||
pin | IPCF8574Pin | /// The pin to alter. /// |
state | PinState | /// The state of the pin to set. /// |
return | void |
public PinPollFailEventHandler PinPollFailed | ||
return | PinPollFailEventHandler |