[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:
@@ -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);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user