mirror of https://github.com/ARMmbed/mbed-os.git
rtos cortex: fix astyle
parent
f90f1fc01d
commit
e80f2ff18a
|
@ -54,7 +54,7 @@ namespace rtos {
|
|||
namespace internal {
|
||||
|
||||
SysTimer::SysTimer() :
|
||||
TimerEvent(get_lp_ticker_data()), _start_time(0), _tick(0)
|
||||
TimerEvent(get_lp_ticker_data()), _start_time(0), _tick(0)
|
||||
{
|
||||
_start_time = ticker_read_us(_ticker_data);
|
||||
_suspend_time_passed = true;
|
||||
|
@ -62,7 +62,7 @@ SysTimer::SysTimer() :
|
|||
}
|
||||
|
||||
SysTimer::SysTimer(const ticker_data_t *data) :
|
||||
TimerEvent(data), _start_time(0), _tick(0)
|
||||
TimerEvent(data), _start_time(0), _tick(0)
|
||||
{
|
||||
_start_time = ticker_read_us(_ticker_data);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ static void mbed_cpy_nvic(void)
|
|||
#if !defined(__CORTEX_M0) && !defined(__CORTEX_A9)
|
||||
#ifdef NVIC_RAM_VECTOR_ADDRESS
|
||||
uint32_t *old_vectors = (uint32_t *)SCB->VTOR;
|
||||
uint32_t *vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
|
||||
uint32_t *vectors = (uint32_t *)NVIC_RAM_VECTOR_ADDRESS;
|
||||
for (int i = 0; i < NVIC_NUM_VECTORS; i++) {
|
||||
vectors[i] = old_vectors[i];
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
|
||||
/* Define stack sizes if they haven't been set already */
|
||||
#if !defined(ISR_STACK_SIZE)
|
||||
#define ISR_STACK_SIZE ((uint32_t)1024)
|
||||
#define ISR_STACK_SIZE ((uint32_t)1024)
|
||||
#endif
|
||||
|
||||
/* Heap limits - only used if set */
|
||||
|
|
|
@ -42,7 +42,7 @@ static rtos::internal::SysTimer *os_timer;
|
|||
static uint64_t os_timer_data[sizeof(rtos::internal::SysTimer) / 8];
|
||||
|
||||
/// Enable System Timer.
|
||||
void OS_Tick_Enable (void)
|
||||
void OS_Tick_Enable(void)
|
||||
{
|
||||
// Do not use SingletonPtr since this relies on the RTOS
|
||||
if (NULL == os_timer) {
|
||||
|
@ -55,36 +55,39 @@ void OS_Tick_Enable (void)
|
|||
}
|
||||
|
||||
/// Disable System Timer.
|
||||
void OS_Tick_Disable (void)
|
||||
void OS_Tick_Disable(void)
|
||||
{
|
||||
os_timer->cancel_tick();
|
||||
}
|
||||
|
||||
/// Acknowledge System Timer IRQ.
|
||||
void OS_Tick_AcknowledgeIRQ (void)
|
||||
void OS_Tick_AcknowledgeIRQ(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// Get System Timer count.
|
||||
uint32_t OS_Tick_GetCount (void)
|
||||
uint32_t OS_Tick_GetCount(void)
|
||||
{
|
||||
return os_timer->get_time() & 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
// Get OS Tick IRQ number.
|
||||
int32_t OS_Tick_GetIRQn (void) {
|
||||
return -1;
|
||||
int32_t OS_Tick_GetIRQn(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Get OS Tick overflow status.
|
||||
uint32_t OS_Tick_GetOverflow (void) {
|
||||
return 0;
|
||||
uint32_t OS_Tick_GetOverflow(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get OS Tick interval.
|
||||
uint32_t OS_Tick_GetInterval (void) {
|
||||
return 1000;
|
||||
uint32_t OS_Tick_GetInterval(void)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
static void default_idle_hook(void)
|
||||
|
|
Loading…
Reference in New Issue