aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/systick.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple/systick.c')
-rw-r--r--libmaple/systick.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmaple/systick.c b/libmaple/systick.c
index 456ac2f..9fbb152 100644
--- a/libmaple/systick.c
+++ b/libmaple/systick.c
@@ -58,6 +58,13 @@ void systick_disable() {
__write(SYSTICK_CSR, SYSTICK_SRC_HCLK);
}
+void systick_resume() {
+ /* re-enable init registers without changing relead_val */
+ __write(SYSTICK_CSR, SYSTICK_SRC_HCLK |
+ SYSTICK_ENABLE |
+ SYSTICK_TICKINT);
+}
+
void SysTickHandler(void) {
systick_timer_millis++;
}