|
STM32 Traffic Control
|
External Interrupt (EXTI) configuration for vehicle detection inputs. More...
Macros | |
| #define | GPIOCEN (1U<<2) |
| #define | SYSCFGEN (1U<<14) |
Functions | |
| void | exti_init (void) |
| Initializes external interrupt inputs for vehicle detection buttons. | |
External Interrupt (EXTI) configuration for vehicle detection inputs.
This file configures GPIO input pins and EXTI lines used for detecting button press events representing vehicle arrivals at traffic lights.
| #define GPIOCEN (1U<<2) |
| #define SYSCFGEN (1U<<14) |
| void exti_init | ( | void | ) |
Initializes external interrupt inputs for vehicle detection buttons.
This function configures GPIOC pins PC10–PC13 as input signals with internal pull-up resistors and maps them to EXTI lines 10–13. Falling edge triggers are enabled to detect button press events.
The EXTI lines are unmasked and routed through the NVIC using the EXTI15_10 interrupt channel.