void ICACHE_FLASH_ATTR debug_FlashBufInit() { spi_flash_read(Flash_DEBUG_INFO_ADDR*0x1000,(uint32*)&FlashDebugBufParam,sizeof(FlashDebugBufParam)); if(debug_FlashParamCsumCheck() && debug_FlashAddrCheck()){ }else{ debug_FlashBufReset(); } }
//FLASH buf init void ICACHE_FLASH_ATTR debug_FlashBufInit(flashDebugBuf* flashDbgBuf,uint32 idx_sec) { //spi_flash_read(idx_sec*0x1000,(uint32*)flashDbgBuf,sizeof(flashDebugBuf)); config_ParamLoadWithProtect(idx_sec,0,(uint8*)flashDbgBuf,sizeof(flashDebugBuf)); if(debug_FlashParamCsumCheck(flashDbgBuf) && debug_FlashAddrCheck(flashDbgBuf)){ ESP_DBG("flash debug check sum ok..\r\n"); }else{ ESP_DBG("flash debug info reset...\r\n"); debug_FlashBufReset(flashDbgBuf,idx_sec); } }