drivers/at86rf231: fix reading of rssi value

This commit is contained in:
Thomas Eichinger 2015-01-12 16:40:21 +01:00
parent 61f3060d88
commit f2396971e1
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ void at86rf231_rx_handler(void)
/* build package */ /* build package */
at86rf231_rx_buffer[rx_buffer_next].lqi = lqi; at86rf231_rx_buffer[rx_buffer_next].lqi = lqi;
/* RSSI has no meaning here, it should be read during packet reception. */ /* 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 */ /* bit7, boolean, 1 FCS valid, 0 FCS not valid */
at86rf231_rx_buffer[rx_buffer_next].crc = (fcs_rssi >> 7) & 0x01; at86rf231_rx_buffer[rx_buffer_next].crc = (fcs_rssi >> 7) & 0x01;

View File

@ -76,7 +76,7 @@ typedef struct __attribute__((packed))
/** @{ */ /** @{ */
uint8_t length; /**< the length of the frame of the frame including fcs*/ uint8_t length; /**< the length of the frame of the frame including fcs*/
ieee802154_frame_t frame; /**< the ieee802154 frame */ 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 crc; /**< 1 if crc was successfull, 0 otherwise */
uint8_t lqi; /**< the link quality indicator */ uint8_t lqi; /**< the link quality indicator */
/** @} */ /** @} */