Private
Public Access
2
0

Merge branch 'pinmap'

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>

Conflicts:
	api/maa.h
	src/CMakeLists.txt
This commit is contained in:
Thomas Ingleby
2014-05-01 17:37:56 +01:00
14 changed files with 283 additions and 6 deletions

View File

@@ -48,10 +48,49 @@ typedef enum {
MAA_ERROR_INVALID_RESOURCE = 7, /**< Resource invalid */
MAA_ERROR_INVALID_QUEUE_TYPE = 8, /**< Queue type incorrect */
MAA_ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
MAA_ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
MAA_ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
MAA_ERROR_UNSPECIFIED = 99 /**< Unknown Error */
} maa_result_t;
typedef unsigned int maa_boolean_t;
typedef struct {
maa_boolean_t valid:1;
maa_boolean_t gpio:1;
maa_boolean_t pwm:1;
maa_boolean_t fast_gpio:1;
maa_boolean_t spi:1;
maa_boolean_t i2c:1;
}
maa_pincapabilities_t;
typedef struct {
unsigned int pin;
unsigned int value;
} maa_mux_t;
typedef struct {
char name[8];// do we need this
unsigned int pin;
int parent_id;
maa_pincapabilities_t capabilites;
maa_mux_t mux[4];
unsigned int mux_total;
} maa_pininfo_t;
typedef struct {
unsigned int gpio_count;
unsigned int aio_count;
unsigned int pwm_count;
maa_pininfo_t* pins;
} maa_board_t;
unsigned int maa_check_gpio(int pin);
//unsigned int maa_check_aio(int pin);
//unsigned int maa_check_pwm(int pin);
/** Get the version string of maa autogenerated from git tag
*
* The version returned may not be what is expected however it is a reliable