diff options
Diffstat (limited to 'drivers/avr/i2c_master.c')
-rwxr-xr-x | drivers/avr/i2c_master.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c index a04e6570d..19bae33e9 100755 --- a/drivers/avr/i2c_master.c +++ b/drivers/avr/i2c_master.c | |||
@@ -179,6 +179,9 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 | |||
179 | status = i2c_write(regaddr, timeout); | 179 | status = i2c_write(regaddr, timeout); |
180 | if (status) return status; | 180 | if (status) return status; |
181 | 181 | ||
182 | status = i2c_stop(timeout); | ||
183 | if (status) return status; | ||
184 | |||
182 | status = i2c_start(devaddr | 0x01, timeout); | 185 | status = i2c_start(devaddr | 0x01, timeout); |
183 | if (status) return status; | 186 | if (status) return status; |
184 | 187 | ||
@@ -217,4 +220,4 @@ i2c_status_t i2c_stop(uint16_t timeout) | |||
217 | } | 220 | } |
218 | 221 | ||
219 | return I2C_STATUS_SUCCESS; | 222 | return I2C_STATUS_SUCCESS; |
220 | } \ No newline at end of file | 223 | } |