aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/systick.c
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-02-15 22:29:45 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-02-16 01:17:21 -0500
commit2764748208816043a3149eae3a433d02325a1a36 (patch)
treecc5afb0af0c6f1d2282db08d3dad1dae9b4d33e6 /libmaple/systick.c
parent1fb0e0d727089e23d4b30e1efba5410dc4b4da14 (diff)
parent620740bf1986311041a40bd2992d1b549f84b2ba (diff)
downloadlibrambutan-2764748208816043a3149eae3a433d02325a1a36.tar.gz
librambutan-2764748208816043a3149eae3a433d02325a1a36.zip
Merge branch 'nzmichaelh-master' into master.
This provides DMA, IWDG, PWR, and BKP support, and fixes several bugs. Conflicts: libmaple/adc.h libmaple/libmaple.h libmaple/ring_buffer.h
Diffstat (limited to 'libmaple/systick.c')
-rw-r--r--libmaple/systick.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmaple/systick.c b/libmaple/systick.c
index 7935cc0..b056001 100644
--- a/libmaple/systick.c
+++ b/libmaple/systick.c
@@ -37,7 +37,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 */
@@ -57,14 +57,13 @@ void systick_disable() {
}
void systick_resume() {
- /* re-enable init registers without changing relead_val */
+ /* re-enable init registers without changing reload val */
__write(SYSTICK_CSR, SYSTICK_SRC_HCLK |
SYSTICK_ENABLE |
SYSTICK_TICKINT);
}
+/** SysTick interrupt handler. Bumps up the tick counter. */
void SysTickHandler(void) {
systick_timer_millis++;
}
-
-