Skyward boardcore
|
Go to the source code of this file.
Functions | |
void | unexpectedInterrupt () |
void | Default_EXTI_Handler () |
void | __attribute__ ((weak)) EXTI0_IRQHandlerImpl() |
void | __attribute__ ((naked)) EXTI0_IRQHandler() |
void | __attribute__ ((used)) EXTI9_5_IRQHandlerImpl() |
constexpr unsigned | ConvertGPIO_BASEtoUnsigned (unsigned P) |
constexpr unsigned | GetEXTI_IRQn (unsigned N) |
constexpr unsigned | GetEXTICR_register_value (unsigned P, unsigned N) |
constexpr unsigned | GetEXTICR_register_mask (unsigned P, unsigned N) |
void | enableExternalInterrupt (unsigned int gpioPort, unsigned int gpioNum, InterruptTrigger trigger, unsigned int priority) |
Enables external interrupts on the provided pin. Remember to set the GPIO to input mode! | |
void | disableExternalInterrupt (unsigned int gpioPort, unsigned int gpioNum) |
Disables external interrupts on the provided pin. | |
void | changeInterruptTrigger (unsigned int gpioPort, unsigned int gpioNum, InterruptTrigger trigger) |
Changes interrupt trigger on an enabled interrupt. | |
void __attribute__ | ( | (naked) | ) |
Implementation of the IRQHandler that is triggered when external interrupt 0 is raised.
Implementation of the IRQHandler that is triggered when external interrupt 1 is raised.
Implementation of the IRQHandler that is triggered when external interrupt 2 is raised.
Implementation of the IRQHandler that is triggered when external interrupt 3 is raised.
Implementation of the IRQHandler that is triggered when external interrupt 4 is raised.
Implementation of the IRQHandler that is triggered when any external interrupt between 5 and 9 is raised.
Implementation of the IRQHandler that is triggered when any external interrupt between 10 and 15 is raised.
Definition at line 162 of file external_interrupts.cpp.
void __attribute__ | ( | (used) | ) |
Read from the PR register which interrupt is pending and call the corresponding IRQHandler. If no flag in the range covered by this IRQ is set, call default handler.
Definition at line 246 of file external_interrupts.cpp.
void __attribute__ | ( | (weak) | ) |
Declaration of a separate IRQHandler for each external interrupt. If no further implementation is provided, the Default_Handler will be called.
Definition at line 78 of file external_interrupts.cpp.
void changeInterruptTrigger | ( | unsigned int | gpioPort, |
unsigned int | gpioNum, | ||
InterruptTrigger | trigger ) |
Changes interrupt trigger on an enabled interrupt.
gpioPort | Port of the pin (eg: GPIOC_BASE) |
gpioNum | Pin number (eg: 4 for PC4) |
trigger | Interrupt detection trigger (rising edge, falling or both) |
Definition at line 411 of file external_interrupts.cpp.
|
constexpr |
Definition at line 321 of file external_interrupts.cpp.
void Default_EXTI_Handler | ( | ) |
Definition at line 68 of file external_interrupts.cpp.
void disableExternalInterrupt | ( | unsigned int | gpioPort, |
unsigned int | gpioNum ) |
Disables external interrupts on the provided pin.
gpioPort | Port of the pin (eg: GPIOC_BASE) |
gpioNum | Pin number (eg: 4 for PC4) |
Definition at line 396 of file external_interrupts.cpp.
void enableExternalInterrupt | ( | unsigned int | gpioPort, |
unsigned int | gpioNum, | ||
InterruptTrigger | trigger, | ||
unsigned int | priority = 15 ) |
Enables external interrupts on the provided pin. Remember to set the GPIO to input mode!
gpioPort | Port of the pin (eg: GPIOC_BASE) |
gpioNum | Pin number (eg: 4 for PC4) |
trigger | Interrupt detection trigger (rising edge, falling or both) |
priority | Interrupt priority [0-15], 0 = Highest priority |
Definition at line 366 of file external_interrupts.cpp.
|
constexpr |
Definition at line 341 of file external_interrupts.cpp.
|
constexpr |
Definition at line 361 of file external_interrupts.cpp.
|
constexpr |
Definition at line 356 of file external_interrupts.cpp.
|
extern |
Since in the stm32 interrupts greater than 5 are handled in groups (from 5 to 9 and from 10 to 15), this class provides a way to address single interrupts in this range.
In particular, an EXTIxx_IRQHandlerImpl() function is declared for every interrupt from 5 to 15, and defined in a similar fashion as miosix's 'stage_1_boot', i.e. handlers are "weak" and, if not overridden, will be assigned to a default handler.
NOTE: you will still have to enable the corresponding interrupt if you want to use it, defining an IRQHandlerImpl is not enough.
USAGE EXAMPLE:
Handle External Interrupt 9 void attribute((used)) EXTI9_IRQHandlerImpl() { Do some small operation, e.g. set a boolean flag No need to clear interrupt No need to use naked function }
int main() {