![]() |
NHS31xx SW API
|
The UCode-I2C module module allows the application to select certain behavior through the use diversity flags in the form of defines. Sensible defaults are chosen; to deviate, simply define the relevant flags and message ids in your application before including this module.
Macros | |
#define | UCODE_I2C_HW 1 |
#define | UCODE_I2C_BB 0 |
#define | UCODE_I2C_POWER_PIN 6 |
#define | UCODE_I2C_SLAVE_ADDRESS 0x51 |
#define | UCODE_PULLUP_COUNT 0 |
#define | UCODE_PULLUPS NULL |
#define | UCODE_EVENT_PRISTINE 1 |
#define UCODE_I2C_HW 1 |
Bus interface selection. This option is mutually exclusive with UCODE_I2C_BB: exactly one must be non-zero. When set to a non-zero value the I2C HW block will be used by this module for I2C communication.
#define UCODE_I2C_BB 0 |
Bus interface selection. This option is mutually exclusive with UCODE_I2C_HW: exactly one must be non-zero. When set to a non-zero value the i2cbbm module will be used by this module for I2C communication.
#define UCODE_I2C_POWER_PIN 6 |
The IOCON pin number that is used to power the Ucode-I2C. This pin on the NHS3100 is connected with the supply pin 4 (VDD) on the Ucode-I2C.
#define UCODE_I2C_SLAVE_ADDRESS 0x51 |
The 8-bit device select code for the Ucode-I2C must be 0b1010xxxy
, where xxx
can be modified via RF, and y
indicates Read/Write direction. This define sets the 7-bit I2C slave address of the Ucode-I2C and must therefore be in the range
This value is by default (right after production of the Ucode-I2C) 0x51
, but the value of the three LSBs (xxx
) can be changed via the RF interface.
#define UCODE_PULLUP_COUNT 0 |
The number of GPIO's that are used as pull-up for the I2C lines. Must match the length of UCODE_PULLUPS.
#define UCODE_PULLUPS NULL |
The GPIO's used as pull-up for the I2C lines. Refers to an array of type uint32_t with size UCODE_PULLUP_COUNT.
#define UCODE_EVENT_PRISTINE 1 |
Each event is represented by a single bit set and is application defined. The module only enforces the existence of one event that indicates the application is running and the tag is ready for use. This bit is set at first run or after reset by calling Ucode_Reset.