STM32 RTOS
0.2.3
Bare-metal preemptive RTOS for STM32F446RE
Toggle main menu visibility
Loading...
Searching...
No Matches
nvic.h
Go to the documentation of this file.
1
21
#ifndef NVIC_H
22
#define NVIC_H
23
24
#include "
driver_status.h
"
25
#include "
nvic_reg.h
"
26
#include "
scb_reg.h
"
27
28
#include <stdint.h>
29
34
36
#define NVIC_PRIORITY_MAX ((1U << NVIC_PRIO_BITS) - 1U)
37
50
DRIVER_MUST_CHECK
DriverStatus_e
nvicEnableIrq
(
NvicRegisters_t
*nvic,
IRQn_e
irqn);
51
63
DRIVER_MUST_CHECK
DriverStatus_e
nvicDisableIrq
(
NvicRegisters_t
*nvic,
IRQn_e
irqn);
64
72
DRIVER_MUST_CHECK
DriverStatus_e
nvicSetPending
(
NvicRegisters_t
*nvic,
IRQn_e
irqn);
73
81
DRIVER_MUST_CHECK
DriverStatus_e
nvicClearPending
(
NvicRegisters_t
*nvic,
IRQn_e
irqn);
82
91
DRIVER_MUST_CHECK
DriverStatus_e
nvicSetPriority
(
NvicRegisters_t
*nvic,
IRQn_e
irqn,
92
uint32_t priority);
93
102
DRIVER_MUST_CHECK
DriverStatus_e
nvicGetPriority
(
const
NvicRegisters_t
*nvic,
IRQn_e
irqn,
103
uint32_t *priority);
104
121
DRIVER_MUST_CHECK
DriverStatus_e
nvicSetSystemHandlerPriority
(
ScbRegisters_t
*scb,
IRQn_e
irqn,
122
uint32_t priority);
123
125
126
#endif
/* NVIC_H */
driver_status.h
The status every fallible driver function returns.
DriverStatus_e
DriverStatus_e
Outcome of a driver call: a category for control flow, not a diagnosis.
Definition
driver_status.h:32
DRIVER_MUST_CHECK
#define DRIVER_MUST_CHECK
Make ignoring a function's result a compile error (with -Werror).
Definition
driver_status.h:22
nvicDisableIrq
DRIVER_MUST_CHECK DriverStatus_e nvicDisableIrq(NvicRegisters_t *nvic, IRQn_e irqn)
Disable a device interrupt.
Definition
nvic.c:111
nvicClearPending
DRIVER_MUST_CHECK DriverStatus_e nvicClearPending(NvicRegisters_t *nvic, IRQn_e irqn)
Clear a device interrupt's pending state (ICPR).
Definition
nvic.c:136
nvicEnableIrq
DRIVER_MUST_CHECK DriverStatus_e nvicEnableIrq(NvicRegisters_t *nvic, IRQn_e irqn)
Enable a device interrupt.
Definition
nvic.c:97
nvicGetPriority
DRIVER_MUST_CHECK DriverStatus_e nvicGetPriority(const NvicRegisters_t *nvic, IRQn_e irqn, uint32_t *priority)
Read a device interrupt's priority, as nvicSetPriority() takes it.
Definition
nvic.c:165
nvicSetPending
DRIVER_MUST_CHECK DriverStatus_e nvicSetPending(NvicRegisters_t *nvic, IRQn_e irqn)
Make a device interrupt pending (ISPR).
Definition
nvic.c:124
nvicSetPriority
DRIVER_MUST_CHECK DriverStatus_e nvicSetPriority(NvicRegisters_t *nvic, IRQn_e irqn, uint32_t priority)
Set a device interrupt's priority.
Definition
nvic.c:148
nvicSetSystemHandlerPriority
DRIVER_MUST_CHECK DriverStatus_e nvicSetSystemHandlerPriority(ScbRegisters_t *scb, IRQn_e irqn, uint32_t priority)
Set a configurable system handler's priority (SCB SHPR1-3).
Definition
nvic.c:182
IRQn_e
IRQn_e
Interrupt and exception numbers, in RM0390 vector-table order.
Definition
nvic_reg.h:57
nvic_reg.h
NVIC registers and the STM32F446 interrupt numbers (PM0214, NVIC chapter).
scb_reg.h
SCB and FPU context-control registers (PM0214, SCB and FPU chapters).
NvicRegisters_t
NVIC register block.
Definition
nvic_reg.h:29
ScbRegisters_t
SCB register block.
Definition
scb_reg.h:41
drivers
inc
nvic.h
Generated by
1.18.0