Skip to content

Commit

Permalink
modules: hal_nordic: nrf_802154: remove magic number
Browse files Browse the repository at this point in the history
This commit replaces a magic number in the definition of serialization
ring buffer length with a macro provided by the 802.15.4 driver.

Signed-off-by: Jędrzej Ciupis <[email protected]>
  • Loading branch information
Jędrzej Ciupis authored and carlescufi committed Dec 13, 2023
1 parent 7afeb62 commit 00f7c0e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <zephyr/device.h>
#include <zephyr/logging/log.h>

#include "nrf_802154.h"
#include "nrf_802154_spinel_backend_callouts.h"
#include "nrf_802154_serialization_error.h"
#include "../../spinel_base/spinel.h"
Expand Down Expand Up @@ -74,7 +75,7 @@ nrf_802154_ser_err_t nrf_802154_backend_init(void)
#define SEND_THREAD_STACK_SIZE 1024

/* Make the ring buffer long enough to hold all notifications that the driver can produce */
#define RING_BUFFER_LEN (CONFIG_NRF_802154_RX_BUFFERS + 10)
#define RING_BUFFER_LEN (NRF_802154_MAX_PENDING_NOTIFICATIONS + 1)

static K_SEM_DEFINE(send_sem, 0, RING_BUFFER_LEN);
K_THREAD_STACK_DEFINE(send_thread_stack, SEND_THREAD_STACK_SIZE);
Expand Down

0 comments on commit 00f7c0e

Please sign in to comment.