mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-15 22:48:14 +08:00
修复代码错误
This commit is contained in:
@@ -15,17 +15,5 @@ GLOBAL_INCLUDES := .
|
||||
|
||||
$(NAME)_SOURCES := rtos.c
|
||||
|
||||
Cortex-M3_SOURCES :=
|
||||
Cortex-M3_INCLUDES := portable/GCC/ARM_CM
|
||||
|
||||
Cortex-M4_SOURCES :=
|
||||
Cortex-M4_INCLUDES := portable/GCC/ARM_CM
|
||||
|
||||
Cortex-M4F_SOURCES :=
|
||||
Cortex-M4F_INCLUDES := portable/GCC/ARM_CM
|
||||
|
||||
ARM968E-S_SOURCES := portable/GCC/ARM968E_S/port.c
|
||||
ARM968E-S_INCLUDES := portable/GCC/ARM968E_S
|
||||
|
||||
$(NAME)_SOURCES += $($(HOST_ARCH)_SOURCES)
|
||||
GLOBAL_INCLUDES += $($(HOST_ARCH)_INCLUDES)
|
||||
|
||||
@@ -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