Private
Public Access
2
0

periphmraa: Create IndexLookup functions for GPIO, I2C, SPI, PWM

These lookups provide the MRAA index with the Pin/Bus name as input

Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Vineela Tummalapalli
2017-04-06 17:38:44 -07:00
committed by Noel Eck
parent 7bc069a8fd
commit 913eaf2440
5 changed files with 209 additions and 2 deletions

View File

@@ -339,6 +339,7 @@ typedef struct {
*/
typedef struct {
/*@{*/
char *name; /**< i2c bus name */
int bus_id; /**< ID as exposed in the system */
int scl; /**< i2c SCL */
int sda; /**< i2c SDA */
@@ -351,6 +352,7 @@ typedef struct {
*/
typedef struct {
/*@{*/
char *name; /**< spi bus name */
unsigned int bus_id; /**< The Bus ID as exposed to the system. */
unsigned int slave_s; /**< Slave select */
mraa_boolean_t three_wire; /**< Is the bus only a three wire system */
@@ -366,6 +368,7 @@ typedef struct {
*/
typedef struct {
/*@{*/
char *name; /**< uart name */
unsigned int index; /**< ID as exposed in the system */
int rx; /**< uart rx */
int tx; /**< uart tx */
@@ -378,6 +381,7 @@ typedef struct {
*/
typedef struct {
/*@{*/
char *name; /**< pwm device name */
unsigned int index; /**< ID as exposed in the system */
char* device_path; /**< To store "/dev/pwm" for example */
/*@}*/