From 1ca5cf698a5c9ea22306316226f3c80501f562a6 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Mon, 8 Mar 2010 18:39:08 -0500 Subject: [PATCH] did something sensible to the leds The buffered packets made the indirect indicators misleading --- now they match. --- tests/rftest-rx.c | 12 ++++++++---- tests/rftest-tx.c | 3 +-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/rftest-rx.c b/tests/rftest-rx.c index 9c14bdb3c..401f17b28 100644 --- a/tests/rftest-rx.c +++ b/tests/rftest-rx.c @@ -7,11 +7,11 @@ #define LED LED_GREEN -void maca_rx_callback(volatile packet_t *p) -{ - (void)p; /* surpress unused warning */ +void maca_rx_callback(volatile packet_t *p) { + (void)p; toggle_gpio0(LED); -} + toggle_gpio0(LED); +} void main(void) { volatile packet_t *p; @@ -35,6 +35,10 @@ void main(void) { *GPIO_FUNC_SEL2 = (0x01 << ((44-16*2)*2)); *GPIO_PAD_DIR_SET1 = (1 << (44-32)); + /* sets up rx_on, should be a board specific item */ + *GPIO_FUNC_SEL2 = (0x02 << ((45-16*2)*2)); + *GPIO_PAD_DIR_SET1 = (1 << (45-32)); + set_power(0x0f); /* 0dbm */ set_channel(0); /* channel 11 */ diff --git a/tests/rftest-tx.c b/tests/rftest-tx.c index 78c4182f6..f0825ea9a 100644 --- a/tests/rftest-tx.c +++ b/tests/rftest-tx.c @@ -64,10 +64,9 @@ void main(void) { if(p) { fill_packet(p); - toggle_gpio0(LED); printf("rftest-tx --- "); print_packet(p); - + tx_packet(p); for(i=0; i