#include <hall-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()
Initializes the GPIO.
- Returns
- GPIO error code
- Return values
-
| OK | if success |
| INTF_ERROR | if initialization error |
Implemented in GPIOIno.
◆ deinit()
Deinitializes the GPIO.
- Returns
- GPIO error code
- Return values
-
| OK | if success |
| INTF_ERROR | if deinitialization error |
Implemented in GPIOIno.
◆ enableInt()
Enables the hardware interrupt.
- Parameters
-
| [in] | *ptr | HallSwith object pointer which holds the interrupt |
- Returns
- GPIO error code
- Return values
-
| OK | if success |
| INTF_ERROR | if initialization error |
Implemented in GPIOIno.
◆ disableInt()
Disables the hardware interrupt.
- Returns
- GPIO error code
- Return values
-
| OK | if success |
| INTF_ERROR | if disable error |
Implemented in GPIOIno.
◆ intEvent()
| virtual IntEvent_t HallSwitch::Hall_GPIO::intEvent |
( |
| ) |
|
|
pure virtual |
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()
| virtual VLevel_t HallSwitch::Hall_GPIO::read |
( |
| ) |
|
|
pure virtual |
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
- GPIO error code
- Return values
-
| OK | if success |
| INTF_ERROR | if write error |
Implemented in GPIOIno.
◆ enable()
Enables the GPIO output according to the GPIO logic.
- Low if negative
- High if positive
- Returns
- GPIO interrupt event
- Return values
-
| OK | if success |
| INTF_ERROR | if write error |
Implemented in GPIOIno.
◆ disable()
Disables the GPIO output according to the GPIO logic.
- Low if positive
- High if negative
- Returns
- GPIO error code
- Return values
-
| OK | if success |
| INTF_ERROR | if write error |
Implemented in GPIOIno.
The documentation for this class was generated from the following file: