Private
Public Access
2
0

usb: Skeleton platform code for FTDI FT4222 USB to i2c bridge

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Henry Bruce
2015-05-27 15:36:46 -07:00
committed by Brendan Le Foll
parent 22a930e39e
commit 8f48df0533
15 changed files with 710 additions and 54 deletions

View File

@@ -29,6 +29,14 @@
#define MRAA_PLATFORM_NAME_MAX_SIZE 64
#define MRAA_PIN_NAME_SIZE 12
#define MRAA_SUB_PLATFORM_BIT_SHIFT 9
#define MRAA_SUB_PLATFORM_MASK (1<<MRAA_SUB_PLATFORM_BIT_SHIFT)
#define MRAA_IS_ON_SUB_PLATFORM(pin_or_bus) (((pin_or_bus)|MRAA_SUB_PLATFORM_MASK) != 0)
#define MRAA_USE_SUB_PLATFORM(pin_or_bus) ((pin_or_bus)|MRAA_SUB_PLATFORM_MASK)
#define MRAA_GET_SUB_PLATFORM_INDEX(pin_or_bus) ((pin_or_bus)&(~MRAA_SUB_PLATFORM_MASK))
/** @file
*
* This file defines the basic shared values for libmraa
@@ -176,6 +184,14 @@ int mraa_get_i2c_bus_id(unsigned int i2c_bus);
*/
char* mraa_get_pin_name(int pin);
/**
* Get default i2c bus, board must be initialised.
*
* @return int default i2c bus index
*/
int mraa_get_default_2c_bus();
#ifdef __cplusplus
}
#endif

View File

@@ -47,6 +47,9 @@ typedef enum {
MRAA_BANANA = 7, /**< Allwinner A20 based Banana Pi and Banana Pro */
MRAA_INTEL_NUC5 = 8, /**< The Intel 5th generations Broadwell NUCs */
// USB platform extenders start at 256
MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */
MRAA_UNKNOWN_PLATFORM =
99 /**< An unknown platform type, typically will load INTEL_GALILEO_GEN1 */
} mraa_platform_t;
@@ -231,6 +234,8 @@ typedef enum {
MRAA_UART_PARITY_SPACE = 4
} mraa_uart_parity_t;
#ifdef __cplusplus
}
#endif