|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Macros | |
| #define | ARCH_IRQ_CONNECT(irq, pri, isr, arg, flags) |
| #define | ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) |
| #define | ARCH_ISR_DIRECT_PM() |
| #define | ARCH_ISR_DIRECT_HEADER() |
| #define | ARCH_ISR_DIRECT_FOOTER(swap) |
| #define | ARCH_ISR_DIRECT_DECLARE(name) |
| #define | ARCH_EXCEPT(reason_p) |
| Generate a software induced fatal error. | |
Functions | |
| static bool | arch_is_in_isr (void) |
| Test if the current context is in interrupt context. | |
| static unsigned int | arch_irq_lock (void) |
| Lock interrupts on the current CPU. | |
| static void | arch_irq_unlock (unsigned int key) |
| Unlock interrupts on the current CPU. | |
| static bool | arch_irq_unlocked (unsigned int key) |
| Test if calling arch_irq_unlock() with this key would unlock irqs. | |
| static bool | arch_cpu_irqs_are_enabled (void) |
| Probe the current CPU overall interrupt controller lock state without modifying it. | |
| void | arch_irq_disable (unsigned int irq) |
| Disable the specified interrupt line. | |
| void | arch_irq_enable (unsigned int irq) |
| Enable the specified interrupt line. | |
| int | arch_irq_is_enabled (unsigned int irq) |
| Test if an interrupt line is enabled. | |
| int | arch_irq_connect_dynamic (unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags) |
| Arch-specific hook to install a dynamic interrupt. | |
| int | arch_irq_disconnect_dynamic (unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags) |
| Arch-specific hook to dynamically uninstall a shared interrupt. | |
| unsigned int | arch_irq_allocate (void) |
| Arch-specific hook for allocating IRQs. | |
| void | arch_irq_set_used (unsigned int irq) |
| Arch-specific hook for declaring an IRQ being used. | |
| bool | arch_irq_is_used (unsigned int irq) |
| Arch-specific hook for checking if an IRQ is being used already. | |
| #define ARCH_EXCEPT | ( | reason_p | ) |
#include <zephyr/arch/arch_interface.h>
Generate a software induced fatal error.
If the caller is running in user mode, only K_ERR_KERNEL_OOPS or K_ERR_STACK_CHK_FAIL may be induced.
This should ideally generate a software trap, with exception context indicating state when this was invoked. General purpose register state at the time of trap should not be disturbed from the calling context.
| reason_p | K_ERR_ scoped reason code for the fatal error. |
| #define ARCH_IRQ_CONNECT | ( | irq, | |
| pri, | |||
| isr, | |||
| arg, | |||
| flags ) |
#include <zephyr/arch/arch_interface.h>
| #define ARCH_IRQ_DIRECT_CONNECT | ( | irq_p, | |
| priority_p, | |||
| isr_p, | |||
| flags_p ) |
#include <zephyr/arch/arch_interface.h>
| #define ARCH_ISR_DIRECT_DECLARE | ( | name | ) |
#include <zephyr/arch/arch_interface.h>
| #define ARCH_ISR_DIRECT_FOOTER | ( | swap | ) |
#include <zephyr/arch/arch_interface.h>
| #define ARCH_ISR_DIRECT_HEADER | ( | ) |
#include <zephyr/arch/arch_interface.h>
| #define ARCH_ISR_DIRECT_PM | ( | ) |
#include <zephyr/arch/arch_interface.h>
|
inlinestatic |
#include <zephyr/arch/arch_interface.h>
Probe the current CPU overall interrupt controller lock state without modifying it.
Unlike arch_irq_unlocked() which inspects a saved key, this reports the instantaneous state of the calling CPU's overall interrupt enable.
| unsigned int arch_irq_allocate | ( | void | ) |
#include <zephyr/arch/arch_interface.h>
Arch-specific hook for allocating IRQs.
Note: disable/enable IRQ relevantly inside the implementation of such function to avoid concurrency issues. Also, an allocated IRQ is assumed to be used thus a following
| int arch_irq_connect_dynamic | ( | unsigned int | irq, |
| unsigned int | priority, | ||
| void(* | routine )(const void *parameter), | ||
| const void * | parameter, | ||
| uint32_t | flags ) |
#include <zephyr/arch/arch_interface.h>
Arch-specific hook to install a dynamic interrupt.
| irq | IRQ line number |
| priority | Interrupt priority |
| routine | Interrupt service routine |
| parameter | ISR parameter |
| flags | Arch-specific IRQ configuration flag |
| void arch_irq_disable | ( | unsigned int | irq | ) |
#include <zephyr/arch/arch_interface.h>
Disable the specified interrupt line.
| int arch_irq_disconnect_dynamic | ( | unsigned int | irq, |
| unsigned int | priority, | ||
| void(* | routine )(const void *parameter), | ||
| const void * | parameter, | ||
| uint32_t | flags ) |
#include <zephyr/arch/arch_interface.h>
Arch-specific hook to dynamically uninstall a shared interrupt.
If the interrupt is not being shared, then the associated _sw_isr_table entry will be replaced by (NULL, z_irq_spurious) (default entry).
| irq | IRQ line number |
| priority | Interrupt priority |
| routine | Interrupt service routine |
| parameter | ISR parameter |
| flags | Arch-specific IRQ configuration flag |
| void arch_irq_enable | ( | unsigned int | irq | ) |
| int arch_irq_is_enabled | ( | unsigned int | irq | ) |
#include <zephyr/arch/arch_interface.h>
Test if an interrupt line is enabled.
#include <zephyr/arch/arch_interface.h>
Arch-specific hook for checking if an IRQ is being used already.
| irq | the IRQ to check |
|
inlinestatic |
| void arch_irq_set_used | ( | unsigned int | irq | ) |
#include <zephyr/arch/arch_interface.h>
Arch-specific hook for declaring an IRQ being used.
Note: disable/enable IRQ relevantly inside the implementation of such function to avoid concurrency issues.
| irq | the IRQ to declare being used |
|
inlinestatic |
#include <zephyr/arch/arch_interface.h>
Test if calling arch_irq_unlock() with this key would unlock irqs.
| key | value returned by arch_irq_lock() |
|
inlinestatic |
#include <kernel_arch_interface.h>
Test if the current context is in interrupt context.
XXX: This is inconsistently handled among arches wrt exception context See: #17656