diff options
| author | tmk <nobody@nowhere> | 2012-08-25 15:49:08 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2012-08-28 21:56:15 +0900 |
| commit | c5060ea81942b0e3f8577536ff78402a19abe3d3 (patch) | |
| tree | bcdd4cd269be3064982014b0afdc0aea628d7048 /protocol/usb_hid/override_wiring.c | |
| parent | 9382bf2f765cfbb8f7a9a48157391cac2bb71780 (diff) | |
| download | qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.tar.gz qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.zip | |
test build of 'Host shield' in minimal env.
Diffstat (limited to 'protocol/usb_hid/override_wiring.c')
| -rw-r--r-- | protocol/usb_hid/override_wiring.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/protocol/usb_hid/override_wiring.c b/protocol/usb_hid/override_wiring.c new file mode 100644 index 000000000..a8c28dd89 --- /dev/null +++ b/protocol/usb_hid/override_wiring.c | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * To keep Timer0 for common/timer.c override arduino/wiring.c. | ||
| 3 | */ | ||
| 4 | #include <util/delay.h> | ||
| 5 | #include "common/timer.h" | ||
| 6 | #include "Arduino.h" | ||
| 7 | |||
| 8 | |||
| 9 | unsigned long millis() | ||
| 10 | { | ||
| 11 | return timer_read(); | ||
| 12 | } | ||
| 13 | unsigned long micros() | ||
| 14 | { | ||
| 15 | return timer_read() * 1000UL; | ||
| 16 | } | ||
| 17 | void delay(unsigned long ms) | ||
| 18 | { | ||
| 19 | _delay_ms(ms); | ||
| 20 | } | ||
| 21 | void delayMicroseconds(unsigned int us) | ||
| 22 | { | ||
| 23 | _delay_us(us); | ||
| 24 | } | ||
| 25 | void init() | ||
| 26 | { | ||
| 27 | timer_init(); | ||
| 28 | } | ||
