From 4efbaaa525444f6483a9c6765459c1a05b6f92b1 Mon Sep 17 00:00:00 2001 From: rtel Date: Mon, 18 Nov 2019 17:35:40 +0000 Subject: [PATCH] Add software timer to the Win32 blinky demo. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2755 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h | 2 +- FreeRTOS/Demo/WIN32-MSVC/main.c | 2 +- FreeRTOS/Demo/WIN32-MSVC/main_blinky.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h index 1acd4555b..2dca61617 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h @@ -45,7 +45,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configUSE_DAEMON_TASK_STARTUP_HOOK 1 -#define configTICK_RATE_HZ ( 100 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ +#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 52 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c index a902e6349..ee8219744 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main.c @@ -7,7 +7,7 @@ * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the fofllowing conditions: + * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c index 5bd6311e0..065561b9e 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c @@ -160,6 +160,8 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS; NULL, /* The timer's ID is not used. */ prvQueueSendTimerCallback );/* The function executed when the timer expires. */ + xTimerStart( xTimer, 0 ); /* The scheduler has not started so use a block time of 0. */ + /* Start the tasks and timer running. */ vTaskStartScheduler(); } -- 2.39.5