summaryrefslogtreecommitdiffstats
path: root/app/project.h
diff options
context:
space:
mode:
authorroot <root@e4200.stuffs>2020-06-15 16:50:51 +0100
committerroot <root@e4200.stuffs>2020-06-15 16:50:51 +0100
commite7b97eb910cbaa9d6906aedd31d1ac49e1487059 (patch)
tree6282da8cf2f4d67cbe5361137dc311129373d2c2 /app/project.h
parent4f720ba83341b17dd6aea0e613878e6928505b00 (diff)
downloadrobs_speedo-e7b97eb910cbaa9d6906aedd31d1ac49e1487059.tar.gz
robs_speedo-e7b97eb910cbaa9d6906aedd31d1ac49e1487059.tar.bz2
robs_speedo-e7b97eb910cbaa9d6906aedd31d1ac49e1487059.zip
fish
Diffstat (limited to 'app/project.h')
-rw-r--r--app/project.h5
1 files changed, 5 insertions, 0 deletions
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 <stdio.h>
#include <errno.h>
+#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"