Fixes: Mixers were not calculated in simulator. CoGetOSTime() needed … (#4342)
* Fixes: Mixers were not calculated in simulator. CoGetOSTime() needed implementation. * Cleanup
This commit is contained in:
committed by
Andre Bernet
parent
bbe82db087
commit
a45aafff33
@@ -95,6 +95,18 @@ uint16_t getTmr2MHz()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
U64 CoGetOSTime(void)
|
||||||
|
{
|
||||||
|
// one tick is 2ms
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
return GetTickCount()/2;
|
||||||
|
#else
|
||||||
|
struct timespec ts;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
return ((U64)ts.tv_sec * 1000 + ts.tv_nsec / 1000000) /2;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void simuInit()
|
void simuInit()
|
||||||
{
|
{
|
||||||
#if defined(STM32)
|
#if defined(STM32)
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ OS_TID CoCreateTask(FUNCPtr task, void *argv, uint32_t parameter, void * stk, ui
|
|||||||
#define CoWaitForSingleFlag(...) 0
|
#define CoWaitForSingleFlag(...) 0
|
||||||
#define CoTickDelay(x) sleep(2*(x))
|
#define CoTickDelay(x) sleep(2*(x))
|
||||||
#define CoCreateFlag(...) 0
|
#define CoCreateFlag(...) 0
|
||||||
#define CoGetOSTime(...) 0
|
U64 CoGetOSTime(void);
|
||||||
#define UART_Stop(...)
|
#define UART_Stop(...)
|
||||||
#define UART3_Stop(...)
|
#define UART3_Stop(...)
|
||||||
#define USART_GetITStatus(...) 0
|
#define USART_GetITStatus(...) 0
|
||||||
|
|||||||
Reference in New Issue
Block a user