|
SmartSnippets DA1459x SDK
|
Interrupt priority configuration. More...
Files | |
| file | interrupts.h |
| Interrupt priority configuration. | |
Functions | |
| void | set_interrupt_priorities (const int8_t prios[]) |
| Setup interrupt priorities. More... | |
| __STATIC_FORCEINLINE bool | in_interrupt (void) |
| Check whether running in interrupt context. More... | |
Variables | |
| const int8_t | __dialog_interrupt_priorities [] |
| Default interrupt priorities table. More... | |
Interrupt priority configuration.
| __STATIC_FORCEINLINE bool in_interrupt | ( | void | ) |
Check whether running in interrupt context.
| void set_interrupt_priorities | ( | const int8_t | prios[] | ) |
Setup interrupt priorities.
When CPU is reset all interrupts have some priority setup. Reset -3 NMI -2 HardFault -1 All other interrupts have configurable priority that is set to 0. If some interrupts should have priority other then default, this function should be called. Argument prios can specify only those interrupts that need to have value other than default. For memory efficiency table with priorities for each interrupt consist of interrupt priority tag PRIORITY_x followed by interrupts that should have this priority, interrupts names are from enum IRQn_Type.
Most convenient way to prepare such table is to use macros like in example below:
Table __dialog_interrupt_priorities can now be used to call this function. Table can specify all interrupts or only those that need to be changed.
| [in] | prios | table with interrupts and priorities to setup |
| const int8_t __dialog_interrupt_priorities[] |
Default interrupt priorities table.
1.8.16