major bugfix: padding synch with zero

This commit is contained in:
fros4943 2007-12-20 13:36:59 +00:00
parent abb2731ed7
commit d0997c2dab
2 changed files with 2 additions and 0 deletions

View File

@ -238,6 +238,7 @@ const uint8_t syncword[2] = {0xD3,0x91};
// header: number of bytes in packet including header
struct cc1020_header {
uint8_t pad;
uint8_t length;
} __attribute__((packed));

View File

@ -224,6 +224,7 @@ cc1020_send(const void *buf, unsigned short len)
cc1020_txlen = PREAMBLESIZE + SYNCWDSIZE;
// header
cc1020_txbuf[cc1020_txlen++] = 0x00;
cc1020_txbuf[cc1020_txlen++] = HDRSIZE + len;
// data to send