aboutsummaryrefslogtreecommitdiffstats
path: root/protocol/usb_hid/override_wiring.c
blob: a8c28dd8986b0ab27a0d961466fc87e288f0a577 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * 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();
}