Help for using system_get_rst_info
Posted: Wed Sep 09, 2015 3:45 pm
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:
Thanks for help
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 all
extern "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