doc: add documentation for packet format in mc1322x

This commit is contained in:
Oleg Hahm 2014-12-06 14:19:40 +01:00
parent a5dc951ef2
commit e79e00ef7f

View File

@ -23,24 +23,30 @@ extern "C" {
#define PACKET_STATS 0 #define PACKET_STATS 0
/**
* @brief MC1322x internal MACA packet format */
struct packet { struct packet {
uint8_t length; /*< does not include FCS checksum */ uint8_t length; /**< does not include FCS checksum */
volatile struct packet * left; volatile struct packet *left; /**< pointer to left neighbor in queue */
volatile struct packet * right; volatile struct packet *right; /**< pointer to right neighbor in queue */
/* offset into data for first byte of the packet payload */ uint8_t offset; /**< offset into data for first byte of the
/* On TX this should be 0 */ * packet payload
/* On RX this should be 1 since the maca puts the length as the first byte*/ * On TX this should be 0
uint8_t offset; * On RX this should be 1 since the maca
uint8_t lqi; * puts the length as the first byte
uint8_t status; */
uint32_t rx_time; uint8_t lqi; /**< link quality indicator */
uint8_t status; /**< packet status */
uint32_t rx_time; /**< receiving timestamp */
#if PACKET_STATS #if PACKET_STATS
uint8_t seen; uint8_t seen;
uint8_t post_tx; uint8_t post_tx;
uint8_t get_free; uint8_t get_free;
uint8_t rxd; uint8_t rxd;
#endif #endif
uint8_t data[MACA_MAX_PAYLOAD_SIZE+2+1]; /* +2 for FCS; + 1 since maca returns the length as the first byte */ uint8_t data[MACA_MAX_PAYLOAD_SIZE+2+1]; /**< +2 for FCS; + 1 since maca
* returns the length as the
* first byte */
}; };
typedef struct packet maca_packet_t; typedef struct packet maca_packet_t;