diff --git a/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.c b/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.c index 471075a58..fa5b7ce23 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.c +++ b/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.c @@ -257,6 +257,49 @@ const SPI_Config SPI_config[] = { */ +/* + * ============================= I2C Begin===================================== +*/ +/* Place into subsections to allow the TI linker to remove items properly */ +#if defined(__TI_COMPILER_VERSION__) +#pragma DATA_SECTION(I2C_config, ".const:I2C_config") +#pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs") +#endif + +/* Include drivers */ +#include + +/* I2C objects */ +I2CCC26XX_Object i2cCC26xxObjects[CC2650_MA_I2CCOUNT]; + +/* I2C configuration structure, describing which pins are to be used */ +const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_MA_I2CCOUNT] = { + { + .baseAddr = I2C0_BASE, + .powerMngrId = PowerCC26XX_PERIPH_I2C0, + .intNum = INT_I2C_IRQ, + .intPriority = ~0, + .swiPriority = 0, + .sdaPin = Board_I2C0_SDA0, + .sclPin = Board_I2C0_SCL0, + } +}; + +/* I2C configuration structure */ +const I2C_Config I2C_config[] = { + { + .fxnTablePtr = &I2CCC26XX_fxnTable, + .object = &i2cCC26xxObjects[0], + .hwAttrs = &i2cCC26xxHWAttrs[0] + }, + {NULL, NULL, NULL} +}; +/* + * ========================== I2C end ========================================= + */ + + + /* * ========================== Crypto begin ==================================== * NOTE: The Crypto implementation should be considered experimental diff --git a/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.h b/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.h index 79a03e020..c6af48695 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.h +++ b/simplelink/ble_sdk_2_02_02_25/src/boards/BOOSTXL_CC2650MA/BOOSTXL_CC2650MA.h @@ -232,6 +232,20 @@ typedef enum BOOSTXL_CC2650MA_SPIName { BOOSTXL_CC2650MA_SPICOUNT } BOOSTXL_CC2650MA_SPIName; +/* Generic I2C instance identifiers */ +#define Board_I2C CC2650_MA_I2C0 +/*! + * @def CC2650_LAUNCHXL_I2CName + * @brief Enum of I2C names on the CC2650 dev board + */ +typedef enum CC2650_MA_I2CName { + CC2650_MA_I2C0 = 0, + + CC2650_MA_I2CCOUNT +} CC2650_MA_I2CName; + + + /*! * @def BOOSTXL_CC2650MA_TRNGName * @brief Enum of TRNG names on the board