Save some DSEG space by marking cmd functions __reentrant
[fw/altos] / src / ao_ee.c
index f299b925c0274b70c46270de3c76da05aee23087..26cfb7fd4cb6a13451a20a529473d0213160c61b 100644 (file)
@@ -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;
 }
@@ -349,11 +351,11 @@ ao_ee_read_config(uint8_t *buf, uint16_t len) __reentrant
 }
 
 static void
-ee_dump(void)
+ee_dump(void) __reentrant
 {
-       __xdata uint8_t b;
-       __xdata uint16_t block;
-       __xdata uint8_t i;
+       uint8_t b;
+       uint16_t block;
+       uint8_t i;
 
        ao_cmd_hex();
        block = ao_cmd_lex_i;
@@ -375,13 +377,13 @@ ee_dump(void)
 }
 
 static void
-ee_store(void)
+ee_store(void) __reentrant
 {
-       __xdata uint16_t block;
-       __xdata uint8_t i;
-       __xdata uint16_t len;
-       __xdata uint8_t b;
-       __xdata uint32_t addr;
+       uint16_t block;
+       uint8_t i;
+       uint16_t len;
+       uint8_t b;
+       uint32_t addr;
 
        ao_cmd_hex();
        block = ao_cmd_lex_i;