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.
18 lines
260 B
18 lines
260 B
8 years ago
|
#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));
|
||
|
}
|
||
|
|
||
|
|