Skip to content
Snippets Groups Projects
Commit ad1b5b4c authored by Oleg Hahm's avatar Oleg Hahm
Browse files

Merge pull request #3955 from daniel-k/pr/at86rf2xx_phr_compliance

at86rf2xx: mask MSB in PHR for 802.15.4 compliance
parents f7057da0 e754963c
No related branches found
No related tags found
No related merge requests found
...@@ -246,9 +246,11 @@ void at86rf2xx_tx_exec(at86rf2xx_t *dev) ...@@ -246,9 +246,11 @@ void at86rf2xx_tx_exec(at86rf2xx_t *dev)
size_t at86rf2xx_rx_len(at86rf2xx_t *dev) size_t at86rf2xx_rx_len(at86rf2xx_t *dev)
{ {
uint8_t res; uint8_t phr;
at86rf2xx_fb_read(dev, &res, 1); at86rf2xx_fb_read(dev, &phr, 1);
return (size_t)(res - 2); /* extract the PHR and LQI field */
/* ignore MSB (refer p.80) and substract length of FCS field */
return (size_t)((phr & 0x7f) - 2);
} }
void at86rf2xx_rx_read(at86rf2xx_t *dev, uint8_t *data, size_t len, void at86rf2xx_rx_read(at86rf2xx_t *dev, uint8_t *data, size_t len,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment