1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 01:53:51 +01:00

Merge pull request #21716 from maribu/cpu/nrf52/typo

cpu/nrf52/nrf802154: fix minor style issues
This commit is contained in:
Marian Buschsieweke 2025-09-12 16:39:38 +00:00 committed by GitHub
commit 950adfafce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,6 @@
#include <errno.h>
#include "cpu.h"
#include "luid.h"
#include "nrf_clock.h"
#include "net/ieee802154.h"
@ -315,15 +314,6 @@ static int _confirm_op(ieee802154_dev_t *dev, ieee802154_hal_op_t op, void *ctx)
return 0;
}
/**
* @brief Convert from the internal representation to dBm, when the
* radio operates as a IEEE802.15.4 transceiver.
*/
static inline int8_t _hwval_to_ieee802154_dbm(uint8_t hwval)
{
return (ED_RSSISCALE * hwval) + ED_RSSIOFFS;
}
static int _read(ieee802154_dev_t *dev, void *buf, size_t max_size,
ieee802154_rx_info_t *info)
{
@ -335,7 +325,7 @@ static int _read(ieee802154_dev_t *dev, void *buf, size_t max_size,
DEBUG("[nrf802154] recv: buffer is to small\n");
return res;
}
else {
DEBUG("[nrf802154] recv: reading packet of length %i\n", pktlen);
if (info != NULL) {
ieee802154_rx_info_t *radio_info = info;
@ -350,11 +340,10 @@ static int _read(ieee802154_dev_t *dev, void *buf, size_t max_size,
The linear mapping used here has been found empirically
through comparison with the RSSI value provided by NRF_RADIO->RSSISAMPLE
after enabling the ADDRESS_RSSISTART short. */
int8_t rssi_dbm = hwlqi + ED_RSSIOFFS - 1;
int16_t rssi_dbm = hwlqi + ED_RSSIOFFS - 1;
radio_info->rssi = ieee802154_dbm_to_rssi(rssi_dbm);
}
memcpy(buf, &rxbuf[1], pktlen);
}
return pktlen;
}
@ -532,7 +521,7 @@ void isr_radio(void)
bool is_ack = rxbuf[1] & IEEE802154_FCF_TYPE_ACK;
bool ack_req = rxbuf[1] & IEEE802154_FCF_ACK_REQ;
/* If radio is in promiscuos mode, indicate packet and
/* If radio is in promiscuous mode, indicate packet and
* don't event think of sending an ACK frame :) */
if (cfg.promisc) {
DEBUG("[nrf802154] Promiscuous mode is enabled.\n");
@ -731,7 +720,8 @@ static int _config_addr_filter(ieee802154_dev_t *dev, ieee802154_af_cmd_t cmd, c
return 0;
}
static int _config_src_addr_match(ieee802154_dev_t *dev, ieee802154_src_match_t cmd, const void *value)
static int _config_src_addr_match(ieee802154_dev_t *dev, ieee802154_src_match_t cmd,
const void *value)
{
(void)dev;
switch (cmd) {