I've tested this and it works..
But I now want to use the function where data is stored during deepsleep but it doesn't compile.
The only change I did was to change the "flag" variable from local to global. And now it doesn't compile.
In different macro's in my program there are points that the ESP32 can put to (deep) sleep.
Before it goes "to bed" I want to write a variable tot the RTC memory and read it back as soon as the ESP awakes.
Because the ESP is put to sleep in different macro's, the writing to the RTC should be done in different macro's.
I've used a global variable to store before going to sleep.
Could this be the problem?
Code: Select all
~~~~~~~~~~^~~~
../main/esp-project.c:5877:12: warning: unused variable 'FCL_FLAG' [-Wunused-variable]
// Payload = Payload + "&field2="
^~~~~~~~
../main/esp-project.c: In function 'app_main':
../main/esp-project.c:6148:2: error: 'FCL_FLAG' undeclared (first use in this function); did you mean 'FCV_FLAG'?
^
FCV_FLAG
../main/esp-project.c:6148:2: note: each undeclared identifier is reported only once for each function it appears in
../main/esp-project.c:6230:51: warning: passing argument 1 of 'FCD_05131_WLAN_ESP32__ConnectToSSID' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
../main/esp-project.c:2485:55: note: expected 'MX_CHAR *' {aka 'char *'} but argument is of type 'volatile MX_CHAR *' {aka 'volatile char *'}
:Returns : MX_UINT8
^
../main/esp-project.c:6230:91: warning: passing argument 3 of 'FCD_05131_WLAN_ESP32__ConnectToSSID' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
../main/esp-project.c:2485:96: note: expected 'MX_CHAR *' {aka 'char *'} but argument is of type 'volatile MX_CHAR *' {aka 'volatile char *'}
:Returns : MX_UINT8
^
../main/esp-project.c:6241:22: error: 'flag' undeclared (first use in this function); did you mean 'fmal'?
../main/esp-project.c:6269:84: warning: passing argument 3 of 'FCD_0a9d1_MQTT_Client1__Publish' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
../main/esp-project.c:1128:94: note: expected 'MX_CHAR *' {aka 'char *'} but argument is of type 'volatile MX_CHAR *' {aka 'volatile char *'}
^
In file included from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\includes.c:53,