[riot-notifications] [RIOT-OS/RIOT] gnrc_lorawan : Add ADR support (#15995)

José Alamos notifications at github.com
Fri Jul 16 12:38:40 CEST 2021


@jia200x commented on this pull request.



> @@ -49,6 +49,18 @@ int gnrc_lorawan_set_dr(gnrc_lorawan_t *mac, uint8_t datarate)
     return 0;
 }
 
+int gnrc_lorawan_set_tx_power(gnrc_lorawan_t *mac, uint16_t tx_pwr)
+{
+    netdev_t *dev = gnrc_lorawan_get_netdev(mac);
+
+    if (!gnrc_lorawan_validate_tx_power(tx_pwr)) {
+        return -EINVAL;
+    }
+
+    DEBUG("gnrc_lorawan_region: TX  Power index: %u \n",tx_pwr);
+    return(dev->driver->set(dev, NETOPT_TX_POWER, &tx_pwr, sizeof(tx_pwr)));

```suggestion
    return dev->driver->set(dev, NETOPT_TX_POWER, &tx_pwr, sizeof(tx_pwr));
```

-- 
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/15995#pullrequestreview-708237036
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210716/fa1fe48f/attachment.htm>


More information about the notifications mailing list