convert to printf
This commit is contained in:
parent
3969c56a0f
commit
d4cd92141e
1 changed files with 17 additions and 26 deletions
|
@ -1,5 +1,6 @@
|
||||||
#include <mc1322x.h>
|
#include <mc1322x.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -76,65 +77,56 @@ void main(void) {
|
||||||
{
|
{
|
||||||
case(cc_aborted):
|
case(cc_aborted):
|
||||||
{
|
{
|
||||||
putstr("aborted\n\r");
|
printf("aborted\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case(cc_not_completed):
|
case(cc_not_completed):
|
||||||
{
|
{
|
||||||
putstr("not completed\n\r");
|
printf("not completed\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case(cc_timeout):
|
case(cc_timeout):
|
||||||
{
|
{
|
||||||
putstr("timeout\n\r");
|
printf("timeout\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case(cc_no_ack):
|
case(cc_no_ack):
|
||||||
{
|
{
|
||||||
putstr("no ack\n\r");
|
printf("no ack\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case(cc_ext_timeout):
|
case(cc_ext_timeout):
|
||||||
{
|
{
|
||||||
putstr("ext timeout\n\r");
|
printf("ext timeout\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case(cc_ext_pnd_timeout):
|
case(cc_ext_pnd_timeout):
|
||||||
{
|
{
|
||||||
putstr("ext pnd timeout\n\r");
|
printf("ext pnd timeout\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case(cc_success):
|
case(cc_success):
|
||||||
{
|
{
|
||||||
// putstr("success\n\r");
|
// printf("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(' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
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();
|
toggle_led();
|
||||||
|
|
||||||
|
@ -147,19 +139,18 @@ void main(void) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
putstr("status: ");
|
printf("status: %04x\n\r",status);
|
||||||
put_hex16(status);
|
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
command_xcvr_rx();
|
command_xcvr_rx();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (_is_filter_failed_interrupt(maca_irq)) {
|
} else if (_is_filter_failed_interrupt(maca_irq)) {
|
||||||
putstr("filter failed\n\r");
|
printf("filter failed\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
command_xcvr_rx();
|
command_xcvr_rx();
|
||||||
} else if (_is_checksum_failed_interrupt(maca_irq)) {
|
} else if (_is_checksum_failed_interrupt(maca_irq)) {
|
||||||
putstr("crc failed\n\r");
|
printf("crc failed\n\r");
|
||||||
ResumeMACASync();
|
ResumeMACASync();
|
||||||
command_xcvr_rx();
|
command_xcvr_rx();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue