mirror of
https://github.com/boschsensortec/BME280_SensorAPI.git
synced 2024-10-05 20:47:48 -04:00
Merge pull request #72 from vpoulailleau/patch-2
Add address generation in I²C write
This commit is contained in:
commit
9424d919df
23
README.md
23
README.md
@ -280,16 +280,19 @@ int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint1
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Data on the bus should be like
|
* Data on the bus should be like
|
||||||
* |------------+---------------------|
|
* |------------+----------------------|
|
||||||
* | I2C action | Data |
|
* | I2C action | Data |
|
||||||
* |------------+---------------------|
|
* |------------+----------------------|
|
||||||
* | Start | - |
|
* | Start | - |
|
||||||
* | Write | (reg_addr) |
|
* | Write | (reg_addr) |
|
||||||
* | Write | (reg_data[0]) |
|
* | Write | (reg_data[0]) |
|
||||||
* | Write | (....) |
|
* | Write | (reg_addr + 1) |
|
||||||
* | Write | (reg_data[len - 1]) |
|
* | Write | (reg_data[1]) |
|
||||||
* | Stop | - |
|
* | Write | (....) |
|
||||||
* |------------+---------------------|
|
* | Write | (reg_addr + len - 1) |
|
||||||
|
* | Write | (reg_data[len - 1]) |
|
||||||
|
* | Stop | - |
|
||||||
|
* |------------+----------------------|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return rslt;
|
return rslt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user