mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 19:20:41 +00:00
Custom xPortInIsrContext() for nRF52/RP2xx0
This commit is contained in:
@@ -149,3 +149,6 @@
|
|||||||
// No serial ports on this board - ONLY use segger in memory console
|
// No serial ports on this board - ONLY use segger in memory console
|
||||||
#define USE_SEGGER
|
#define USE_SEGGER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Detect if running in ISR context (ARM Cortex-M4)
|
||||||
|
#define xPortInIsrContext() ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0 ? pdFALSE : pdTRUE)
|
||||||
|
|||||||
@@ -35,4 +35,7 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_RP2040_FEATHER_RFM95
|
#define HW_VENDOR meshtastic_HardwareModel_RP2040_FEATHER_RFM95
|
||||||
#elif defined(PRIVATE_HW)
|
#elif defined(PRIVATE_HW)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW
|
#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Detect if running in ISR context (ARM Cortex-M33 / RISC-V)
|
||||||
|
#define xPortInIsrContext() (__get_current_exception() == 0 ? pdFALSE : pdTRUE)
|
||||||
|
|||||||
Reference in New Issue
Block a user