Hello,
I am using FreeRTOS in my project, and I would like to use the timer functions. But I noticed that the timers.c file does not have all the timer functions.
Functions such as xTimerStart(), xTimerStop(), xTimerChangePeriod(), xTimerDelete(), xTimerReset() are missing.
I downloaded again the FreeRTOS files, but still the timers.c file does not have those functions.
Would you like to give me some advice?
I would really appreciate your help.
To use those functions you have to include FreeRTOS.h, then timers.h, and then you will be able to compile and link code with those functions. They are actually macros in timers.h that call generic functions in timers.c.
I included FreeRTOS.h, then timers.h in my project, and now it will recognize definitions (like xTimerHandle) from timers.h, but I have another problem:
I defined configUSE_TIMERS, but still everything after #if ( configUSE_TIMERS == 1 ) is grey in timers.c, as it did not recognize the fact that I defined configUSE_TIMERS. In fact I defined the following in FreeRTOSConfig.h:
You said it recognizes the definitions, so everything is ok. The editor might show them as being grayed out, but editors often get that wrong, especially if the editor is based on Eclipse.
Hello,
Although not FreeRTOS related at all:
The Eclipse editor used the Indexer for that kind of source coloring. I have seen many Eclipse distributions having the ‘Heuristic’ settings enabled, which can lead to wrong coloring. Switching that setting off helped for me, and it always fixed the problem for me.
See http://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/
Staying off topic for a moment, as you seem to be an Eclipse expert, is there a way of making Eclipse remember your workspace settings so they are the default settings when you create a new workspace?