CMSIS/RTX: Update idle handler and SysTick ops

pull/6273/head
Bartek Szatkowski 2018-03-01 18:02:56 +00:00
parent 07aad3c862
commit 3f1ea4b9ee
1 changed files with 3 additions and 9 deletions

View File

@ -42,7 +42,7 @@ static rtos::internal::SysTimer *os_timer;
static uint64_t os_timer_data[sizeof(rtos::internal::SysTimer) / 8]; static uint64_t os_timer_data[sizeof(rtos::internal::SysTimer) / 8];
/// Enable System Timer. /// Enable System Timer.
int32_t OS_Tick_Enable (void) void OS_Tick_Enable (void)
{ {
// Do not use SingletonPtr since this relies on the RTOS // Do not use SingletonPtr since this relies on the RTOS
if (NULL == os_timer) { if (NULL == os_timer) {
@ -52,24 +52,18 @@ int32_t OS_Tick_Enable (void)
// set to fire interrupt on next tick // set to fire interrupt on next tick
os_timer->schedule_tick(); os_timer->schedule_tick();
return 0;
} }
/// Disable System Timer. /// Disable System Timer.
int32_t OS_Tick_Disable (void) void OS_Tick_Disable (void)
{ {
os_timer->cancel_tick(); os_timer->cancel_tick();
return 0;
} }
/// Acknowledge System Timer IRQ. /// Acknowledge System Timer IRQ.
int32_t OS_Tick_AcknowledgeIRQ (void) void OS_Tick_AcknowledgeIRQ (void)
{ {
os_timer->schedule_tick(); os_timer->schedule_tick();
return 0;
} }
/// Get System Timer count. /// Get System Timer count.