Hi many thanks for your contribution, I added the code to create a task timer that I need to run some work regularly, when I compile it gives me an error,i do not understand how to solve it, I looked in the various discussions but i could not find anything.
#include “esp_common.h”
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include “esp_wps.h”
#include “freertos/timers.h”
#include “freertos/FreeRTOS.h”
#include “freertos/task.h”
#include “freertos/queue.h”
xTimerHandle timer;
void callback_timer (xTimerHandle xTimer)
{
}
timer = xTimerCreate("timer",5000/portTICK_RATE_MS,pdTRUE,(void *)0,
callback_timer);
[Clang IntelliSense] Error: no matching function for call to 'xTimerCreate'
Errore invalid conversion from 'char*' to 'const signed char*' [-fpermissive]
Please help me
Many thanks
Just cast the "timer" string to const signed char
The code will look like this:
timer = xTimerCreate((const signed char *)"timer",5000/portTICK_RATE_MS,pdTRUE,(void *)0,
callback_timer);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.