aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/systick.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmaple/systick.c b/libmaple/systick.c
index 388f7aa..5025328 100644
--- a/libmaple/systick.c
+++ b/libmaple/systick.c
@@ -66,7 +66,9 @@ void systick_enable() {
}
/**
- * Attach a callback called each ms.
+ * @brief Attach a callback to be called from the SysTick exception handler.
+ *
+ * To detach a callback, call this function again with a null argument.
*/
void systick_attach_callback(void (*callback)(void)) {
systick_user_callback = callback;
@@ -77,7 +79,7 @@ void systick_attach_callback(void (*callback)(void)) {
*/
void __exc_systick(void) {
- if (systick_user_callback) {
+ if (systick_user_callback) {
systick_user_callback();
}
systick_uptime_millis++;