OSDN Git Service
(root)
/
openi2cradio
/
OpenI2CRadio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c7dd19
)
[BUG][I2C_ROM] Fix unsave on i2c_eeprom_burst_write().
author
K.Ohta
<whatisthis.sowhat@gmail.com>
Mon, 26 Aug 2013 13:39:20 +0000
(22:39 +0900)
committer
K.Ohta
<whatisthis.sowhat@gmail.com>
Mon, 26 Aug 2013 13:39:20 +0000
(22:39 +0900)
i2c_eeprom.c
patch
|
blob
|
history
diff --git
a/i2c_eeprom.c
b/i2c_eeprom.c
index
9046628
..
559e2c2
100644
(file)
--- a/
i2c_eeprom.c
+++ b/
i2c_eeprom.c
@@
-151,11
+151,11
@@
unsigned char i2c_eeprom_burstwrite(unsigned char i2caddr, unsigned int addr, un
bb = I2C_ROM_PAGE_SIZE - (addr % I2C_ROM_PAGE_SIZE);
if(b <= bb) bb = b;
sts = i2c_eeprom_write_1block(i2caddr, addr, data, bb);
+ if(sts == 0) return 0;
b -= bb;
addr += bb;
data += bb;
}
- if(sts == 0) return 0;
while(b >= I2C_ROM_PAGE_SIZE){
sts = i2c_eeprom_write_1block(i2caddr, addr, data, I2C_ROM_PAGE_SIZE);