#include <pas-co2-pal-gpio-ino.hpp>
◆ GPIOIno()
GPIOIno::GPIOIno |
( |
uint8_t |
pin, |
|
|
uint8_t |
mode, |
|
|
VLogic_t |
logic |
|
) |
| |
GPIO Ino constructor.
- Parameters
-
[in] | pin | Pin number |
[in] | mode | Arduino GPIO mode (INPUT, OUTPUT, INPUT_PULLUP) |
[in] | logic | Voltage logic |
◆ ~GPIOIno()
◆ init()
Initializes the Arduino GPIO.
- Returns
- PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ deinit()
Deinitializes the Arduino GPIO.
- Returns
- PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ enableInt()
Error_t GPIOIno::enableInt |
( |
void(*)(void *) |
cback | ) |
|
|
virtual |
Enables the Arduino GPIO interrupt.
- Parameters
-
[in] | *cback | Function pointer of the interrupt callback |
- Returns
- PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ disableInt()
Disables the Arduino GPIO interrupt.
- Returns
- PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ intEvent()
Gets the latest Arduino interrupt event.
- Returns
- GPIO interrupt event
- Return values
-
INT_FALLING_EDGE | if falling edge event |
INT_RISING_EDGE | if rising edge event |
Implements pasco2::GPIO.
◆ read()
Reads the Arduino GPIO voltage level.
- Returns
- GPIO voltage level
- Return values
-
GPIO_LOW | if voltage low |
GPIO_HIGH | if voltage high |
Implements pasco2::GPIO.
◆ write()
Writes the Arduino GPIO output voltage level.
- Parameters
-
- Returns
- PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ enable()
Enables the Arduino GPIO output according to the GPIO logic.
- Low if negative
- High if positive
- Returns
- PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ disable()
Disables the Arduino GPIO output according to the GPIO logic.
- Low if positive
- High if negative
- Returns
- GPIO error code
-
PAS CO2 error code
- Return values
-
Implements pasco2::GPIO.
◆ unusedPin
const uint8_t GPIOIno::unusedPin = 0xFFU |
|
static |
The documentation for this class was generated from the following files: