From 1ef94b218b758e5c9c7b3c16dd320c181ec40aa4 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Tue, 21 Oct 2014 11:47:04 +0200 Subject: [PATCH] Better comments for systick callback information. --- core/systick.c | 2 ++ include/core/system.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/systick.c b/core/systick.c index bcf1ab5..266250d 100644 --- a/core/systick.c +++ b/core/systick.c @@ -69,6 +69,8 @@ void SysTick_Handler(void) /* Register a callback to be called every 'period' system ticks with 'param' parameter. * returns the callback number, to be used to remove the callback from the table of callbacks. * returns negative value on error. + * The callback will get the "global_wrapping_system_ticks" as argument, which wraps every 50 days + * or so with a 1ms tick */ int add_systick_callback(void (*callback) (uint32_t), uint16_t period) { diff --git a/include/core/system.h b/include/core/system.h index fd7fec9..0ce6faf 100644 --- a/include/core/system.h +++ b/include/core/system.h @@ -136,9 +136,11 @@ void systick_timer_on(uint32_t ms); /* Removes the main clock from the selected timer block */ void systick_timer_off(void); -/* Register a callback to be called every 'period' system ticks with 'param' parameter. +/* Register a callback to be called every 'period' system ticks. * returns the callback number, to be used to remove the callback from the table of callbacks. * returns negative value on error. + * The callback will get the "global_wrapping_system_ticks" as argument, which wraps every 50 days + * or so with a 1ms tick */ #define MAX_SYSTICK_CALLBACKS 4 int add_systick_callback(void (*callback) (uint32_t), uint16_t period); -- 2.43.0