APM:Libraries
|
Go to the source code of this file.
Typedefs | |
typedef enum afio_exti_num | afio_exti_num |
typedef enum afio_exti_port | afio_exti_port |
External interrupt line port selector. More... | |
typedef enum exti_trigger_mode | exti_trigger_mode |
Enumerations | |
enum | afio_exti_num { AFIO_EXTI_0, AFIO_EXTI_1, AFIO_EXTI_2, AFIO_EXTI_3, AFIO_EXTI_4, AFIO_EXTI_5, AFIO_EXTI_6, AFIO_EXTI_7, AFIO_EXTI_8, AFIO_EXTI_9, AFIO_EXTI_10, AFIO_EXTI_11, AFIO_EXTI_12, AFIO_EXTI_13, AFIO_EXTI_14, AFIO_EXTI_15 } |
enum | afio_exti_port { AFIO_EXTI_PA, AFIO_EXTI_PB, AFIO_EXTI_PC, AFIO_EXTI_PD, AFIO_EXTI_PE, AFIO_EXTI_PF, AFIO_EXTI_PG } |
External interrupt line port selector. More... | |
enum | exti_trigger_mode { EXTI_RISING, EXTI_FALLING, EXTI_RISING_FALLING } |
Functions | |
void | exti_init () |
void | exti_attach_interrupt (afio_exti_num num, afio_exti_port port, Handler handler, exti_trigger_mode mode) |
Register a handler to run upon external interrupt. More... | |
void | exti_attach_interrupt_pri (afio_exti_num num, afio_exti_port port, Handler handler, exti_trigger_mode mode, uint8_t priority) |
void | exti_detach_interrupt (afio_exti_num num) |
Unregister an external interrupt handler. More... | |
void | exti_enable_interrupt (afio_exti_num num, bool e) |
static INLINE void | interrupts () |
static INLINE void | noInterrupts () |
static void | exti_clear_pending_bit (uint32_t EXTI_Line) |
void | EXTI0_IRQHandler (void) |
void | EXTI1_IRQHandler (void) |
void | EXTI2_IRQHandler (void) |
void | EXTI3_IRQHandler (void) |
void | EXTI4_IRQHandler (void) |
void | EXTI9_5_IRQHandler (void) |
void | EXTI15_10_IRQHandler (void) |
typedef enum afio_exti_num afio_exti_num |
External interrupt line numbers.
typedef enum afio_exti_port afio_exti_port |
External interrupt line port selector.
Used to determine which GPIO port to map an external interrupt line onto.
typedef enum exti_trigger_mode exti_trigger_mode |
External interrupt trigger mode
enum afio_exti_num |
External interrupt line numbers.
enum afio_exti_port |
External interrupt line port selector.
Used to determine which GPIO port to map an external interrupt line onto.
Enumerator | |
---|---|
AFIO_EXTI_PA | Use port A (PAx) pin. |
AFIO_EXTI_PB | Use port B (PBx) pin. |
AFIO_EXTI_PC | Use port C (PCx) pin. |
AFIO_EXTI_PD | Use port D (PDx) pin. |
AFIO_EXTI_PE | Use port E (PEx) pin. |
AFIO_EXTI_PF | Use port E (PEx) pin. |
AFIO_EXTI_PG | Use port E (PEx) pin. |
enum exti_trigger_mode |
void EXTI0_IRQHandler | ( | void | ) |
Definition at line 201 of file exti.c.
Referenced by exti_clear_pending_bit().
void EXTI15_10_IRQHandler | ( | void | ) |
Definition at line 235 of file exti.c.
Referenced by exti_clear_pending_bit().
void EXTI1_IRQHandler | ( | void | ) |
Definition at line 206 of file exti.c.
Referenced by exti_clear_pending_bit().
void EXTI2_IRQHandler | ( | void | ) |
Definition at line 211 of file exti.c.
Referenced by exti_clear_pending_bit().
void EXTI3_IRQHandler | ( | void | ) |
Definition at line 216 of file exti.c.
Referenced by exti_clear_pending_bit().
void EXTI4_IRQHandler | ( | void | ) |
Definition at line 221 of file exti.c.
Referenced by exti_clear_pending_bit().
void EXTI9_5_IRQHandler | ( | void | ) |
Definition at line 226 of file exti.c.
Referenced by exti_clear_pending_bit().
void exti_attach_interrupt | ( | afio_exti_num | num, |
afio_exti_port | port, | ||
Handler | handler, | ||
exti_trigger_mode | mode | ||
) |
Register a handler to run upon external interrupt.
This function assumes that the interrupt request corresponding to the given external interrupt is masked.
num | External interrupt line number. |
port | Port to use as source input for external interrupt. |
handler | Function handler to execute when interrupt is triggered. |
mode | Type of transition to trigger on, one of: EXTI_RISING, EXTI_FALLING, EXTI_RISING_FALLING. |
Definition at line 65 of file exti.c.
void exti_attach_interrupt_pri | ( | afio_exti_num | num, |
afio_exti_port | port, | ||
Handler | handler, | ||
exti_trigger_mode | mode, | ||
uint8_t | priority | ||
) |
Definition at line 103 of file exti.c.
Referenced by F4Light::GPIO::_attach_interrupt().
|
inlinestatic |
Definition at line 126 of file exti.h.
Referenced by exti_attach_interrupt(), exti_attach_interrupt_pri(), and exti_serv().
void exti_detach_interrupt | ( | afio_exti_num | num | ) |
Unregister an external interrupt handler.
num | Number of the external interrupt line to disable. |
Definition at line 143 of file exti.c.
Referenced by F4Light::GPIO::detach_interrupt().
void exti_enable_interrupt | ( | afio_exti_num | num, |
bool | e | ||
) |
Definition at line 164 of file exti.c.
Referenced by F4Light::GPIO::enable_interrupt().
void exti_init | ( | ) |
Definition at line 46 of file exti.c.
Referenced by setupNVIC().
|
static |
Re-enable interrupts.
Call this after noInterrupts() to re-enable interrupt handling, after you have finished with a timing-critical section of code.
Definition at line 106 of file exti.h.
Referenced by F4Light::Scheduler::_micros64(), F4Light::Scheduler::dequeue_task(), F4Light::Scheduler::enqueue_task(), F4Light::_parser::get_last_change(), F4Light::_parser::get_last_signal(), F4Light::_parser::get_val(), F4Light::_parser::get_valid_channels(), init(), F4Light::Scheduler::init(), F4Light::AnalogSource::set_pin(), F4Light::Scheduler::stop_task(), F4Light::Scheduler::unregister_timer_task(), VCP_DataAvail(), VCP_DataAvailContig(), VCP_MarkRead(), VCP_MarkWritten(), VCP_SpaceAvail(), and VCP_SpaceAvailContig().
|
static |
Disable interrupts.
After calling this function, all user-programmable interrupts will be disabled. You can call this function before a timing-critical section of code, then call interrupts() to re-enable interrupt handling.
Definition at line 120 of file exti.h.
Referenced by F4Light::Scheduler::_micros64(), F4Light::Scheduler::dequeue_task(), F4Light::Scheduler::enqueue_task(), F4Light::_parser::get_last_change(), F4Light::_parser::get_last_signal(), F4Light::_parser::get_val(), F4Light::_parser::get_valid_channels(), F4Light::Scheduler::init(), F4Light::AnalogSource::set_pin(), F4Light::Scheduler::stop_task(), F4Light::Scheduler::unregister_timer_task(), VCP_DataAvail(), VCP_DataAvailContig(), VCP_MarkRead(), VCP_MarkWritten(), VCP_SpaceAvail(), and VCP_SpaceAvailContig().