summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/usb_hid/override_wiring.c
blob: 40bb574d7d6c0dcefd749aad5b6872d653c3022a (plain)
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.
 */
#define __DELAY_BACKWARD_COMPATIBLE__
#include "wait.h"
#include "platforms/timer.h"


unsigned long millis(void)
{
    return timer_read32();
}
unsigned long micros(void)
{
    return timer_read32() * 1000UL;
}
void delay(unsigned long ms)
{
    wait_ms(ms);
}
void delayMicroseconds(unsigned int us)
{
    wait_us(us);
}
void init(void)
{
    timer_init();
}