You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenTheremin_V3_with_MIDI/Open_Theremin_V3/timer.cpp

18 lines
295 B

#include "Arduino.h"
#include "timer.h"
volatile uint16_t timer = 0;
volatile uint16_t midi_timer = 0;
void ticktimer (uint16_t ticks) {
resetTimer();
while (timerUnexpired(ticks))
; // NOP
};
void millitimer (uint16_t milliseconds) {
ticktimer(millisToTicks(milliseconds));
}