help: example for accessing ESP:getResetInfoPtr() <solved>
Posted: Sat Aug 22, 2015 4:38 pm
Hi guys,
I need the info of rst_info.reason but am not fit enough to get the struct thingie right
would really appreciate a relevant snippet of code.
that is how far I get:
and I get this error:
thanks,
schufti
I need the info of rst_info.reason but am not fit enough to get the struct thingie right
would really appreciate a relevant snippet of code.
that is how far I get:
Code: Select all
void setup() {
rst_info *xyz;
Serial.begin(115200);
xyz = ESP.getResetInfoPtr();
Serial.println((*xyz).reason);
and I get this error:
Code: Select all
my_am2321.ino: In function 'void setup()':
my_am2321.ino:42:24: error: invalid use of incomplete type 'struct rst_info'
In file included from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\cores\esp8266/Arduino.h:248:0,
from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\SPI/SPI.h:24,
from my_am2321.ino:2:
D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\cores\esp8266/Esp.h:125:16: error: forward declaration of 'struct rst_info'
struct rst_info * getResetInfoPtr();
^
invalid use of incomplete type 'struct rst_info'
thanks,
schufti