Class GPIOPAL
Defined in File hss-pal-gpio.hpp
Inheritance Relationships
Derived Type
public hss::GPIOIno
(Class GPIOIno)
Class Documentation
-
class GPIOPAL
GPIO abstract API.
Subclassed by hss::GPIOIno
Public Types
-
enum IntEvent_t
Interrupt event.
Values:
-
enumerator INT_FALLING_EDGE
Interrupt on falling edge
-
enumerator INT_RISING_EDGE
Interrupt on rising edge
-
enumerator INT_FALLING_EDGE
-
enum VLevel_t
Voltage level.
Values:
-
enumerator GPIO_LOW
Level low
-
enumerator GPIO_HIGH
Level high
-
enumerator GPIO_LOW
-
enum VLogic_t
Voltage logic.
Values:
-
enumerator NEGATIVE
Negative logic. 0 on voltage level high, 1 on voltage low
-
enumerator POSITIVE
Positive logic. 1 on voltage level high, 0 on voltage low
-
enumerator NEGATIVE
Public Functions
-
virtual Error_t init() = 0
Initializes the GPIO.
- Return values:
OK – If success
INIT_ERROR – If initialization error
- Returns:
High-side switch error code
-
virtual Error_t deinit() = 0
Deinitializes the GPIO.
- Return values:
OK – If success
INIT_ERROR – If deinitialization error
- Returns:
High-side switch error code
-
virtual VLevel_t read() = 0
Reads the GPIO voltage level.
- Return values:
GPIO_LOW – If voltage low
GPIO_HIGH – If voltage high
- Returns:
VLevel_t
-
virtual Error_t write(VLevel_t level) = 0
Writes the GPIO output voltage level.
- Parameters:
level – [in] Voltage level
- Return values:
OK – If success
WRITE_ERROR – If write error
- Returns:
High-side switch error code
-
virtual Error_t enable() = 0
Enables the GPIO output according to the GPIO logic.
Low if negative
High if positive
- Return values:
OK – If success
WRITE_ERROR – If write error
- Returns:
High-side switch error code
-
virtual Error_t disable() = 0
Disables the GPIO output according to the GPIO logic.
Low if positive
High if negative
- Return values:
OK – If success
WRITE_ERROR – If write error
- Returns:
High-side switch error code
-
enum IntEvent_t