swig: add gpio enum definitions on interface file
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
25
src/maa.i
25
src/maa.i
@@ -17,6 +17,31 @@ const char * maa_get_version();
|
||||
|
||||
#### GPIO ####
|
||||
|
||||
/**
|
||||
* GPIO Output modes
|
||||
*/
|
||||
typedef enum {
|
||||
MAA_GPIO_STRONG = 0, /**< Default. Strong high and low */
|
||||
MAA_GPIO_PULLUP = 1, /**< Resistive High */
|
||||
MAA_GPIO_PULLDOWN = 2, /**< Resistive Low */
|
||||
MAA_GPIO_HIZ = 3 /**< High Z State */
|
||||
} gpio_mode_t;
|
||||
|
||||
/**
|
||||
* GPIO Direction options.
|
||||
*/
|
||||
typedef enum {
|
||||
MAA_GPIO_OUT = 0, /**< Output. A Mode can also be set */
|
||||
MAA_GPIO_IN = 1 /**< Input. */
|
||||
} gpio_dir_t;
|
||||
|
||||
typedef enum {
|
||||
MAA_GPIO_EDGE_NONE = 0, /**< No interrupt on GPIO */
|
||||
MAA_GPIO_EDGE_BOTH = 1, /**< Interupt on rising & falling */
|
||||
MAA_GPIO_EDGE_RISING = 2, /**< Interupt on rising only */
|
||||
MAA_GPIO_EDGE_FALLING = 3 /**< Interupt on falling only */
|
||||
} gpio_edge_t;
|
||||
|
||||
%include "gpio.hpp"
|
||||
|
||||
#### i2c ####
|
||||
|
||||
Reference in New Issue
Block a user