[riot-notifications] [RIOT-OS/RIOT] drivers/mrf24j40 add tx retries needed get operation (#7448)

Sebastian Meiling notifications at github.com
Tue Sep 26 10:29:49 CEST 2017


smlng requested changes on this pull request.

some minor nits

> @@ -268,6 +268,14 @@ extern "C" {
 /** @} */
 
 /**
+ * @name    Shift offsets for TXSTAT register (0x24)
+ * @{
+ */
+#define MRF24J40_TXSTAT_MAX_FRAME_RETRIES_SHIFT 6

please put in parentheses and make explicitly unsigned, i.e `(6U)` - might not be necessary but would be more consistent with (majority) of RIOT code base.

> @@ -268,6 +268,14 @@ extern "C" {
 /** @} */
 
 /**
+ * @name    Shift offsets for TXSTAT register (0x24)
+ * @{
+ */
+#define MRF24J40_TXSTAT_MAX_FRAME_RETRIES_SHIFT 6
+#define MRF24J40_TXSTAT_CCAFAIL_SHIFT           5

not used (yet?)

> @@ -538,6 +547,7 @@ static void _isr(netdev_t *netdev)
 #ifdef MODULE_NETSTATS_L2
         if (netdev->event_callback && (dev->netdev.flags & MRF24J40_OPT_TELL_TX_END)) {
             uint8_t txstat = mrf24j40_reg_read_short(dev, MRF24J40_REG_TXSTAT);
+	    dev->tx_retries = (txstat >> MRF24J40_TXSTAT_MAX_FRAME_RETRIES_SHIFT);

looks like a `tab` here? Change to spaces.

-- 
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/7448#pullrequestreview-65134581
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170926/054a93c7/attachment.html>


More information about the notifications mailing list