Skip to content

Commit cac3850

Browse files
Jędrzej Ciupisnordicjm
authored andcommitted
[nrf fromtree] modules: hal_nordic: nrf_802154: remove magic number
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]> (cherry picked from commit 00f7c0e)
1 parent 14a3d4d commit cac3850

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_backend_ipc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <zephyr/device.h>
1010
#include <zephyr/logging/log.h>
1111

12+
#include "nrf_802154.h"
1213
#include "nrf_802154_spinel_backend_callouts.h"
1314
#include "nrf_802154_serialization_error.h"
1415
#include "../../spinel_base/spinel.h"
@@ -74,7 +75,7 @@ nrf_802154_ser_err_t nrf_802154_backend_init(void)
7475
#define SEND_THREAD_STACK_SIZE 1024
7576

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

7980
static K_SEM_DEFINE(send_sem, 0, RING_BUFFER_LEN);
8081
K_THREAD_STACK_DEFINE(send_thread_stack, SEND_THREAD_STACK_SIZE);

0 commit comments

Comments
 (0)