Anyone can tell me why?
This is the interested code...
led.h
Code: Select all
#ifndef LED_H
#define LED_H
#include <stdint.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
class LED
{
public:
LED();
private:
void blinkLedTask(void *pvParameter);
...
};
#endif //LED_H
Code: Select all
#include "led.h"
LED::LED()
{
...
xTaskCreate(&LED::blinkLedTask, "blinkLedTask", 2048, NULL, 5, NULL);
}
void LED::blinkLedTask(void *pvParameter)
{
...
}
Code: Select all
error: invalid use of non-static member function xTaskCreate(blinkLedTask, "blinkLedTask", 2048, NULL, 5, NULL);
Code: Select all
error: cannot declare member function 'static void LED::blinkLedTask(void*)' to have static linkage [-fpermissive]
static void LED::blinkLedTask(void *pvParameter)
Thanks.
Regards.
Stefano