G4 EXTI public API implementation.
More...
G4 EXTI public API implementation.
- Author
- Ronak Jain (jain7.nosp@m.17@p.nosp@m.urdue.nosp@m..edu)
◆ EXTI0_IRQHandler()
| void EXTI0_IRQHandler |
( |
void | | ) |
|
◆ EXTI15_10_IRQHandler()
| void EXTI15_10_IRQHandler |
( |
void | | ) |
|
◆ EXTI1_IRQHandler()
| void EXTI1_IRQHandler |
( |
void | | ) |
|
◆ EXTI2_IRQHandler()
| void EXTI2_IRQHandler |
( |
void | | ) |
|
◆ EXTI3_IRQHandler()
| void EXTI3_IRQHandler |
( |
void | | ) |
|
◆ EXTI4_IRQHandler()
| void EXTI4_IRQHandler |
( |
void | | ) |
|
◆ EXTI9_5_IRQHandler()
| void EXTI9_5_IRQHandler |
( |
void | | ) |
|
◆ exti_dispatch()
| static void exti_dispatch |
( |
uint32_t | line_mask | ) |
|
|
static |
◆ exti_validate_config()
◆ PHAL_EXTI_callback()
| void PHAL_EXTI_callback |
( |
GPIO_TypeDef * | bank, |
|
|
uint8_t | pin ) |
Weak callback invoked for each pending GPIO EXTI line.
Called from an EXTI interrupt handler. Keep overrides short and non-blocking. For both-edge triggers, sample the GPIO input to determine its current level. The default implementation does nothing.
- Parameters
-
| bank | GPIO port that generated the interrupt |
| pin | Pin number, 0-15 |
◆ PHAL_EXTI_deinit()
| bool PHAL_EXTI_deinit |
( |
GPIO_TypeDef * | bank, |
|
|
uint8_t | pin ) |
Disable a configured GPIO EXTI line.
The line is disabled only when its current SYSCFG route matches bank/pin. A shared NVIC interrupt is disabled when no GPIO EXTI lines in its group remain enabled.
- Parameters
-
| bank | GPIO port containing the input pin |
| pin | Pin number, 0-15 |
- Returns
- true if the route matched and the line was disabled; false otherwise
◆ PHAL_EXTI_init()
Configure GPIO EXTI lines from a configuration table.
Configure the corresponding GPIO pins as inputs separately with PHAL_GPIO_init(). Only pins 0-15 can be used, and each pin number can be routed from one GPIO port at a time. Configuring a line selects its port, trigger edge, interrupt mask, and shared NVIC interrupt. Entries are all validated before any line is changed; duplicate pin numbers are rejected. The IRQ priority is set from each entry's irq_priority. Lines 0-4 each have a separate IRQ; lines 5-9 share EXTI9_5_IRQn and lines 10-15 share EXTI15_10_IRQn. Entries sharing a vector must specify the same priority, including any already-enabled sibling lines. Priorities must fit the device's implemented NVIC priority bits.
- Parameters
-
| config | Array of line configurations; may be nullptr when config_len is zero |
| config_len | Number of entries in config |
- Returns
- true if every configuration is valid and applied; false otherwise