add an offset to packet_t to compensate for the added length byte on

reception
This commit is contained in:
Mariano Alvira 2010-03-07 17:04:30 -05:00
parent 8421031d4a
commit 024448e65e
5 changed files with 10 additions and 4 deletions

View file

@ -12,6 +12,10 @@ struct packet {
uint8_t length;
volatile struct packet * left;
volatile struct packet * right;
/* offset into data for first byte of the packet payload */
/* 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;
uint8_t data[MAX_PACKET_SIZE+1]; /* + 1 since maca returns the length as the first byte */
};
typedef struct packet packet_t;