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/test/ao_flight_test.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/test/ao_flight_test.c')
-rw-r--r-- | src/test/ao_flight_test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c index 56733c89..921d44e7 100644 --- a/src/test/ao_flight_test.c +++ b/src/test/ao_flight_test.c @@ -173,6 +173,10 @@ struct ao_cmds { const char *help; }; +#define ao_xmemcpy(d,s,c) memcpy(d,s,c) +#define ao_xmemset(d,v,c) memset(d,v,c) +#define ao_xmemcmp(d,s,c) memcmp(d,s,c) + #include "ao_convert.c" struct ao_config { @@ -542,7 +546,7 @@ ao_sleep(void *wchan) ao_flight_started = 1; } } else if (nword == 2 && strcmp(words[0], "TELEM") == 0) { - char *hex = words[1]; + __xdata char *hex = words[1]; char elt[3]; int i, len; uint8_t sum; @@ -574,7 +578,7 @@ ao_sleep(void *wchan) continue; } if (len == 36) { - memcpy(&telem, bytes + 1, 32); + ao_xmemcpy(&telem, bytes + 1, 32); tick = telem.generic.tick; switch (telem.generic.type) { case AO_TELEMETRY_SENSOR_TELEMETRUM: |