Koduino
|
Functions | |
void | attachInterrupt (uint8_t pinName, ISRType ISR, InterruptTrigger mode) |
Enable an interrupt with default priority. More... | |
void | detachInterrupt (uint8_t pinName) |
Disable an interrupt. More... | |
void | noInterrupts () |
Disable external interrupts. More... | |
void | interrupts () |
Enable external interrupts. More... | |
void attachInterrupt | ( | uint8_t | pinName, |
ISRType | ISR, | ||
InterruptTrigger | mode | ||
) |
Enable an interrupt with default priority.
Note: There is only ONE EXTI per pinSource, i.e. PA0, PB0 cannot both have interrupts, but PA0 and PB1 can. Obviously, there can be a total of 16.
pinName | Name of pin interrupt is connected to |
ISR | Callback function to call when interrupt is triggered |
mode | One of InterruptTrigger |
void detachInterrupt | ( | uint8_t | pinName | ) |
Disable an interrupt.
pinName | Pin name where attachInterrupt() was called |
void interrupts | ( | ) |
Enable external interrupts.
Enabled by default
void noInterrupts | ( | ) |
Disable external interrupts.
Note: This is unlike the Arduino function which disables ALL interrupts. That would stop the system clock here as well. Call NVIC_DisableIRQ()
if you want the arduino behavior