aboutsummaryrefslogtreecommitdiffstats
path: root/include/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clock.h')
-rw-r--r--include/clock.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/clock.h b/include/clock.h
new file mode 100644
index 0000000..9d4b17a
--- /dev/null
+++ b/include/clock.h
@@ -0,0 +1,16 @@
+#ifndef CLOCK_H_
+#define CLOCK_H_
+
+#include <stdint.h>
+
+/**
+ * Sets HCLK (system clock) to 80MHz, the maximum.
+ */
+extern void clock_init(void);
+
+/**
+ * Sleeps for given milliseconds.
+ */
+void delay(uint32_t ms);
+
+#endif // CLOCK_H_