mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/mynewt-core: use irq_is_enabled()
This commit is contained in:
parent
b160e43233
commit
c5f0516114
@ -6,12 +6,3 @@ USEMODULE += ztimer_msec
|
|||||||
USEMODULE += mynewt-core
|
USEMODULE += mynewt-core
|
||||||
|
|
||||||
DEFAULT_MODULE += auto_init_mynewt-core
|
DEFAULT_MODULE += auto_init_mynewt-core
|
||||||
|
|
||||||
# MyNewt `os_hw_is_in_critical` function needs to know whether ISR are masked
|
|
||||||
# of if the function is being called in ISR context. There is no such function
|
|
||||||
# in RIOT except for arm (__get_PRIMASK), therefore unless a similar function
|
|
||||||
# is provided for other arch, this port is currently only enabled for those arch.
|
|
||||||
# Note: that this should not be a hindrance since nimble only works on nordic
|
|
||||||
# and uwb-core breakouts are all arm.
|
|
||||||
FEATURES_REQUIRED += arch_arm
|
|
||||||
FEATURES_BLACKLIST += arch_arm7
|
|
||||||
|
@ -117,7 +117,7 @@ static inline void os_hw_exit_critical(uint32_t ctx)
|
|||||||
*/
|
*/
|
||||||
static inline bool os_hw_is_in_critical(void)
|
static inline bool os_hw_is_in_critical(void)
|
||||||
{
|
{
|
||||||
return (irq_is_in() || __get_PRIMASK());
|
return (irq_is_in() || !irq_is_enabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mynewt components (not abstracted in NPL or DPL) */
|
/* Mynewt components (not abstracted in NPL or DPL) */
|
||||||
|
Loading…
Reference in New Issue
Block a user