|
STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
|
EXTI driver: route a GPIO pin to an EXTI line, choose its edges, and manage its interrupt and pending bit. More...
#include "driver_status.h"#include "exti_reg.h"#include "gpio_reg.h"#include "syscfg_reg.h"#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | EXTI_LINE_MAX (22U) |
| Highest EXTI line on the F446. | |
| #define | EXTI_GPIO_LINE_MAX (15U) |
| Highest line fed by a GPIO pin. | |
Typedefs | |
| typedef enum ExtiEdge_e | ExtiEdge_e |
| Which edges of a line's input set its pending bit. | |
Enumerations | |
| enum | ExtiEdge_e { EXTI_EDGE_RISING = 1 , EXTI_EDGE_FALLING = 2 , EXTI_EDGE_BOTH = 3 } |
| Which edges of a line's input set its pending bit. More... | |
Functions | |
| DRIVER_MUST_CHECK DriverStatus_e | extiSelectPort (SyscfgRegisters_t *syscfg, uint32_t line, const GpioRegisters_t *port) |
Route GPIO pin line of port to EXTI line line. | |
| DRIVER_MUST_CHECK DriverStatus_e | extiConfigure (ExtiRegisters_t *exti, uint32_t line, ExtiEdge_e edge) |
Set which edges trigger line; the other edge is cleared. | |
| DRIVER_MUST_CHECK DriverStatus_e | extiEnableInterrupt (ExtiRegisters_t *exti, uint32_t line) |
Unmask line's interrupt (IMR). | |
| DRIVER_MUST_CHECK DriverStatus_e | extiDisableInterrupt (ExtiRegisters_t *exti, uint32_t line) |
Mask line's interrupt (IMR). | |
| DRIVER_MUST_CHECK DriverStatus_e | extiTriggerSoftware (ExtiRegisters_t *exti, uint32_t line) |
Raise line's interrupt from software (SWIER). | |
| DRIVER_MUST_CHECK DriverStatus_e | extiIsPending (const ExtiRegisters_t *exti, uint32_t line, bool *pending) |
Report whether line's pending bit (PR) is set. | |
| DRIVER_MUST_CHECK DriverStatus_e | extiClearPending (ExtiRegisters_t *exti, uint32_t line) |
Clear line's pending bit, and its SWIER bit with it. | |
EXTI driver: route a GPIO pin to an EXTI line, choose its edges, and manage its interrupt and pending bit.
Lines 0-15 come from GPIO pin n of the port extiSelectPort() picks; lines 16-22 are the internal sources in exti_reg.h. Line 19 has no source on the F446. Lines 0-4 have their own NVIC vector; 5-9 share EXTI9_5_IRQn and 10-15 share EXTI15_10_IRQn, so a shared handler checks each line with extiIsPending(). The B1 button (PC13), falling edge:
Event mode (EMR, for WFE) is not offered: nothing uses it yet.
Definition in file exti.h.