convert to printf

This commit is contained in:
Mariano Alvira 2010-03-03 13:39:14 -05:00
parent 3969c56a0f
commit d4cd92141e

View File

@ -1,5 +1,6 @@
#include <mc1322x.h>
#include <board.h>
#include <stdio.h>
#include "tests.h"
#include "config.h"
@ -76,65 +77,56 @@ void main(void) {
{
case(cc_aborted):
{
putstr("aborted\n\r");
printf("aborted\n\r");
ResumeMACASync();
break;
}
case(cc_not_completed):
{
putstr("not completed\n\r");
printf("not completed\n\r");
ResumeMACASync();
break;
}
case(cc_timeout):
{
putstr("timeout\n\r");
printf("timeout\n\r");
ResumeMACASync();
break;
}
case(cc_no_ack):
{
putstr("no ack\n\r");
printf("no ack\n\r");
ResumeMACASync();
break;
}
case(cc_ext_timeout):
{
putstr("ext timeout\n\r");
printf("ext timeout\n\r");
ResumeMACASync();
break;
}
case(cc_ext_pnd_timeout):
{
putstr("ext pnd timeout\n\r");
printf("ext pnd timeout\n\r");
ResumeMACASync();
break;
}
case(cc_success):
{
// putstr("success\n\r");
putstr("rftest-rx --- " );
putstr(" maca_getrxlvl: 0x");
put_hex(*MACA_GETRXLVL);
putstr(" timestamp: 0x");
put_hex32(maca_timestamp);
putstr("\n\r");
putstr(" data: 0x");
put_hex32((uint32_t)data);
putchr(' ');
for(i=0; i<=(*MACA_GETRXLVL-4); i++) { /* fcs+somethingelse is not transferred by DMA */
put_hex(data[i]);
putchr(' ');
}
// printf("success\n\r");
putstr("\n\r");
printf("rftest-rx --- maca_getrxlvl: 0x%02x timestamp: 0x%08x\n\r", maca_getrxlvl, maca_timestamp);
printf(" data: 0x%08x ", (uint32_t)data);
for(i=0; i<=(*MACA_GETRXLVL-4); i++) { /* fcs+somethingelse is not transferred by DMA */
printf("%02x ", data[i]);
}
printf("\n\r");
toggle_led();
@ -147,19 +139,18 @@ void main(void) {
}
default:
{
putstr("status: ");
put_hex16(status);
printf("status: %04x\n\r",status);
ResumeMACASync();
command_xcvr_rx();
}
}
} else if (_is_filter_failed_interrupt(maca_irq)) {
putstr("filter failed\n\r");
printf("filter failed\n\r");
ResumeMACASync();
command_xcvr_rx();
} else if (_is_checksum_failed_interrupt(maca_irq)) {
putstr("crc failed\n\r");
printf("crc failed\n\r");
ResumeMACASync();
command_xcvr_rx();
}