drivers: ieee802154: Fix problem with binding IRQ handlers in shim layer
The shim layer could in some circumstances not be properly configured which would result in an unbound radio interrupt handler. Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
This commit is contained in:
parent
dbd66c8096
commit
ff1594cf05
3 changed files with 8 additions and 12 deletions
|
@ -33,7 +33,7 @@ config IEEE802154_NRF5_INIT_PRIO
|
||||||
you know what you are doing.
|
you know what you are doing.
|
||||||
|
|
||||||
config IEEE802154_NRF5_EXT_IRQ_MGMT
|
config IEEE802154_NRF5_EXT_IRQ_MGMT
|
||||||
bool "Radio IRQ is managed by an external module"
|
bool
|
||||||
help
|
help
|
||||||
The driver may manage radio IRQs by itself, or use an external
|
The driver may manage radio IRQs by itself, or use an external
|
||||||
radio IRQ provider. When radio IRQs are managed by an external
|
radio IRQ provider. When radio IRQs are managed by an external
|
||||||
|
|
|
@ -542,7 +542,7 @@ static int nrf5_stop(const struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT
|
#if !IS_ENABLED(CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT)
|
||||||
static void nrf5_radio_irq(void *arg)
|
static void nrf5_radio_irq(void *arg)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(arg);
|
ARG_UNUSED(arg);
|
||||||
|
@ -555,7 +555,7 @@ static void nrf5_irq_config(const struct device *dev)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(dev);
|
ARG_UNUSED(dev);
|
||||||
|
|
||||||
#ifndef CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT
|
#if !IS_ENABLED(CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT)
|
||||||
IRQ_CONNECT(RADIO_IRQn, NRF_802154_IRQ_PRIORITY,
|
IRQ_CONNECT(RADIO_IRQn, NRF_802154_IRQ_PRIORITY,
|
||||||
nrf5_radio_irq, NULL, 0);
|
nrf5_radio_irq, NULL, 0);
|
||||||
irq_enable(RADIO_IRQn);
|
irq_enable(RADIO_IRQn);
|
||||||
|
|
|
@ -80,15 +80,11 @@ zephyr_compile_definitions(
|
||||||
NRF_802154_ACK_TIMEOUT_ENABLED=1
|
NRF_802154_ACK_TIMEOUT_ENABLED=1
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CONFIG_IEEE802154_NRF5 OR NOT CONFIG_NRF_802154_SL_OPENSOURCE)
|
if (NOT CONFIG_IEEE802154_NRF5 AND NOT CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT)
|
||||||
zephyr_compile_definitions(
|
zephyr_compile_definitions(NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=1)
|
||||||
NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
|
else ()
|
||||||
)
|
zephyr_compile_definitions(NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0)
|
||||||
else()
|
endif ()
|
||||||
zephyr_compile_definitions(
|
|
||||||
NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=1
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (CONFIG_NRF_802154_SL_OPENSOURCE OR CONFIG_SOC_SERIES_NRF53X)
|
if (CONFIG_NRF_802154_SL_OPENSOURCE OR CONFIG_SOC_SERIES_NRF53X)
|
||||||
zephyr_compile_definitions(
|
zephyr_compile_definitions(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue