mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
fix freertos port
This commit is contained in:
parent
887b10cf54
commit
f5bd165a86
@ -124,14 +124,10 @@ PIKA_WEAK uint8_t pika_is_locked_pikaMemory(void) {
|
|||||||
/* time support */
|
/* time support */
|
||||||
#if PIKA_FREERTOS_ENABLE
|
#if PIKA_FREERTOS_ENABLE
|
||||||
static uint32_t platform_uptime_ms(void) {
|
static uint32_t platform_uptime_ms(void) {
|
||||||
#if (configTICK_RATE_HZ == 1000)
|
|
||||||
return (uint32_t)xTaskGetTickCount();
|
|
||||||
#else
|
|
||||||
TickType_t tick = 0u;
|
TickType_t tick = 0u;
|
||||||
|
|
||||||
tick = xTaskGetTickCount() * 1000;
|
tick = xTaskGetTickCount() * 1000;
|
||||||
return (uint32_t)((tick + configTICK_RATE_HZ - 1) / configTICK_RATE_HZ);
|
return (uint32_t)((tick + configTICK_RATE_HZ - 1) / configTICK_RATE_HZ);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user