Private
Public Access
2
0

C++: Change enum types to be shorter in C++

* This changes the swig interface so Python/Node APIs change slightly

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-19 09:49:30 +01:00
parent 5d9fc39ae9
commit 3731263752
7 changed files with 36 additions and 72 deletions

View File

@@ -17,30 +17,7 @@ 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;
#### GPIO ####
%include "gpio.hpp"