mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 12:22:57 +00:00
29 lines
406 B
C
29 lines
406 B
C
/*
|
|
* To keep Timer0 for common/timer.c override arduino/wiring.c.
|
|
*/
|
|
#include <util/delay.h>
|
|
#include "common/timer.h"
|
|
#include "Arduino.h"
|
|
|
|
|
|
unsigned long millis()
|
|
{
|
|
return timer_read();
|
|
}
|
|
unsigned long micros()
|
|
{
|
|
return timer_read() * 1000UL;
|
|
}
|
|
void delay(unsigned long ms)
|
|
{
|
|
_delay_ms(ms);
|
|
}
|
|
void delayMicroseconds(unsigned int us)
|
|
{
|
|
_delay_us(us);
|
|
}
|
|
void init()
|
|
{
|
|
timer_init();
|
|
}
|