| | |
| | | .ip_port2 = 9692, \ |
| | | .ip2_connect_type = LINK_TCP, \ |
| | | .bat_power_data_interval = 60, \ |
| | | .ext_power_data_interval = 60, \ |
| | | .ext_power_data_interval = 5, \ |
| | | .time_start_type = WRC_TIME_START_INTERVAL, \ |
| | | .bat_power_send_interval = 1440, \ |
| | | .ext_power_send_interval = 60, \ |
| | |
| | | if(length >1024) |
| | | return FAIL; |
| | | |
| | | EEPROM_CTRL_ENABLE; |
| | | EEPROM_MultipleWrite(write_data,addr,length); |
| | | |
| | | EEPROM_MultipleRead(buf_l,addr,length); |
| | | EEPROM_CTRL_DISABLE; |
| | | |
| | | return ucharcmp(write_data,buf_l,length); |
| | | } |
| | |
| | | ErrorStatus eepABWriteAndReadCheck(uint8_t * write_data,uint32_t addrA,uint32_t addrB,uint16_t length) |
| | | { |
| | | ErrorStatus return_flag = PASS; |
| | | |
| | | |
| | | if(eepWriteAndReadCheck(write_data,addrA,length)==FAIL) |
| | | { |
| | | if(eepWriteAndReadCheck(write_data,addrA,length)==FAIL) |
| | |
| | | if(length >1024) |
| | | return FAIL; |
| | | |
| | | EEPROM_CTRL_ENABLE; |
| | | for(count_i=0;count_i< read_times;count_i++) |
| | | { |
| | | memset (buf_l,0,sizeof (buf_l)); |
| | |
| | | break; |
| | | } |
| | | } |
| | | EEPROM_CTRL_DISABLE; |
| | | |
| | | if(read_flag == PASS) |
| | | { |
| | |
| | | return PASS; |
| | | }else |
| | | { |
| | | EEPROM_CTRL_ENABLE; |
| | | for(count_i=0;count_i< read_times;count_i++) |
| | | { |
| | | memset (buf_l,0,sizeof (buf_l)); |
| | |
| | | { |
| | | arrayA_2_arrayB(buf_l, read_data, length, LITTLE_ENDIAN) ; |
| | | EEPROM_MultipleWrite(buf_l,addrA,length);//AÇøÐ£Ñé´íÎó£¬BÇøÕýÈ·£¬Ôò½«BÇøÊý¾ÝдÈëAÇø |
| | | EEPROM_CTRL_DISABLE; |
| | | return PASS; |
| | | }else |
| | | { |
| | | EEPROM_CTRL_DISABLE; |
| | | return FAIL; |
| | | } |
| | | } |