From 8df27ffdcf75e8e9d6152d8450156968602f5396 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sat, 12 Jan 2019 09:11:04 +0900 Subject: [PATCH] Fix for RTOSv2 --- IDE/MDK5-ARM/Projects/SimpleServer/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/IDE/MDK5-ARM/Projects/SimpleServer/main.c b/IDE/MDK5-ARM/Projects/SimpleServer/main.c index 33c00bc14..2e73dfc56 100644 --- a/IDE/MDK5-ARM/Projects/SimpleServer/main.c +++ b/IDE/MDK5-ARM/Projects/SimpleServer/main.c @@ -130,8 +130,6 @@ uint32_t HAL_GetTick(void) double current_time(int reset) { - if(reset) os_time = 0 ; - return (double)os_time /1000.0; #if defined(WOLFSSL_CMSIS_RTOS) return (double)os_time / 1000.0; #elif defined(WOLFSSL_CMSIS_RTOSv2) @@ -173,7 +171,11 @@ void setTime(time_t t) extern void server_test(void const *arg); -void app_main(void const *arg) +#if defined(WOLFSSL_CMSIS_RTOSv2) +void app_main(void *arg) +#else +void app_main(void const*arg) +#endif { if (netInitialize() == netOK) server_test(arg); @@ -181,7 +183,9 @@ void app_main(void const *arg) printf("ERROR: netInitialize\n"); } +#if defined(WOLFSSL_CMSIS_RTOS) osThreadDef(app_main, osPriorityLow, 1, 32 * 1024); +#endif /*---------------------------------------------------------------------------- Main Thread 'main': Run Network