mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
fixed byte order in reception of IEEE802.15.4 frames according to the fixed sending in f6c37b0b4f
This commit is contained in:
parent
c41fe46b54
commit
a7a97e92c3
@ -148,12 +148,6 @@ uint8_t ieee802154_frame_read(uint8_t *buf, ieee802154_frame_t *frame,
|
|||||||
uint8_t index = 0;
|
uint8_t index = 0;
|
||||||
uint8_t hdrlen;
|
uint8_t hdrlen;
|
||||||
|
|
||||||
frame->fcf.dest_addr_m = (buf[index] >> 2) & 0x03;
|
|
||||||
frame->fcf.frame_ver = (buf[index] >> 4) & 0x03;
|
|
||||||
frame->fcf.src_addr_m = (buf[index] >> 6) & 0x03;
|
|
||||||
|
|
||||||
index++;
|
|
||||||
|
|
||||||
frame->fcf.frame_type = (buf[index]) & 0x07;
|
frame->fcf.frame_type = (buf[index]) & 0x07;
|
||||||
frame->fcf.sec_enb = (buf[index] >> 3) & 0x01;
|
frame->fcf.sec_enb = (buf[index] >> 3) & 0x01;
|
||||||
frame->fcf.frame_pend = (buf[index] >> 4) & 0x01;
|
frame->fcf.frame_pend = (buf[index] >> 4) & 0x01;
|
||||||
@ -162,6 +156,12 @@ uint8_t ieee802154_frame_read(uint8_t *buf, ieee802154_frame_t *frame,
|
|||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
|
frame->fcf.dest_addr_m = (buf[index] >> 2) & 0x03;
|
||||||
|
frame->fcf.frame_ver = (buf[index] >> 4) & 0x03;
|
||||||
|
frame->fcf.src_addr_m = (buf[index] >> 6) & 0x03;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
frame->seq_nr = buf[index];
|
frame->seq_nr = buf[index];
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
Loading…
Reference in New Issue
Block a user