mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-18 16:03:22 +08:00
修复代码错误
This commit is contained in:
@@ -21,12 +21,14 @@
|
||||
#include "common.h"
|
||||
#include "platform_peripheral.h"
|
||||
|
||||
#include "portmacro.h"
|
||||
|
||||
/******************************************************
|
||||
* Macros
|
||||
******************************************************/
|
||||
|
||||
#define DISABLE_INTERRUPTS() do { __asm("CPSID i"); } while (0)
|
||||
|
||||
#define ENABLE_INTERRUPTS() do { __asm("CPSIE i"); } while (0)
|
||||
|
||||
/******************************************************
|
||||
* Constants
|
||||
******************************************************/
|
||||
@@ -68,13 +70,6 @@ typedef volatile struct _noos_mutex_t
|
||||
* Variable Definitions
|
||||
******************************************************/
|
||||
|
||||
#ifdef MICO_DEFAULT_TICK_RATE_HZ
|
||||
uint32_t ms_to_tick_ratio = (uint32_t)( 1000 / MICO_DEFAULT_TICK_RATE_HZ );
|
||||
#else
|
||||
uint32_t ms_to_tick_ratio = 1; // Default OS tick is 1000Hz
|
||||
#endif
|
||||
|
||||
|
||||
uint8_t semaphore_pool_init = 0;
|
||||
noos_semaphore_t semaphore_pool[SEMAPHORE_POOL_NUM];
|
||||
|
||||
@@ -256,8 +251,7 @@ extern uint32_t mico_get_time_no_os(void);
|
||||
|
||||
mico_time_t mico_rtos_get_time(void)
|
||||
{
|
||||
uint32_t tick = mico_get_time_no_os( );
|
||||
return ms_to_tick_ratio * tick;
|
||||
return mico_get_time_no_os( );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user