#include <pas-co2-pal-gpio.hpp>
◆ IntEvent_t
Enumerator |
---|
INT_FALLING_EDGE | Interrupt on falling edge
|
INT_RISING_EDGE | Interrupt on rising edge
|
◆ VLevel_t
Enumerator |
---|
GPIO_LOW | Level low
|
GPIO_HIGH | Level high
|
◆ VLogic_t
Enumerator |
---|
NEGATIVE | Negative logic. 0 on voltage level high, 1 on voltage low
|
POSITIVE | Positive logic. 1 on voltage level high, 0 on voltage low
|
◆ init()
virtual Error_t pasco2::GPIO::init |
( |
| ) |
|
|
pure virtual |
Initializes the GPIO.
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if error |
Implemented in GPIOIno.
◆ deinit()
virtual Error_t pasco2::GPIO::deinit |
( |
| ) |
|
|
pure virtual |
Deinitializes the GPIO.
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if error |
Implemented in GPIOIno.
◆ enableInt()
virtual Error_t pasco2::GPIO::enableInt |
( |
void(*)(void *) |
cback | ) |
|
|
pure virtual |
Enables the GPIO hardware interrupt.
- Parameters
-
[in] | *cback | Function pointer of the interrupt callback |
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if error |
Implemented in GPIOIno.
◆ disableInt()
virtual Error_t pasco2::GPIO::disableInt |
( |
| ) |
|
|
pure virtual |
Disables the GPIO hardware interrupt.
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if disable error |
Implemented in GPIOIno.
◆ intEvent()
Gets the latest interrupt event.
- Returns
- GPIO interrupt event
- Return values
-
INT_FALLING_EDGE | if falling edge event |
INT_RISING_EDGE | if rising edge event |
Implemented in GPIOIno.
◆ read()
Reads the GPIO voltage level.
- Returns
- GPIO voltage level
- Return values
-
GPIO_LOW | if voltage low |
GPIO_HIGH | if voltage high |
Implemented in GPIOIno.
◆ write()
Writes the GPIO output voltage level.
- Parameters
-
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if write error |
Implemented in GPIOIno.
◆ enable()
virtual Error_t pasco2::GPIO::enable |
( |
| ) |
|
|
pure virtual |
Enables the GPIO output according to the GPIO logic.
- Low if negative logic
- High if positive logic
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if error |
Implemented in GPIOIno.
◆ disable()
virtual Error_t pasco2::GPIO::disable |
( |
| ) |
|
|
pure virtual |
Disables the GPIO output according to the GPIO logic.
- Low if positive logic
- High if negative logic
- Returns
- PAS CO2 error code
- Return values
-
OK | if success |
INTF_ERROR | if error |
Implemented in GPIOIno.
The documentation for this class was generated from the following file: