mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-09 23:54:32 +00:00
add rx_time parameter and fill with *MACA_TIMESTAMP
This commit is contained in:
parent
c0b21702ed
commit
5012757673
@ -53,6 +53,7 @@ struct packet {
|
||||
uint8_t offset;
|
||||
uint8_t lqi;
|
||||
uint8_t status;
|
||||
uint32_t rx_time;
|
||||
#if PACKET_STATS
|
||||
uint8_t seen;
|
||||
uint8_t post_tx;
|
||||
|
@ -615,6 +615,7 @@ void maca_isr(void) {
|
||||
*MACA_CLRIRQ = (1 << maca_irq_di);
|
||||
dma_rx->length = *MACA_GETRXLVL - 2; /* packet length does not include FCS */
|
||||
dma_rx->lqi = get_lqi();
|
||||
dma_rx->rx_time = *MACA_TIMESTAMP;
|
||||
|
||||
/* check if received packet needs an ack */
|
||||
if(dma_rx->data[1] & 0x20) {
|
||||
|
@ -48,7 +48,7 @@ void print_packet(volatile packet_t *p) {
|
||||
volatile uint8_t i,j,k;
|
||||
#define PER_ROW 16
|
||||
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++) {
|
||||
printf("\n\r");
|
||||
for(i=0; i < PER_ROW; i++, k++) {
|
||||
|
Loading…
Reference in New Issue
Block a user