Koduino
|
This file is part of koduino https://github.com/avikde/koduino
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, see http://www.gnu.org/licenses/.
Functions | |
void | attachTimerInterrupt (uint8_t i, ISRType ISR, int freqHz) |
Begin a timer interrupt. More... | |
void | detachTimerInterrupt (uint8_t i) |
Disable a timer interrupt. More... | |
void | noTimerInterrupts () |
Disable all timer interrupts. More... | |
void | timerInterrupts () |
Re-enable timer interrupts. More... | |
void attachTimerInterrupt | ( | uint8_t | i, |
ISRType | ISR, | ||
int | freqHz | ||
) |
Begin a timer interrupt.
Starts calling the interrupt handler specified at the frequency specified.
i | One of 0, 1, or 2 (#3 is used for pwmIn, and #4 is used for the system clock) |
ISR | Interrupt handler (similar to usage for external interrupts) |
freqHz | Frequency in Hz, between ~0.061Hz and ~36MHz. |
void detachTimerInterrupt | ( | uint8_t | i | ) |
Disable a timer interrupt.
This forgets the attached interrupt handler, i.e. to restart, attachTimerInterrupt() has to be called again!
i | One of 0, 1, or 2 |
void noTimerInterrupts | ( | ) |
Disable all timer interrupts.
Call this to temporarily suspend all timer interrupts, and timerInterrupts() to resume them again
void timerInterrupts | ( | ) |
Re-enable timer interrupts.
To be called after noTimerInterrupts()