I2CCC26XX Hardware attributes. More...
#include <I2CCC26XX.h>
Data Fields | |
I2CBaseAddrType | baseAddr |
unsigned long | powerMngrId |
int | intNum |
uint8_t | intPriority |
I2C Peripheral's interrupt priority. More... | |
uint32_t | swiPriority |
I2C Swi priority. The higher the number, the higher the priority. The minimum is 0 and the maximum is 15 by default. The maximum can be reduced to save RAM by adding or modifying Swi.numPriorities in the kernel configuration file. More... | |
uint8_t | sdaPin |
uint8_t | sclPin |
I2CCC26XX Hardware attributes.
The baseAddr and intNum fields define the base address and the interrupt number of the I2C peripheral. These values are passed to driverlib APIs and therefore must be populated by driverlib macro definitions. These macros are found in the header files:
The powerMngrId is the Power driver resource ID for the I2C peripheral. These macros are defined in PowerCC26XX.h
intPriority is the I2C peripheral's interrupt priority, as defined by the TI-RTOS kernel. This value is passed unmodified to Hwi_create().
swiPriority is the priority of a TI-RTOS kernel Swi that the I2C driver creates to finalize I2C transfers. See the documentation for the ti.sysbios.knl.Swi module for a description of Swi priorities.
sdaPin and sclPin define the SDA and SCL pin mapping, respectively. These are typically defined with a macro in a header file, which maps to an IOID. For example, CC1350_LAUNCHXL.h defines BOARD_I2C0_SDA0 to be IOID_5.
A sample structure is shown below:
I2CBaseAddrType I2CCC26XX_HWAttrsV1::baseAddr |
I2C peripheral's base address
unsigned long I2CCC26XX_HWAttrsV1::powerMngrId |
I2C peripheral's Power driver ID
int I2CCC26XX_HWAttrsV1::intNum |
I2C peripheral's interrupt number
uint8_t I2CCC26XX_HWAttrsV1::intPriority |
I2C Peripheral's interrupt priority.
The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5).
(7 << 5) will apply the lowest priority.
(1 << 5) will apply the highest priority.
Setting the priority to 0 is not supported by this driver.
Hwi's with priority 0 ignore the Hwi dispatcher to support zero-latency interrupts, thus invalidating the critical sections in this driver.
uint32_t I2CCC26XX_HWAttrsV1::swiPriority |
I2C Swi priority. The higher the number, the higher the priority. The minimum is 0 and the maximum is 15 by default. The maximum can be reduced to save RAM by adding or modifying Swi.numPriorities in the kernel configuration file.
uint8_t I2CCC26XX_HWAttrsV1::sdaPin |
I2C SDA pin mapping
uint8_t I2CCC26XX_HWAttrsV1::sclPin |
I2C SCL pin mapping