summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-09-02 21:57:54 -0700
committerKeith Packard <keithp@keithp.com>2009-09-02 21:57:54 -0700
commit7d39f17684feb49ac8a0017902158f298696e37c (patch)
tree62a0ca3b0e9ab25fa750ebcb6892538f5934fa82 /src
parent6358041f846ba9a20fa650c367d907dc4336e54c (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/ao_ee.c2
1 files changed, 2 insertions, 0 deletions
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;
}