Contain TWI/I^2C module with related structures and functions.
More...
|
nrfx_twim_t | m_twim = NRFX_TWIM_INSTANCE(0) |
|
bool | TMP117dataReady |
| Flag to signal data from TMP117 temmperature sensor is ready to be read. More...
|
|
bool | receiveTMP117 |
| Flag to signal waiting for data from TMP117 temmperature sensor is ready to be read. More...
|
|
uint8_t | cnt = 0 |
| Counter variable to count the number of received bytes over TWIM. More...
|
|
Contain TWI/I^2C module with related structures and functions.
◆ HALL_EFFECT
#define HALL_EFFECT (0x30) |
◆ ICM_MOTION
#define ICM_MOTION (0x68) |
◆ PIN_SCL
◆ PIN_SDA
◆ TMP117
◆ isTWIMbusy()
Check if Two Wire Interface Master (TWIM) module is in a busy state.
The module is busy while transmission is ongoing.
- Returns
- bool true if busy, false if not busy
◆ twim_Handler()
nrfx_twim_evt_handler_t twim_Handler |
( |
nrfx_twim_evt_t const * |
p_event, |
|
|
void * |
p_context |
|
) |
| |
Handler function for Two Wire Interface Master module.
- Parameters
-
[in] | p_event | Event type |
[in] | p_context | not used |
◆ TWIMInit()
Initialization Two Wire Interface Master (TWIM) module.
◆ TWIMrx()
receive one byte on Two Wire Interface Master (TWIM) module.
- Parameters
-
[in] | address | Sensor/module address |
[out] | p_data | pointer to where received data is stored |
◆ TWIMtx()
Transmit one byte on Two Wire Interface Master (TWIM) module.
- Parameters
-
[in] | address | Sensor/module address |
[in] | data | data to be transmitted, register address or configuration data |
◆ TWIMtxrx()
transmit byte, then receive byte on Two Wire Interface Master (TWIM) module.
- Parameters
-
[in] | address | Sensor/module address |
[in] | txMsg | data byte to be sent to sensor/module, register address or configuration data |
[out] | p_rxMsg | pointer to where received data is stored |
◆ TWIMtxtx()
transmit two bytes on Two Wire Interface Master (TWIM) module.
Typically used when configuring/storing data on sensor/module
- Parameters
-
[in] | address | Sensor/module address |
[in] | data1 | first byte to be sent to sensor/module, register address |
[out] | data2 | second byte to be sent to sensor/module, configuration data |
◆ cnt
Counter variable to count the number of received bytes over TWIM.
◆ m_twim
nrfx_twim_t m_twim = NRFX_TWIM_INSTANCE(0) |
◆ receiveTMP117
Flag to signal waiting for data from TMP117 temmperature sensor is ready to be read.
Flag to signal waiting for data from TMP117 temmperature sensor is ready to be read.
◆ TMP117dataReady
Flag to signal data from TMP117 temmperature sensor is ready to be read.
Flag to signal data from TMP117 temmperature sensor is ready to be read.