From 76e8745d80a822d9ae9a017c8f68a2f7f20695fc Mon Sep 17 00:00:00 2001 From: Michael Hope Date: Sun, 10 Oct 2010 19:58:58 +1300 Subject: Make systick.h C++ safe. Expose the sys tick count via systick.h and remove other externs. --- libmaple/systick.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libmaple/systick.c') diff --git a/libmaple/systick.c b/libmaple/systick.c index 12a3e22..2b09a64 100644 --- a/libmaple/systick.c +++ b/libmaple/systick.c @@ -39,7 +39,7 @@ #define SYSTICK_TICKINT BIT(1) // Interrupt on systick countdown #define SYSTICK_ENABLE BIT(0) // Turn on the counter -volatile uint32 systick_timer_millis = 0; +volatile uint32 systick_timer_millis; void systick_init(uint32 reload_val) { /* Set the reload counter to tick every 1ms */ @@ -65,8 +65,7 @@ void systick_resume() { SYSTICK_TICKINT); } +/** SysTick interrupt handler. Bumps up the tick counter. */ void SysTickHandler(void) { systick_timer_millis++; } - - -- cgit v1.2.3