drivers/at86rf231: fix reading of rssi value
This commit is contained in:
parent
61f3060d88
commit
f2396971e1
@ -53,7 +53,7 @@ void at86rf231_rx_handler(void)
|
||||
/* build package */
|
||||
at86rf231_rx_buffer[rx_buffer_next].lqi = lqi;
|
||||
/* RSSI has no meaning here, it should be read during packet reception. */
|
||||
at86rf231_rx_buffer[rx_buffer_next].rssi = fcs_rssi & 0x0F; // bit[4:0]
|
||||
at86rf231_rx_buffer[rx_buffer_next].rssi = fcs_rssi & 0x1F; /* bit[4:0] */
|
||||
/* bit7, boolean, 1 FCS valid, 0 FCS not valid */
|
||||
at86rf231_rx_buffer[rx_buffer_next].crc = (fcs_rssi >> 7) & 0x01;
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ typedef struct __attribute__((packed))
|
||||
/** @{ */
|
||||
uint8_t length; /**< the length of the frame of the frame including fcs*/
|
||||
ieee802154_frame_t frame; /**< the ieee802154 frame */
|
||||
int8_t rssi; /**< the rssi value */
|
||||
uint8_t rssi; /**< the rssi value */
|
||||
uint8_t crc; /**< 1 if crc was successfull, 0 otherwise */
|
||||
uint8_t lqi; /**< the link quality indicator */
|
||||
/** @} */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user