]> git.donarmstrong.com Git - tmk_firmware.git/blob - protocol/usb_hid/override_wiring.c
Adhoc fix compile error of usb_usb
[tmk_firmware.git] / protocol / usb_hid / override_wiring.c
1 /*
2  * To keep Timer0 for common/timer.c override arduino/wiring.c.
3  */
4 #define __DELAY_BACKWARD_COMPATIBLE__
5 #include <util/delay.h>
6 #include "common/timer.h"
7 #include "Arduino.h"
8
9
10 unsigned long millis()
11 {
12     return timer_read32();
13 }
14 unsigned long micros()
15 {
16     return timer_read32() * 1000UL;
17 }
18 void delay(unsigned long ms)
19 {
20     _delay_ms(ms);
21 }
22 void delayMicroseconds(unsigned int us)
23 {
24     _delay_us(us);
25 }
26 void init()
27 {
28     timer_init();
29 }