From 4998a75ada0489f427bcd9660f4e9f53ed045877 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Mon, 13 Apr 2009 18:19:13 -0400 Subject: [PATCH] this is working well --- tests/rftest-rx.c | 21 +++-- tests/rftest-tx.c | 234 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 210 insertions(+), 45 deletions(-) diff --git a/tests/rftest-rx.c b/tests/rftest-rx.c index 34721391b..0e16f7929 100644 --- a/tests/rftest-rx.c +++ b/tests/rftest-rx.c @@ -49,11 +49,14 @@ void magic(void) { uint32_t ackBox[10]; +#define MAX_PAYLOAD 128 +volatile uint8_t data[MAX_PAYLOAD]; +/* maca_rxlen is very important */ #define command_xcvr_rx() \ do { \ - maca_txlen = (uint32_t)1<<16; \ + maca_txlen = ((0xff)<<16); \ maca_dmatx = (uint32_t)&ackBox; \ - maca_dmarx = DATA; \ + maca_dmarx = data; \ maca_tmren = (maca_cpl_clk | maca_soft_clk); \ maca_control = (control_prm | control_asap | control_seq_rx); \ }while(FALSE) @@ -95,7 +98,6 @@ void main(void) { uint8_t c; volatile uint32_t i; uint32_t tmp; - volatile uint8_t *data; uint16_t status; *(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000200; @@ -130,8 +132,7 @@ void main(void) { reg(MACA_CONTROL) = SMAC_MACA_CNTL_INIT_STATE; for(i=0; i