Skip to content

Commit

Permalink
write() then wait(ms+2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ligenxxxx committed Feb 6, 2024
1 parent 2285b3a commit d7e2e95
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ uint8_t I2C_Write8(uint8_t slave_addr, uint8_t reg_addr, uint8_t val) {
}

uint8_t I2C_Write8_Wait(uint16_t ms, uint8_t slave_addr, uint8_t reg_addr, uint8_t val) {
WAIT(ms);
// debugf("\r\nEEP:0x%04x, 0x%04x", reg_addr, (uint16_t)val);
return I2C_Write8(slave_addr, reg_addr, val);
uint8_t ret;
ret = I2C_Write8(slave_addr, reg_addr, val);
WAIT(ms + 2);
return
}

uint8_t I2C_Write16(uint8_t slave_addr, uint16_t reg_addr, uint16_t val) {
Expand Down

0 comments on commit d7e2e95

Please sign in to comment.