|
@ -29,7 +29,7 @@ void L3_eeprom_read_param() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
if(L1_eep_read_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_PARAM_BLOCK_SIZE, (U8*)&G.p, NULL) == 0) |
|
|
if(L1_eep_read_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_SECTOR_BLOCK_SIZE, (U8*)&G.p, NULL) == 0) |
|
|
{ |
|
|
{ |
|
|
//L0_uart0_sendstr("e2p read success");
|
|
|
//L0_uart0_sendstr("e2p read success");
|
|
|
return; |
|
|
return; |
|
@ -51,7 +51,7 @@ void L3_eeprom_persist_param() |
|
|
L0_Iap_Erase(EEP_PARAM_ADDR); |
|
|
L0_Iap_Erase(EEP_PARAM_ADDR); |
|
|
L0_Iap_Program_array(EEP_PARAM_ADDR, (U8*)&eep_param, 2 + dlen + 2); |
|
|
L0_Iap_Program_array(EEP_PARAM_ADDR, (U8*)&eep_param, 2 + dlen + 2); |
|
|
#endif |
|
|
#endif |
|
|
if(L1_eep_write_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_PARAM_BLOCK_SIZE, (U8*)&G.p,sizeof(G.p),TRUE) == 0) |
|
|
if(L1_eep_write_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_SECTOR_BLOCK_SIZE, (U8*)&G.p,sizeof(G.p),TRUE) == 0) |
|
|
{ |
|
|
{ |
|
|
//L0_uart0_sendstr("e2p write success");
|
|
|
//L0_uart0_sendstr("e2p write success");
|
|
|
return; |
|
|
return; |
|
@ -109,7 +109,7 @@ int L3_mcu_id_ok(void) |
|
|
U8 i = 0; |
|
|
U8 i = 0; |
|
|
|
|
|
|
|
|
//1. 获取eeprom中存储的enc信息
|
|
|
//1. 获取eeprom中存储的enc信息
|
|
|
if(L1_eep_read_block(D_EEP_ENC_IN_SECTOR, D_EEP_ENC_IN_BLOCK, D_EEP_ENC_BLOCK_SIZE, (U8*)&eep_enc,NULL) == 1) |
|
|
if(L1_eep_read_block(D_EEP_ENC_IN_SECTOR, D_EEP_ENC_IN_BLOCK, D_EEP_SECTOR_BLOCK_SIZE, (U8*)&eep_enc,NULL) == 1) |
|
|
{ |
|
|
{ |
|
|
//L0_uart0_sendstr("e2p read enc failed");
|
|
|
//L0_uart0_sendstr("e2p read enc failed");
|
|
|
return 0; |
|
|
return 0; |
|
|