I have some code that used to work for several years. I recently made a change to a URL in the code and now the esp_now section no long compiles. I don't understand what the message means, no how to fix.
This is section of code that is failing:
void OnDataReceiver(const uint8_t *mac, const uint8_t *incomingData, int len) {
memcpy(&myData, incomingData, sizeof(myData));
}
This is the line that the IDE is showing the error:
esp_now_register_recv_cb(OnDataReceiver);
And the error generated:
Compilation error: invalid conversion from 'void ()(const uint8_t , const uint8_t*, int)' {aka 'void ()(const unsigned char , const unsigned char*, int)'} to 'esp_now_recv_cb_t' {aka 'void ()(const esp_now_recv_info , const unsigned char*, int)'} [-fpermissive]
I don't understand what this error means or what to change to fix. Thanks.