From 71cd2c2ead316583658f04c8ef5aef8ad3248d38 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Sat, 22 May 2010 15:45:52 -0400 Subject: [PATCH] add PACKET_STATS: extra flags to packets for debugging. --- lib/include/packet.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/include/packet.h b/lib/include/packet.h index 9fca2a379..21d23953e 100644 --- a/lib/include/packet.h +++ b/lib/include/packet.h @@ -41,6 +41,8 @@ #define MAX_PAYLOAD_SIZE 125 #endif +#define PACKET_STATS 0 + struct packet { uint8_t length; /* does not include FCS checksum */ volatile struct packet * left; @@ -49,6 +51,12 @@ struct packet { /* On TX this should be 0 */ /* On RX this should be 1 since the maca puts the length as the first byte*/ uint8_t offset; + #if PACKET_STATS + uint8_t seen; + uint8_t post_tx; + uint8_t get_free; + uint8_t rxd; + #endif uint8_t data[MAX_PAYLOAD_SIZE+2+1]; /* +2 for FCS; + 1 since maca returns the length as the first byte */ }; typedef struct packet packet_t;