See xmega_pmic_quickstart.
This is a low-level driver implementation for the AVR XMEGA Programmable Multilevel Interrupt Controller.
- Zu beachten
- If these functions are used in interrupt service routines (ISRs), any non-ISR code or ISR code for lower level interrupts must ensure that the operations are atomic, i.e., by disabling interrupts during the function calls.
Interrupt level bitmasks.
- Zu beachten
- These may be OR'ed, e.g., if multiple levels are to be enabled or disabled.
Aufzählungswerte |
---|
PMIC_LVL_LOW |
Low-level interrupts.
|
PMIC_LVL_MEDIUM |
Medium-level interrupts.
|
PMIC_LVL_HIGH |
High-level interrupts.
|
PMIC_LVL_NMI |
Non-maskable interrupts.
- Zu beachten
- These cannot be enabled nor disabled.
|
Definiert in Zeile 96 der Datei pmic.h.
Interrupt scheduling schemes.
Aufzählungswerte |
---|
PMIC_SCH_FIXED_PRIORITY |
Default, fixed priority scheduling.
|
PMIC_SCH_ROUND_ROBIN |
Round-robin scheduling.
|
PMIC_NR_OF_SCHEDULES |
Number of interrupt scheduling schemes.
|
Definiert in Zeile 115 der Datei pmic.h.
Interrupt vector locations.
Aufzählungswerte |
---|
PMIC_VEC_APPLICATION |
Application section.
|
PMIC_VEC_BOOT |
Boot section.
|
PMIC_NR_OF_VECTORS |
Number of interrupt vector locations.
|
Definiert in Zeile 108 der Datei pmic.h.
static void pmic_disable_level |
( |
enum pmic_level |
level | ) |
|
|
inlinestatic |
Disable interrupts with specified level(s).
- Parameter
-
level | Interrupt level(s) to disable. |
Definiert in Zeile 150 der Datei pmic.h.
static void pmic_enable_level |
( |
enum pmic_level |
level | ) |
|
|
inlinestatic |
Enable interrupts with specified level(s).
- Parameter
-
level | Interrupt level(s) to enable. |
Definiert in Zeile 138 der Datei pmic.h.
static enum pmic_level pmic_get_enabled_levels |
( |
void |
| ) |
|
|
inlinestatic |
Get currently enabled level(s)
- Rückgabe
- Bitmask with currently enabled levels.
Definiert in Zeile 176 der Datei pmic.h.
static void pmic_init |
( |
void |
| ) |
|
|
inlinestatic |
Initialize the PMIC.
Enables all interrupt levels, with vectors located in the application section and fixed priority scheduling.
Definiert in Zeile 127 der Datei pmic.h.
static bool pmic_level_is_enabled |
( |
enum pmic_level |
level | ) |
|
|
inlinestatic |
Check if specified interrupt level(s) is enabled.
- Parameter
-
level | Interrupt level(s) to check. |
- Rückgabe
- True if interrupt level(s) is enabled.
Definiert in Zeile 164 der Datei pmic.h.
static bool pmic_level_is_executing |
( |
enum pmic_level |
level | ) |
|
|
inlinestatic |
Check if an interrupt level(s) is currently executing.
- Parameter
-
level | Interrupt level(s) to check. |
- Rückgabe
- True if interrupt level(s) is currently executing.
Definiert in Zeile 189 der Datei pmic.h.
Set interrupt scheduling for low-level interrupts.
- Parameter
-
schedule | Interrupt scheduling method to set. |
- Zu beachten
- The low-priority vector, INTPRI, must be set to 0 when round-robin scheduling is disabled to return to default interrupt priority order.
Definiert in Zeile 202 der Datei pmic.h.
static void pmic_set_vector_location |
( |
enum pmic_vector |
vector | ) |
|
|
inlinestatic |
Set location of interrupt vectors.
- Parameter
-
vector | Location to use for interrupt vectors. |
Definiert in Zeile 226 der Datei pmic.h.