From 31f5a02654cbf172beed25f4c518dfb7be8c714e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 14 Sep 2012 16:56:04 -0700 Subject: altos: Need to use 16-bit counts for ao_xmem functions Trying to use 8-bit counts is a nice optimization which fails when the count is larger than 255, as is the case with clearing the flash block in the AT45 driver. This bug resulted in the inability to erase flights on TeleMetrum v1.0 boards. Signed-off-by: Keith Packard --- src/cc1111/ao_arch.h | 6 +++--- src/cc1111/ao_string.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/cc1111/ao_arch.h b/src/cc1111/ao_arch.h index a97515a7..7fdfad80 100644 --- a/src/cc1111/ao_arch.h +++ b/src/cc1111/ao_arch.h @@ -229,17 +229,17 @@ ao_button_clear(void) __critical; /* ao_string.c */ void -_ao_xmemcpy(__xdata void *dst, __xdata void *src, uint8_t count); +_ao_xmemcpy(__xdata void *dst, __xdata void *src, uint16_t count); #define ao_xmemcpy(d,s,c) _ao_xmemcpy(d,s,c) void -_ao_xmemset(__xdata void *dst, uint8_t value, uint8_t count); +_ao_xmemset(__xdata void *dst, uint8_t value, uint16_t count); #define ao_xmemset(d,v,c) _ao_xmemset(d,v,c) int8_t -_ao_xmemcmp(__xdata void *a, __xdata void *b, uint8_t count); +_ao_xmemcmp(__xdata void *a, __xdata void *b, uint16_t count); #define ao_xmemcmp(d,s,c) _ao_xmemcmp((d), (s), (c)) diff --git a/src/cc1111/ao_string.c b/src/cc1111/ao_string.c index 3a07e47e..85d6383e 100644 --- a/src/cc1111/ao_string.c +++ b/src/cc1111/ao_string.c @@ -18,7 +18,7 @@ #include "ao.h" void -_ao_xmemcpy(__xdata void *dst, __xdata void *src, uint8_t count) +_ao_xmemcpy(__xdata void *dst, __xdata void *src, uint16_t count) { while (count--) { *(__xdata uint8_t *) dst = *(__xdata uint8_t *) src; @@ -28,7 +28,7 @@ _ao_xmemcpy(__xdata void *dst, __xdata void *src, uint8_t count) } void -_ao_xmemset(__xdata void *dst, uint8_t v, uint8_t count) +_ao_xmemset(__xdata void *dst, uint8_t v, uint16_t count) { while (count--) { *(__xdata uint8_t *) dst = v; @@ -37,7 +37,7 @@ _ao_xmemset(__xdata void *dst, uint8_t v, uint8_t count) } int8_t -_ao_xmemcmp(__xdata void *a, __xdata void *b, uint8_t count) +_ao_xmemcmp(__xdata void *a, __xdata void *b, uint16_t count) { while (count--) { int8_t d = *(__xdata int8_t *) a - *(__xdata int8_t *) b; -- cgit v1.2.3 From cb48dd0b03b445437f751028e8383610b65b0a68 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 16 Sep 2012 02:39:25 -0700 Subject: altos: Fix telemini sdcdb init file Set the driver source path for the debugger Signed-off-by: Keith Packard --- src/telemini-v1.0/.sdcdbrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/telemini-v1.0/.sdcdbrc b/src/telemini-v1.0/.sdcdbrc index 710b4a2f..b9f6129c 100644 --- a/src/telemini-v1.0/.sdcdbrc +++ b/src/telemini-v1.0/.sdcdbrc @@ -1 +1,2 @@ ---directory=.. +--directory=../cc1111:../product:../core:../drivers:. + -- cgit v1.2.3