EasyManua.ls Logo

Waveshare NRF52840 - Page 34

Waveshare NRF52840
72 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
NRF52840 Eval Kit User Manual
Vision: V1.0.1 Date: 2019.01.19 34 / 72
{
int8_t rslt = 0; /* Return 0 for Success, non-zero for failure
*/
/*
* The parameter dev_id can be used as a variable to store the
I2C address of the device
*/
/*
* Data on the bus should be like
* |------------+---------------------|
* | I2C action | Data |
* |------------+---------------------|
* | Start | - |
* | Write | (reg_addr) |
* | Stop | - |
* | Start | - |
* | Read | (reg_data[0]) |
* | Read | (....) |
* | Read | (reg_data[len - 1]) |
* | Stop | - |
* |------------+---------------------|
*/
return rslt;
}
int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t
*reg_data, uint16_t len)
{
int8_t rslt = 0; /* Return 0 for Success, non-zero for failure
*/
/*
* The parameter dev_id can be used as a variable to store the
I2C address of the device
*/
/*
* Data on the bus should be like
* |------------+---------------------|
* | I2C action | Data |
* |------------+---------------------|
* | Start | - |
* | Write | (reg_addr) |
* | Write | (reg_data[0]) |
* | Write | (....) |
* | Write | (reg_data[len - 1]) |
* | Stop | - |