summaryrefslogtreecommitdiff
path: root/src/ao_packet.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-02-27 15:14:04 -0800
committerKeith Packard <keithp@keithp.com>2010-02-27 15:14:04 -0800
commit7aab73a265841aac817ea34235dd1eb819debf76 (patch)
tree34d5cacf331acf7e0c70da928015f5993e6876a3 /src/ao_packet.c
parent1d6d8d76ec65373ffee70add75d183f5c4168f61 (diff)
Fix up LED colors for each product.
Different products assign different color LEDs to the two available LED drivers (P1_0, P1_1). Make the LED color pin assignments per-product (in ao_pins.h), then deal with not always having a green LED. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_packet.c')
-rw-r--r--src/ao_packet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ao_packet.c b/src/ao_packet.c
index dcd1647c..d52f2a68 100644
--- a/src/ao_packet.c
+++ b/src/ao_packet.c
@@ -67,7 +67,9 @@ ao_packet_recv(void)
{
uint8_t dma_done;
+#ifdef AO_LED_GREEN
ao_led_on(AO_LED_GREEN);
+#endif
ao_radio_get();
ao_dma_set_transfer(ao_radio_dma,
&RFDXADDR,
@@ -86,7 +88,9 @@ ao_packet_recv(void)
ao_radio_abort();
dma_done = ao_radio_dma_done;
ao_radio_put();
+#ifdef AO_LED_GREEN
ao_led_off(AO_LED_GREEN);
+#endif
if (dma_done & AO_DMA_DONE) {
if (!(ao_rx_packet.status & PKT_APPEND_STATUS_1_CRC_OK))