From 7d39f17684feb49ac8a0017902158f298696e37c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 2 Sep 2009 21:57:54 -0700 Subject: [PATCH] Make eeprom reads and writes across block boundary work Reading and writing across the block boundary was not stepping the eeprom position after the partial i/o operation at the end of the first block. This meant that the operation would re-use the end of the previous block, either re-reading or re-writing it. Signed-off-by: Keith Packard --- src/ao_ee.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ao_ee.c b/src/ao_ee.c index f299b925..9b6db234 100644 --- a/src/ao_ee.c +++ b/src/ao_ee.c @@ -271,6 +271,7 @@ ao_ee_write(uint32_t pos, uint8_t *buf, uint16_t len) __reentrant /* See how much is left */ buf += this_len; len -= this_len; + pos += this_len; } return 1; } @@ -306,6 +307,7 @@ ao_ee_read(uint32_t pos, uint8_t *buf, uint16_t len) __reentrant /* See how much is left */ buf += this_len; len -= this_len; + pos += this_len; } return 1; } -- 2.30.2