Skip to content

Commit

Permalink
Merge pull request #72 from vpoulailleau/patch-2
Browse files Browse the repository at this point in the history
Add address generation in I²C write
  • Loading branch information
Bosch Sensortec authored Jun 9, 2019
2 parents adf3b40 + fce2a5a commit 9424d91
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
* |------------+---------------------|
* | I2C action | Data |
* |------------+---------------------|
* | Start | - |
* | Write | (reg_addr) |
* | Write | (reg_data[0]) |
* | Write | (....) |
* | Write | (reg_data[len - 1]) |
* | Stop | - |
* |------------+---------------------|
* |------------+----------------------|
* | I2C action | Data |
* |------------+----------------------|
* | Start | - |
* | Write | (reg_addr) |
* | Write | (reg_data[0]) |
* | Write | (reg_addr + 1) |
* | Write | (reg_data[1]) |
* | Write | (....) |
* | Write | (reg_addr + len - 1) |
* | Write | (reg_data[len - 1]) |
* | Stop | - |
* |------------+----------------------|
*/

return rslt;
Expand Down

0 comments on commit 9424d91

Please sign in to comment.