#include <LHGpioAPI.h>
◆ ~LHGpioAPI()
virtual oceandirect::api::LHGpioAPI::~LHGpioAPI |
( |
| ) |
|
|
virtualdefault |
◆ getNumberOfGPIO()
.getNumberOfGPIO Return the total number of GPIO pins.
- Parameters
-
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | see LHErrorCode. |
- Returns
- the total number of GPIO pins (input and output) or 0 on error.
◆ getOutputState()
.getOutputState Return the direction (input or output) of the pins.
- See also
- setOutputState()
- Parameters
-
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | see LHErrorCode. |
- Returns
- a value specifying the direction of the corresponding pin i.e. bit "n" determines the direction of the nth GPIO pin. A bit value of 0 specifes an input pin; a bit value of 1 specifies an output pin. A value of 0 will also be returned on error.
◆ getValue()
.getValue Return the value of the pins.
- See also
- setValue()
- Parameters
-
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | see LHErrorCode. |
- Returns
- the values of the corresponding pin i.e. bit "n" determines the value of the nth GPIO pin. A value of 0 will also be returned on error.
◆ setOutputState()
.setOutputState Set the direction (input or output) of the pins specified by the supplied bitmask.
- See also
- getOutputState()
- Parameters
-
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | see LHErrorCode. |
direction | the bits of this value determine the direction of the corresponding pin i.e. bit "n" determines the direction of the nth GPIO pin. A bit value of 0 specifes an input pin; a bit value of 1 specifies an output pin. |
bitmask | the bitmask determines which values of the direction parameter shall be used i.e. if the nth bit of the bitmask is 1 then the corresponding direction bit will be applied, if the bit is 0 the corresponding direction bit will not be applied. |
◆ setValue()
.setValue Set the value of the pins specified by the supplied bitmask.
- See also
- getValue()
- Parameters
-
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | see LHErrorCode. |
value | the bits of this value determine the value of the corresponding pin i.e. bit "n" determines the value of the nth GPIO pin. |
bitmask | the bitmask determines which bits of the value parameter shall be used i.e. if the nth bit of the bitmask is 1 then the corresponding value bit will be applied, if the bit is 0 the corresponding value bit will not be applied. |
The documentation for this class was generated from the following file: