Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By smily77
#28741 Can someone help me using the system_get_rst_info function

I'm not really experianced in C and don't know how I need to call the function with a *variable. My code so far:
Code: Select allextern "C" {
  #include "user_interface.h"
}
 struct rstInfo {
  uint32 reason;
  uint32 exxccause;
  uint32 epc1;
  uint32 epc2;
  uint32 epc3;
  uint32 excvaddr;
  uint32 depc;
 };

void setup() {
 Serial.begin(9600);
 Serial.println();
 //Prototype rst_info* system_get_rst_info(void)
????? = system_get_rst_info(); ??????
 Serial.println(rstInfo.reason);
}

void loop() {
  delay(1);
}


Thanks for help