|
virtual size_t | getNumberOfGPIO (lh_device_id_t deviceID, lh_error_code_t *errorCode) |
|
virtual lh_gpio_directions_t | getOutputState (lh_device_id_t deviceID, lh_error_code_t *errorCode) |
|
virtual lh_gpio_values_t | getValue (lh_device_id_t deviceID, lh_error_code_t *errorCode) |
|
virtual void | setOutputState (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_gpio_directions_t direction, lh_gpio_bitmask_t bitmask) |
|
virtual void | setValue (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_gpio_values_t value, lh_gpio_bitmask_t bitmask) |
|
◆ getNumberOfGPIO()
virtual size_t oceandirect::api::LHGpioAPI::getNumberOfGPIO |
( |
lh_device_id_t |
deviceID, |
|
|
lh_error_code_t * |
errorCode |
|
) |
| |
|
virtual |
.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()
virtual lh_gpio_directions_t oceandirect::api::LHGpioAPI::getOutputState |
( |
lh_device_id_t |
deviceID, |
|
|
lh_error_code_t * |
errorCode |
|
) |
| |
|
virtual |
.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()
virtual lh_gpio_values_t oceandirect::api::LHGpioAPI::getValue |
( |
lh_device_id_t |
deviceID, |
|
|
lh_error_code_t * |
errorCode |
|
) |
| |
|
virtual |
.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()
virtual void oceandirect::api::LHGpioAPI::setOutputState |
( |
lh_device_id_t |
deviceID, |
|
|
lh_error_code_t * |
errorCode, |
|
|
lh_gpio_directions_t |
direction, |
|
|
lh_gpio_bitmask_t |
bitmask |
|
) |
| |
|
virtual |
.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()
virtual void oceandirect::api::LHGpioAPI::setValue |
( |
lh_device_id_t |
deviceID, |
|
|
lh_error_code_t * |
errorCode, |
|
|
lh_gpio_values_t |
value, |
|
|
lh_gpio_bitmask_t |
bitmask |
|
) |
| |
|
virtual |
.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: