[cm3] fix doxygen for systick_get_value, add systick_get_reload

Fix the reload value in the examples:
to get a SysTick interrupt every N clock pulses: set reload to N-1
see http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/BGBEEJHC.html#BABGACGG
This commit is contained in:
Felix Ruess
2013-02-19 19:22:49 +01:00
parent 46263e90b4
commit 3ef44bff54
13 changed files with 36 additions and 13 deletions

View File

@@ -60,9 +60,20 @@ void systick_set_reload(u32 value)
@returns 24 bit reload value as u32.
*/
u32 systick_get_reload(void)
{
return (STK_LOAD & 0x00FFFFFF);
}
/*-----------------------------------------------------------------------------*/
/** @brief Get the current SysTick counter value.
@returns 24 bit current value as u32.
*/
u32 systick_get_value(void)
{
return STK_VAL;
return (STK_VAL & 0x00FFFFFF);
}
/*-----------------------------------------------------------------------------*/