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.
 
 

17 lines
260 B

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