[riot-notifications] [RIOT-OS/RIOT] WIP: Adds crc_valid to netif (#8276)

Koen Zandberg notifications at github.com
Tue Mar 12 09:51:48 CET 2019


bergzand commented on this pull request.



> @@ -249,6 +249,7 @@ typedef enum {
 struct netdev_radio_rx_info {
     int16_t rssi;       /**< RSSI of a received packet in dBm */
     uint8_t lqi;        /**< LQI of a received packet */
+    uint8_t crc_valid;  /**< CRC was valid (when != 0) */

Now this might be in the "premature optimization" area. Is there a use case for changing this to `uint8_t flags;` and use it as a number of boolean flags for received frames, something like
```
NETDEV_RADIO_RX_CRC_VALID   (0x01) /**< Set if the CRC was valid */
NETDEV_RADIO_RX_DATA_PEND  (0x02) /**< Set if the received frame has the data pending bit set */
```

I don't want to stall this PR more than necessary with this idea. if we *might* need this in the future, having a `bool netdev_radio_crc_valid(netdev_radio_rx_info_t *info)` getter for the crc status would prevent a migration to flags being a significant API change.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8276#pullrequestreview-213253051
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190312/c06d72ff/attachment.html>


More information about the notifications mailing list