drivers: ieee802154: nrf5: Align to new radio driver API
Align ieee802154_nrf5 driver to a new radio driver API. Utilize new radio driver features (CCA). Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
6093b88809
commit
e0d4036f53
2 changed files with 161 additions and 113 deletions
|
@ -32,12 +32,10 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include <random/rand32.h>
|
||||
|
||||
#include <net/ieee802154_radio.h>
|
||||
#include <drivers/clock_control/nrf_clock_control.h>
|
||||
#include <clock_control.h>
|
||||
|
||||
#include "nrf52840.h"
|
||||
#include "ieee802154_nrf5.h"
|
||||
#include "nrf_drv_radio802154.h"
|
||||
#include "nrf_802154.h"
|
||||
|
||||
struct nrf5_802154_config {
|
||||
void (*irq_config_func)(struct device *dev);
|
||||
|
@ -65,6 +63,7 @@ static void nrf5_rx_thread(void *arg1, void *arg2, void *arg3)
|
|||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
struct net_buf *frag = NULL;
|
||||
struct net_pkt *pkt;
|
||||
struct nrf5_802154_rx_frame *rx_frame;
|
||||
u8_t pkt_len;
|
||||
|
||||
ARG_UNUSED(arg2);
|
||||
|
@ -72,22 +71,26 @@ static void nrf5_rx_thread(void *arg1, void *arg2, void *arg3)
|
|||
|
||||
while (1) {
|
||||
pkt = NULL;
|
||||
rx_frame = NULL;
|
||||
|
||||
LOG_DBG("Waiting for frame");
|
||||
k_sem_take(&nrf5_radio->rx_wait, K_FOREVER);
|
||||
|
||||
rx_frame = k_fifo_get(&nrf5_radio->rx_fifo, K_FOREVER);
|
||||
|
||||
__ASSERT_NO_MSG(rx_frame->psdu);
|
||||
|
||||
LOG_DBG("Frame received");
|
||||
|
||||
pkt = net_pkt_get_reserve_rx(K_NO_WAIT);
|
||||
if (!pkt) {
|
||||
LOG_ERR("No pkt available");
|
||||
goto out;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
frag = net_pkt_get_frag(pkt, K_NO_WAIT);
|
||||
if (!frag) {
|
||||
LOG_ERR("No frag available");
|
||||
goto out;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
net_pkt_frag_insert(pkt, frag);
|
||||
|
@ -98,29 +101,31 @@ static void nrf5_rx_thread(void *arg1, void *arg2, void *arg3)
|
|||
*/
|
||||
if (IS_ENABLED(CONFIG_IEEE802154_RAW_MODE) ||
|
||||
IS_ENABLED(CONFIG_NET_L2_OPENTHREAD)) {
|
||||
|
||||
pkt_len = nrf5_radio->rx_psdu[0];
|
||||
pkt_len = rx_frame->psdu[0];
|
||||
} else {
|
||||
pkt_len = nrf5_radio->rx_psdu[0] - NRF5_FCS_LENGTH;
|
||||
pkt_len = rx_frame->psdu[0] - NRF5_FCS_LENGTH;
|
||||
}
|
||||
|
||||
__ASSERT_NO_MSG(pkt_len <= CONFIG_NET_BUF_DATA_SIZE);
|
||||
|
||||
/* Skip length (first byte) and copy the payload */
|
||||
memcpy(frag->data, nrf5_radio->rx_psdu + 1, pkt_len);
|
||||
memcpy(frag->data, rx_frame->psdu + 1, pkt_len);
|
||||
net_buf_add(frag, pkt_len);
|
||||
|
||||
net_pkt_set_ieee802154_lqi(pkt, nrf5_radio->lqi);
|
||||
net_pkt_set_ieee802154_rssi(pkt, nrf5_radio->rssi);
|
||||
|
||||
nrf_drv_radio802154_buffer_free(nrf5_radio->rx_psdu);
|
||||
net_pkt_set_ieee802154_lqi(pkt, rx_frame->lqi);
|
||||
net_pkt_set_ieee802154_rssi(pkt, rx_frame->rssi);
|
||||
|
||||
LOG_DBG("Caught a packet (%u) (LQI: %u)",
|
||||
pkt_len, nrf5_radio->lqi);
|
||||
pkt_len, rx_frame->lqi);
|
||||
|
||||
if (net_recv_data(nrf5_radio->iface, pkt) < 0) {
|
||||
LOG_DBG("Packet dropped by NET stack");
|
||||
goto out;
|
||||
LOG_ERR("Packet dropped by NET stack");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
nrf_802154_buffer_free_raw(rx_frame->psdu);
|
||||
rx_frame->psdu = NULL;
|
||||
|
||||
if (CONFIG_IEEE802154_DRIVER_LOG_LEVEL >= LOG_LEVEL_DBG) {
|
||||
net_analyze_stack(
|
||||
"nRF5 rx stack",
|
||||
|
@ -130,7 +135,10 @@ static void nrf5_rx_thread(void *arg1, void *arg2, void *arg3)
|
|||
|
||||
continue;
|
||||
|
||||
out:
|
||||
drop:
|
||||
nrf_802154_buffer_free_raw(rx_frame->psdu);
|
||||
rx_frame->psdu = NULL;
|
||||
|
||||
if (pkt) {
|
||||
net_pkt_unref(pkt);
|
||||
}
|
||||
|
@ -141,10 +149,8 @@ out:
|
|||
|
||||
static enum ieee802154_hw_caps nrf5_get_capabilities(struct device *dev)
|
||||
{
|
||||
return IEEE802154_HW_FCS |
|
||||
IEEE802154_HW_2_4_GHZ |
|
||||
IEEE802154_HW_TX_RX_ACK |
|
||||
IEEE802154_HW_FILTER;
|
||||
return IEEE802154_HW_FCS | IEEE802154_HW_2_4_GHZ |
|
||||
IEEE802154_HW_TX_RX_ACK | IEEE802154_HW_FILTER;
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,30 +158,24 @@ static int nrf5_cca(struct device *dev)
|
|||
{
|
||||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
|
||||
/* Current implementation of the NRF5 radio driver doesn't provide an
|
||||
* explicit API to perform CCA. However, Mode1 CCA (energy above
|
||||
* threshold), can be achieved using energy detection function.
|
||||
*/
|
||||
if (!nrf_drv_radio802154_energy_detection(nrf5_radio->channel, 128)) {
|
||||
if (!nrf_802154_cca()) {
|
||||
LOG_DBG("CCA failed");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* The nRF driver guarantees that a callback will be called once
|
||||
* the ED function is done, thus unlocking the semaphore.
|
||||
* the CCA function is done, thus unlocking the semaphore.
|
||||
*/
|
||||
k_sem_take(&nrf5_radio->cca_wait, K_FOREVER);
|
||||
LOG_DBG("CCA: %d", nrf5_radio->channel_ed);
|
||||
|
||||
if (nrf5_radio->channel_ed > CONFIG_IEEE802154_NRF5_CCA_ED_THRESHOLD) {
|
||||
return -EBUSY;
|
||||
}
|
||||
LOG_DBG("Channel free? %d", nrf5_radio->channel_free);
|
||||
|
||||
return 0;
|
||||
return nrf5_radio->channel_free ? 0 : -EBUSY;
|
||||
}
|
||||
|
||||
static int nrf5_set_channel(struct device *dev, u16_t channel)
|
||||
{
|
||||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
LOG_DBG("%u", channel);
|
||||
|
||||
|
@ -183,11 +183,8 @@ static int nrf5_set_channel(struct device *dev, u16_t channel)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!nrf_drv_radio802154_receive(channel, false)) {
|
||||
return -EBUSY;
|
||||
}
|
||||
nrf_802154_channel_set(channel);
|
||||
|
||||
nrf5_radio->channel = channel;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -198,9 +195,10 @@ static int nrf5_set_pan_id(struct device *dev, u16_t pan_id)
|
|||
ARG_UNUSED(dev);
|
||||
|
||||
sys_put_le16(pan_id, pan_id_le);
|
||||
nrf_drv_radio802154_pan_id_set(pan_id_le);
|
||||
nrf_802154_pan_id_set(pan_id_le);
|
||||
|
||||
LOG_DBG("0x%x", pan_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -211,9 +209,10 @@ static int nrf5_set_short_addr(struct device *dev, u16_t short_addr)
|
|||
ARG_UNUSED(dev);
|
||||
|
||||
sys_put_le16(short_addr, short_addr_le);
|
||||
nrf_drv_radio802154_short_address_set(short_addr_le);
|
||||
nrf_802154_short_address_set(short_addr_le);
|
||||
|
||||
LOG_DBG("0x%x", short_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -225,13 +224,12 @@ static int nrf5_set_ieee_addr(struct device *dev, const u8_t *ieee_addr)
|
|||
ieee_addr[7], ieee_addr[6], ieee_addr[5], ieee_addr[4],
|
||||
ieee_addr[3], ieee_addr[2], ieee_addr[1], ieee_addr[0]);
|
||||
|
||||
nrf_drv_radio802154_extended_address_set(ieee_addr);
|
||||
nrf_802154_extended_address_set(ieee_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nrf5_filter(struct device *dev,
|
||||
bool set,
|
||||
static int nrf5_filter(struct device *dev, bool set,
|
||||
enum ieee802154_filter_type type,
|
||||
const struct ieee802154_filter *filter)
|
||||
{
|
||||
|
@ -254,10 +252,11 @@ static int nrf5_filter(struct device *dev,
|
|||
|
||||
static int nrf5_set_txpower(struct device *dev, s16_t dbm)
|
||||
{
|
||||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
LOG_DBG("%d", dbm);
|
||||
nrf5_radio->txpower = dbm;
|
||||
|
||||
nrf_802154_tx_power_set(dbm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -272,45 +271,58 @@ static int nrf5_tx(struct device *dev,
|
|||
|
||||
LOG_DBG("%p (%u)", payload, payload_len);
|
||||
|
||||
nrf5_radio->tx_success = false;
|
||||
nrf5_radio->tx_psdu[0] = payload_len + NRF5_FCS_LENGTH;
|
||||
|
||||
memcpy(nrf5_radio->tx_psdu + 1, payload, payload_len);
|
||||
|
||||
/* Reset semaphore in case ACK was received after timeout */
|
||||
k_sem_reset(&nrf5_radio->tx_wait);
|
||||
|
||||
if (!nrf_drv_radio802154_transmit(nrf5_radio->tx_psdu,
|
||||
nrf5_radio->channel,
|
||||
nrf5_radio->txpower)) {
|
||||
if (!nrf_802154_transmit_raw(nrf5_radio->tx_psdu, false)) {
|
||||
LOG_ERR("Cannot send frame");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
LOG_DBG("Sending frame (ch:%d, txpower:%d)",
|
||||
nrf5_radio->channel,
|
||||
nrf5_radio->txpower);
|
||||
nrf_802154_channel_get(), nrf_802154_tx_power_get());
|
||||
|
||||
/* Wait for ack to be received */
|
||||
if (k_sem_take(&nrf5_radio->tx_wait, ACK_TIMEOUT)) {
|
||||
LOG_DBG("ACK not received");
|
||||
nrf_drv_radio802154_receive(nrf5_radio->channel, true);
|
||||
|
||||
if (!nrf_802154_receive()) {
|
||||
LOG_ERR("Failed to switch back to receive state");
|
||||
}
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
LOG_DBG("Result: %d", nrf5_data.tx_success);
|
||||
LOG_DBG("Result: %d", nrf5_data.tx_result);
|
||||
|
||||
return nrf5_radio->tx_success ? 0 : -EBUSY;
|
||||
if (nrf5_radio->tx_result == NRF_802154_TX_ERROR_NONE) {
|
||||
/* ACK frame not used currently. */
|
||||
if (nrf5_radio->ack != NULL) {
|
||||
nrf_802154_buffer_free_raw(nrf5_radio->ack);
|
||||
}
|
||||
|
||||
nrf5_radio->ack = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int nrf5_start(struct device *dev)
|
||||
{
|
||||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (!nrf_802154_receive()) {
|
||||
LOG_ERR("Failed to enter receive state");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
nrf_drv_radio802154_receive(nrf5_radio->channel, false);
|
||||
LOG_DBG("nRF5 802154 radio started (channel: %d)",
|
||||
nrf5_radio->channel);
|
||||
nrf_802154_channel_get());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -319,7 +331,7 @@ static int nrf5_stop(struct device *dev)
|
|||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (!nrf_drv_radio802154_sleep()) {
|
||||
if (!nrf_802154_sleep()) {
|
||||
LOG_ERR("Error while stopping radio");
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -333,14 +345,15 @@ static void nrf5_radio_irq(void *arg)
|
|||
{
|
||||
ARG_UNUSED(arg);
|
||||
|
||||
nrf_drv_radio802154_irq_handler();
|
||||
nrf_802154_radio_irq_handler();
|
||||
}
|
||||
|
||||
static void nrf5_config(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
IRQ_CONNECT(NRF5_IRQ_RADIO_IRQn, 0, nrf5_radio_irq, NULL, 0);
|
||||
IRQ_CONNECT(NRF5_IRQ_RADIO_IRQn, NRF_802154_IRQ_PRIORITY,
|
||||
nrf5_radio_irq, NULL, 0);
|
||||
irq_enable(NRF5_IRQ_RADIO_IRQn);
|
||||
}
|
||||
|
||||
|
@ -348,20 +361,12 @@ static int nrf5_init(struct device *dev)
|
|||
{
|
||||
const struct nrf5_802154_config *nrf5_radio_cfg = NRF5_802154_CFG(dev);
|
||||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
struct device *clk_m16;
|
||||
|
||||
k_sem_init(&nrf5_radio->rx_wait, 0, 1);
|
||||
k_fifo_init(&nrf5_radio->rx_fifo);
|
||||
k_sem_init(&nrf5_radio->tx_wait, 0, 1);
|
||||
k_sem_init(&nrf5_radio->cca_wait, 0, 1);
|
||||
|
||||
clk_m16 = device_get_binding(CONFIG_CLOCK_CONTROL_NRF_M16SRC_DRV_NAME);
|
||||
if (!clk_m16) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
clock_control_on(clk_m16, NULL);
|
||||
|
||||
nrf_drv_radio802154_init();
|
||||
nrf_802154_init();
|
||||
|
||||
nrf5_radio_cfg->irq_config_func(dev);
|
||||
|
||||
|
@ -370,6 +375,8 @@ static int nrf5_init(struct device *dev)
|
|||
nrf5_rx_thread, dev, NULL, NULL,
|
||||
K_PRIO_COOP(2), 0, 0);
|
||||
|
||||
k_thread_name_set(&nrf5_radio->rx_thread, "802154 RX");
|
||||
|
||||
LOG_INF("nRF5 802154 radio initialized");
|
||||
|
||||
return 0;
|
||||
|
@ -380,45 +387,77 @@ static void nrf5_iface_init(struct net_if *iface)
|
|||
struct device *dev = net_if_get_device(iface);
|
||||
struct nrf5_802154_data *nrf5_radio = NRF5_802154_DATA(dev);
|
||||
|
||||
LOG_DBG("");
|
||||
|
||||
nrf5_get_eui64(nrf5_radio->mac);
|
||||
net_if_set_link_addr(iface,
|
||||
nrf5_radio->mac,
|
||||
sizeof(nrf5_radio->mac),
|
||||
net_if_set_link_addr(iface, nrf5_radio->mac, sizeof(nrf5_radio->mac),
|
||||
NET_LINK_IEEE802154);
|
||||
|
||||
nrf5_radio->iface = iface;
|
||||
|
||||
ieee802154_init(iface);
|
||||
}
|
||||
|
||||
/* nRF5 radio driver callbacks */
|
||||
|
||||
void nrf_drv_radio802154_received(u8_t *p_data, s8_t power, s8_t lqi)
|
||||
void nrf_802154_received_raw(uint8_t *data, int8_t power, uint8_t lqi)
|
||||
{
|
||||
nrf5_data.rx_psdu = p_data;
|
||||
nrf5_data.rssi = power;
|
||||
nrf5_data.lqi = lqi;
|
||||
for (u32_t i = 0; i < ARRAY_SIZE(nrf5_data.rx_frames); i++) {
|
||||
if (nrf5_data.rx_frames[i].psdu != NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
k_sem_give(&nrf5_data.rx_wait);
|
||||
nrf5_data.rx_frames[i].psdu = data;
|
||||
nrf5_data.rx_frames[i].rssi = power;
|
||||
nrf5_data.rx_frames[i].lqi = lqi;
|
||||
|
||||
k_fifo_put(&nrf5_data.rx_fifo, &nrf5_data.rx_frames[i]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
__ASSERT(false, "Not enough rx frames allocated for 15.4 driver");
|
||||
}
|
||||
|
||||
void nrf_drv_radio802154_transmitted(bool pending_bit)
|
||||
void nrf_802154_receive_failed(nrf_802154_rx_error_t error)
|
||||
{
|
||||
ARG_UNUSED(pending_bit);
|
||||
/* Intentionally empty. */
|
||||
}
|
||||
|
||||
void nrf_802154_transmitted_raw(const uint8_t *frame, uint8_t *ack,
|
||||
int8_t power, uint8_t lqi)
|
||||
{
|
||||
ARG_UNUSED(frame);
|
||||
ARG_UNUSED(power);
|
||||
ARG_UNUSED(lqi);
|
||||
|
||||
nrf5_data.tx_result = NRF_802154_TX_ERROR_NONE;
|
||||
nrf5_data.ack = ack;
|
||||
|
||||
nrf5_data.tx_success = true;
|
||||
k_sem_give(&nrf5_data.tx_wait);
|
||||
}
|
||||
|
||||
void nrf_drv_radio802154_busy_channel(void)
|
||||
void nrf_802154_transmit_failed(const uint8_t *frame,
|
||||
nrf_802154_tx_error_t error)
|
||||
{
|
||||
ARG_UNUSED(frame);
|
||||
|
||||
nrf5_data.tx_result = error;
|
||||
|
||||
k_sem_give(&nrf5_data.tx_wait);
|
||||
}
|
||||
|
||||
void nrf_drv_radio802154_energy_detected(s8_t result)
|
||||
void nrf_802154_cca_done(bool channel_free)
|
||||
{
|
||||
nrf5_data.channel_ed = result;
|
||||
nrf5_data.channel_free = channel_free;
|
||||
|
||||
k_sem_give(&nrf5_data.cca_wait);
|
||||
}
|
||||
|
||||
void nrf_802154_cca_failed(nrf_802154_cca_error_t error)
|
||||
{
|
||||
ARG_UNUSED(error);
|
||||
|
||||
nrf5_data.channel_free = false;
|
||||
|
||||
k_sem_give(&nrf5_data.cca_wait);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,54 +8,63 @@
|
|||
#ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_NRF5_H_
|
||||
#define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_NRF5_H_
|
||||
|
||||
#include <linker/sections.h>
|
||||
#include <atomic.h>
|
||||
#include "nrf_802154_config.h"
|
||||
|
||||
#define NRF5_FCS_LENGTH (2)
|
||||
#define NRF5_PSDU_LENGTH (125)
|
||||
#define NRF5_PHR_LENGTH (1)
|
||||
|
||||
struct nrf5_802154_rx_frame {
|
||||
void *fifo_reserved; /* 1st word reserved for use by fifo. */
|
||||
u8_t *psdu; /* Pointer to a received frame. */
|
||||
u8_t lqi; /* Last received frame LQI value. */
|
||||
s8_t rssi; /* Last received frame RSSI value. */
|
||||
};
|
||||
|
||||
struct nrf5_802154_data {
|
||||
/* Pointer to the network interface. */
|
||||
struct net_if *iface;
|
||||
/* Pointer to a received frame. */
|
||||
u8_t *rx_psdu;
|
||||
/* TX buffer. First byte is PHR (length), remaining bytes are
|
||||
* MPDU data.
|
||||
*/
|
||||
u8_t tx_psdu[NRF5_PHR_LENGTH + NRF5_PSDU_LENGTH];
|
||||
|
||||
/* 802.15.4 HW address. */
|
||||
u8_t mac[8];
|
||||
|
||||
/* RX thread stack. */
|
||||
K_THREAD_STACK_MEMBER(rx_stack, CONFIG_IEEE802154_NRF5_RX_STACK_SIZE);
|
||||
/* RX thread control block */
|
||||
|
||||
/* RX thread control block. */
|
||||
struct k_thread rx_thread;
|
||||
|
||||
/* RX fifo queue. */
|
||||
struct k_fifo rx_fifo;
|
||||
|
||||
/* Buffers for passing received frame pointers and data to the
|
||||
* RX thread via rx_fifo object.
|
||||
*/
|
||||
struct nrf5_802154_rx_frame rx_frames[NRF_802154_RX_BUFFERS];
|
||||
|
||||
/* CCA complete sempahore. Unlocked when CCA is complete. */
|
||||
struct k_sem cca_wait;
|
||||
/* RX synchronization semaphore. Unlocked when frame has been
|
||||
* received.
|
||||
*/
|
||||
struct k_sem rx_wait;
|
||||
|
||||
/* CCA result. Holds information whether channel is free or not. */
|
||||
bool channel_free;
|
||||
|
||||
/* TX synchronization semaphore. Unlocked when frame has been
|
||||
* sent or CCA failed.
|
||||
* sent or send procedure failed.
|
||||
*/
|
||||
struct k_sem tx_wait;
|
||||
/* TX result. Set to 1 on success, 0 otherwise. */
|
||||
bool tx_success;
|
||||
|
||||
/* CCA channel energy. Unit as per 802.15.4-2006 specification. */
|
||||
s8_t channel_ed;
|
||||
/* TX buffer. First byte is PHR (length), remaining bytes are
|
||||
* MPDU data.
|
||||
*/
|
||||
u8_t tx_psdu[NRF5_PHR_LENGTH + NRF5_PSDU_LENGTH + NRF5_FCS_LENGTH];
|
||||
|
||||
/* TX power, in dBm, to be used when sending a frame. */
|
||||
s8_t txpower;
|
||||
/* 802.15.4 channel to be used when sending a frame. */
|
||||
u8_t channel;
|
||||
/* TX result, updated in radio transmit callbacks. */
|
||||
u8_t tx_result;
|
||||
|
||||
/* Last received frame LQI value. */
|
||||
u8_t lqi;
|
||||
/* Last received frame RSSI value. */
|
||||
s8_t rssi;
|
||||
/* A pointer to the received ACK frame. May be NULL if no ACK was
|
||||
* requested/received.
|
||||
*/
|
||||
u8_t *ack;
|
||||
};
|
||||
|
||||
#endif /* ZEPHYR_DRIVERS_IEEE802154_IEEE802154_NRF5_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue