aboutsummaryrefslogtreecommitdiff
path: root/VexRiscvSocSoftware/libs/timer.h
diff options
context:
space:
mode:
authorFriedrich Beckmann <friedrich.beckmann@hs-augsburg.de>2022-07-25 17:55:39 +0200
committerFriedrich Beckmann <friedrich.beckmann@hs-augsburg.de>2022-07-25 17:55:39 +0200
commit3fff6023602822531efdae30bc8ebf862967f1ef (patch)
tree16028102b8d850f8ab3115d28a8539ca6bc5f51d /VexRiscvSocSoftware/libs/timer.h
Initial Commit
Diffstat (limited to 'VexRiscvSocSoftware/libs/timer.h')
-rw-r--r--VexRiscvSocSoftware/libs/timer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/VexRiscvSocSoftware/libs/timer.h b/VexRiscvSocSoftware/libs/timer.h
new file mode 100644
index 0000000..1577535
--- /dev/null
+++ b/VexRiscvSocSoftware/libs/timer.h
@@ -0,0 +1,20 @@
+#ifndef TIMERCTRL_H_
+#define TIMERCTRL_H_
+
+#include <stdint.h>
+
+
+typedef struct
+{
+ volatile uint32_t CLEARS_TICKS;
+ volatile uint32_t LIMIT;
+ volatile uint32_t VALUE;
+} Timer_Reg;
+
+static void timer_init(Timer_Reg *reg){
+ reg->CLEARS_TICKS = 0;
+ reg->VALUE = 0;
+}
+
+
+#endif /* TIMERCTRL_H_ */