diff options
author | Keith Packard <keithp@keithp.com> | 2011-09-21 11:39:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-09-21 11:45:05 -0700 |
commit | c8a00bb9ccdf0d4257f037c2bf996ce5e6b0b0c0 (patch) | |
tree | cef91c9361b9455078ee4393281333c0ae6af784 /src/cc1111/ao_radio.c | |
parent | abf17522c206b465375b73a004a6d67bfa714ba3 (diff) |
altos: Pre-compute RDF packet len at compile time
Instead of computing the RDF packet len at run time, which takes a
pile of code space.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/cc1111/ao_radio.c')
-rw-r--r-- | src/cc1111/ao_radio.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/cc1111/ao_radio.c b/src/cc1111/ao_radio.c index 00816b33..75f241d4 100644 --- a/src/cc1111/ao_radio.c +++ b/src/cc1111/ao_radio.c @@ -367,21 +367,9 @@ ao_radio_recv_abort(void) __xdata ao_radio_rdf_value = 0x55; void -ao_radio_rdf(int ms) +ao_radio_rdf(uint8_t pkt_len) { uint8_t i; - uint8_t pkt_len; - - /* - * Compute the packet length as follows: - * - * 2000 bps (for a 1kHz tone) - * so, for 'ms' milliseconds, we need - * 2 * ms bits, or ms / 4 bytes - */ - if (ms > (255 * 4)) - ms = 255 * 4; - pkt_len = ms >> 2; ao_radio_abort = 0; ao_radio_get(pkt_len); |