Add ChibiOS support (USB stack + support files).
This commit is contained in:
parent
be9be90483
commit
27dec2db7b
16 changed files with 2245 additions and 5 deletions
27
tmk_core/common/chibios/timer.c
Normal file
27
tmk_core/common/chibios/timer.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "ch.h"
|
||||
|
||||
#include "timer.h"
|
||||
|
||||
void timer_init(void) {}
|
||||
|
||||
void timer_clear(void) {}
|
||||
|
||||
uint16_t timer_read(void)
|
||||
{
|
||||
return (uint16_t)ST2MS(chVTGetSystemTime());
|
||||
}
|
||||
|
||||
uint32_t timer_read32(void)
|
||||
{
|
||||
return ST2MS(chVTGetSystemTime());
|
||||
}
|
||||
|
||||
uint16_t timer_elapsed(uint16_t last)
|
||||
{
|
||||
return (uint16_t)(ST2MS(chVTTimeElapsedSinceX(MS2ST(last))));
|
||||
}
|
||||
|
||||
uint32_t timer_elapsed32(uint32_t last)
|
||||
{
|
||||
return ST2MS(chVTTimeElapsedSinceX(MS2ST(last)));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue