From 7a498093e8c279f4a41af3602a809c0c055dd81e Mon Sep 17 00:00:00 2001 From: richardbarry Date: Thu, 31 Mar 2011 14:09:21 +0000 Subject: [PATCH] Add a #if ( configUSE_TIMERS ) conditional compilation constant in to allow the software timers source file to be included in a build that is not configured to use timers without resulting in linker errors. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1335 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/timers.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/timers.c b/Source/timers.c index bf25f8f93..fc0a70984 100644 --- a/Source/timers.c +++ b/Source/timers.c @@ -63,6 +63,12 @@ task.h is included from an application file. */ #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE +/* This entire source file will be skipped if the application is not configured +to include software timer functionality. This #if is closed at the very bottom +of this file. If you want to include software timer functionality then ensure +configUSE_TIMERS is set to 1 in FreeRTOSConfig.h. */ +#if ( configUSE_TIMERS == 1 ) + /* Misc definitions. */ #define tmrNO_DELAY ( portTickType ) 0U @@ -621,3 +627,7 @@ xTIMER *pxTimer = ( xTIMER * ) xTimer; } /*-----------------------------------------------------------*/ +/* This entire source file will be skipped if the application is not configured +to include software timer functionality. If you want to include software timer +functionality then ensure configUSE_TIMERS is set to 1 in FreeRTOSConfig.h. */ +#endif /* configUSE_TIMERS == 1 */ -- 2.39.5