From e7b97eb910cbaa9d6906aedd31d1ac49e1487059 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 15 Jun 2020 16:50:51 +0100 Subject: fish --- app/project.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/project.h') diff --git a/app/project.h b/app/project.h index e2e10c7..8c729d8 100644 --- a/app/project.h +++ b/app/project.h @@ -17,6 +17,11 @@ #include #include +#define TICK_BASE 9000 +#define TICK_DIV 12000 +#define TICKS_TO_US(a) (((a)*TICK_DIV*1000)/TICK_BASE) +#define MS_TO_TICKS(a) (((a)*1000)/TICKS_TO_US(1)) + #include "pins.h" #include "i2c.h" -- cgit v1.2.3