Merge remote branch 'libmc1322x/master'

This commit is contained in:
Mariano Alvira 2011-02-18 12:38:30 -05:00
commit 07f77b02eb
3 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,7 @@ struct packet {
uint8_t offset; uint8_t offset;
uint8_t lqi; uint8_t lqi;
uint8_t status; uint8_t status;
uint32_t rx_time;
#if PACKET_STATS #if PACKET_STATS
uint8_t seen; uint8_t seen;
uint8_t post_tx; uint8_t post_tx;

View File

@ -150,7 +150,7 @@ void check_maca(void) {
#if DEBUG_MACA #if DEBUG_MACA
if((count = count_packets()) != NUM_PACKETS) { if((count = count_packets()) != NUM_PACKETS) {
PRINTF("check maca: count_packets %d\n", count); PRINTF("check maca: count_packets %d\n", (int)count);
Print_Packets("check_maca"); Print_Packets("check_maca");
#if PACKET_STATS #if PACKET_STATS
for(i=0; i<NUM_PACKETS; i++) { for(i=0; i<NUM_PACKETS; i++) {
@ -615,6 +615,7 @@ void maca_isr(void) {
*MACA_CLRIRQ = (1 << maca_irq_di); *MACA_CLRIRQ = (1 << maca_irq_di);
dma_rx->length = *MACA_GETRXLVL - 2; /* packet length does not include FCS */ dma_rx->length = *MACA_GETRXLVL - 2; /* packet length does not include FCS */
dma_rx->lqi = get_lqi(); dma_rx->lqi = get_lqi();
dma_rx->rx_time = *MACA_TIMESTAMP;
/* check if received packet needs an ack */ /* check if received packet needs an ack */
if(dma_rx->data[1] & 0x20) { if(dma_rx->data[1] & 0x20) {

View File

@ -48,7 +48,7 @@ void print_packet(volatile packet_t *p) {
volatile uint8_t i,j,k; volatile uint8_t i,j,k;
#define PER_ROW 16 #define PER_ROW 16
if(p) { if(p) {
printf("len 0x%02x lqi 0x%02x", p->length, p->lqi); printf("len 0x%02x lqi 0x%02x rx_time 0x%08x", p->length, p->lqi, (int)p->rx_time);
for(j=0, k=0; j <= ( (p->length) / PER_ROW ); j++) { for(j=0, k=0; j <= ( (p->length) / PER_ROW ); j++) {
printf("\n\r"); printf("\n\r");
for(i=0; i < PER_ROW; i++, k++) { for(i=0; i < PER_ROW; i++, k++) {