diff options
author | Keith Packard <keithp@keithp.com> | 2011-10-07 09:53:09 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-10-07 09:54:32 -0600 |
commit | 258b75498916183ed250d3abb3282fe3d843e7a1 (patch) | |
tree | d71a42f289a8fb31caf40c51746a1c42d8886ba3 /src/drivers/ao_25lc1024.c | |
parent | 128bbfa150f88c09f7adde2434b7bf0b5a9ed556 (diff) |
altos: Write xdata versions of memory functions1.0.9.1
These are significantly smaller than the general pointer versions from
libc on the cc1111.
Signed-off-by: Keith Packard <keithp@keithp.com>
Conflicts:
src/Makefile.proto
src/cc1111/ao_adc.c
src/cc1111/ao_packet_master.c
src/core/ao.h
Fix up the new makefiles
Diffstat (limited to 'src/drivers/ao_25lc1024.c')
-rw-r--r-- | src/drivers/ao_25lc1024.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/ao_25lc1024.c b/src/drivers/ao_25lc1024.c index 738f8ce6..2d047a44 100644 --- a/src/drivers/ao_25lc1024.c +++ b/src/drivers/ao_25lc1024.c @@ -167,7 +167,7 @@ ao_storage_device_write(uint32_t pos, __xdata void *buf, uint16_t len) __reentra ao_ee_flush_internal(); ao_ee_block = block; } - memcpy(ao_ee_data + (uint16_t) (pos & 0xff), buf, len); + ao_xmemcpy(ao_ee_data + (uint16_t) (pos & 0xff), buf, len); ao_ee_block_dirty = 1; } ao_mutex_put(&ao_ee_mutex); return 1; @@ -181,7 +181,7 @@ ao_storage_device_read(uint32_t pos, __xdata void *buf, uint16_t len) __reentran /* Transfer the data */ ao_mutex_get(&ao_ee_mutex); { ao_ee_fill(block); - memcpy(buf, ao_ee_data + (uint16_t) (pos & 0xff), len); + ao_xmemcpy(buf, ao_ee_data + (uint16_t) (pos & 0xff), len); } ao_mutex_put(&ao_ee_mutex); return 1; } @@ -200,7 +200,7 @@ ao_storage_erase(uint32_t pos) __reentrant ao_mutex_get(&ao_ee_mutex); { ao_ee_flush_internal(); ao_ee_block = (uint16_t) (pos >> EE_BLOCK_SHIFT); - memset(ao_ee_data, 0xff, EE_BLOCK_SIZE); + ao_xmemset(ao_ee_data, 0xff, EE_BLOCK_SIZE); ao_ee_block_dirty = 1; } ao_mutex_put(&ao_ee_mutex); return 1; |