#include <GpioAPI.h>
|
| GpioAPI () |
|
virtual | ~GpioAPI ()=default |
|
virtual int | getNumberOfGPIO (long deviceID, int *errorCode) |
|
virtual uint32_t | getOutputAlternate (long deviceID, int *errorCode) |
|
virtual bool | getOutputAlternate (long deviceID, int *errorCode, int bit) |
|
virtual std::uint32_t | getOutputEnable (long deviceID, int *errorCode) |
|
virtual bool | getOutputEnable (long deviceID, int *errorCode, int bit) |
|
virtual uint32_t | getValue (long deviceID, int *errorCode) |
|
virtual bool | getValue (long deviceID, int *errorCode, int bit) |
|
virtual void | setOutputAlternate (long deviceID, int *errorCode, int bit, bool isAlternate) |
|
virtual void | setOutputAlternate (long deviceID, int *errorCode, uint32_t bitMask) |
|
virtual void | setOutputEnable (long deviceID, int *errorCode, std::uint32_t bitmask) |
|
virtual void | setOutputEnable (long deviceID, int *errorCode, std::uint32_t bitPosition, bool isOutput) |
|
virtual void | setValue (long deviceID, int *errorCode, std::uint32_t bitmask) |
|
virtual void | setValue (long deviceID, int *errorCode, std::uint32_t bitPosition, bool isHigh) |
|
◆ GpioAPI()
oceandirect::api::GpioAPI::GpioAPI |
( |
| ) |
|
◆ ~GpioAPI()
virtual oceandirect::api::GpioAPI::~GpioAPI |
( |
| ) |
|
|
virtualdefault |
◆ getInstance()
static GpioAPI * oceandirect::api::GpioAPI::getInstance |
( |
| ) |
|
|
static |
◆ getNumberOfGPIO()
virtual int oceandirect::api::GpioAPI::getNumberOfGPIO |
( |
long | deviceID, |
|
|
int * | errorCode ) |
|
virtual |
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
- Returns
- the number of GPIO pins provided by the device.
◆ getOutputAlternate() [1/2]
virtual uint32_t oceandirect::api::GpioAPI::getOutputAlternate |
( |
long | deviceID, |
|
|
int * | errorCode ) |
|
virtual |
Get the settings for alternate functionality on the GPIO pins. Not all spectrometers support this functionality.
- Deprecated
- This function is deprecated starting with release 2.1 and will be removed in the future release.
- Parameters
-
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
- Returns
- a bitmask with value 1 where the corresponding pin is set to alternate functionality, 0 otherwise (pin is a GPIO pin).
◆ getOutputAlternate() [2/2]
virtual bool oceandirect::api::GpioAPI::getOutputAlternate |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
int | bit ) |
|
virtual |
Get the setting for alternate functionality on the specified bit (pin). Not all spectrometers support this functionality.
- Deprecated
- This function is deprecated starting with release 2.1 and will be removed in the future release.
- Parameters
-
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | Which GPIO bit or pin to query. |
- Returns
- true if the pin is set to alternate functionality, false otherwise (pin is a GPIO pin).
◆ getOutputEnable() [1/2]
virtual std::uint32_t oceandirect::api::GpioAPI::getOutputEnable |
( |
long | deviceID, |
|
|
int * | errorCode ) |
|
virtual |
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
- Returns
- the bitmask specifying the direction of each GPIO pin.
◆ getOutputEnable() [2/2]
virtual bool oceandirect::api::GpioAPI::getOutputEnable |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
int | bit ) |
|
virtual |
Read bit direction on whether it's in or out.
- See also
- setOutputEnable()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to query. |
- Returns
- true if the pin is an output pin, false if the pin is an input pin.
◆ getValue() [1/2]
virtual uint32_t oceandirect::api::GpioAPI::getValue |
( |
long | deviceID, |
|
|
int * | errorCode ) |
|
virtual |
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
- Returns
- the bitmask specifying the logic level of each GPIO pin.
◆ getValue() [2/2]
virtual bool oceandirect::api::GpioAPI::getValue |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
int | bit ) |
|
virtual |
Read the bit value whether it's high or low.
- See also
- setValue()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to query. |
- Returns
- true if the specified pin is set to logic level hig, false if the specified pin is set to logic level low.
◆ setOutputAlternate() [1/2]
virtual void oceandirect::api::GpioAPI::setOutputAlternate |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
int | bit, |
|
|
bool | isAlternate ) |
|
virtual |
Set the alternate functionality for the specified pin (bit) number. Not all spectrometers support this functionality.
- Deprecated
- This function is deprecated starting with release 2.1 and will be removed in the future release.
- Parameters
-
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | Which GPIO bit or pin to set |
isAlternate | set true to enable the alternate functionality for the pin, false otherwise (pin is a GPIO pin). |
◆ setOutputAlternate() [2/2]
virtual void oceandirect::api::GpioAPI::setOutputAlternate |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
uint32_t | bitMask ) |
|
virtual |
Set the alternate functionality for the specified pins (bits). Not all spectrometers support this functionality.
- Deprecated
- This function is deprecated starting with release 2.1 and will be removed in the future release.
- Parameters
-
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bitMask | with bit set to 1 to set enable the alternate functionality, 0 otherwise (pin is a GPIO pin). |
◆ setOutputEnable() [1/2]
virtual void oceandirect::api::GpioAPI::setOutputEnable |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
std::uint32_t | bitmask ) |
|
virtual |
Set the direction (input/output) of the GPIO pins.
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bitmask | a bitmask specifying the pin directions i.e. the nth bit set to 1 sets the nth pin to output. |
◆ setOutputEnable() [2/2]
virtual void oceandirect::api::GpioAPI::setOutputEnable |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
std::uint32_t | bitPosition, |
|
|
bool | isOutput ) |
|
virtual |
Set the direction (input/output) of a specified GPIO pin.
- See also
- getOutputEnable()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to set. |
isOutput | set to true to make the pin output, false to make the pin input. |
◆ setValue() [1/2]
virtual void oceandirect::api::GpioAPI::setValue |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
std::uint32_t | bitmask ) |
|
virtual |
Set the logic value for all GPIO pins.
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bitmask | the bitmask specifying the logic level of each GPIO pin. |
◆ setValue() [2/2]
virtual void oceandirect::api::GpioAPI::setValue |
( |
long | deviceID, |
|
|
int * | errorCode, |
|
|
std::uint32_t | bitPosition, |
|
|
bool | isHigh ) |
|
virtual |
Set the logic value for a spcified pin.
- See also
- getValue()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to set. |
isHigh | set true to set the logic level high, set false to set the logic level low. |
◆ shutdown()
static void oceandirect::api::GpioAPI::shutdown |
( |
| ) |
|
|
static |
◆ instance
GpioAPI* oceandirect::api::GpioAPI::instance |
|
staticprotected |
The documentation for this class was generated from the following file: