Commit adf95d2f authored by 李俭双's avatar 李俭双

Merge branch 'shihao' into 'dev'

Shihao

See merge request !53
parents bcd73fec acb1d22f
...@@ -485,7 +485,7 @@ uint8_t ClearODO_Flag = 0; ...@@ -485,7 +485,7 @@ uint8_t ClearODO_Flag = 0;
void TYW_RESET_ODO(void) void TYW_RESET_ODO(void)
{ {
uint8_t Clear_EE[4] = {0xff, 0xff, 0xff, 0xff}; uint8_t Clear_EE[4] = {0xff, 0xff, 0xff, 0xff};
uint8_t Clear_EE_8[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
if(SYS_OPR_STAT_IGN_ON) if(SYS_OPR_STAT_IGN_ON)
{ {
if(ClearODO_Flag < 1) if(ClearODO_Flag < 1)
...@@ -500,7 +500,7 @@ void TYW_RESET_ODO(void) ...@@ -500,7 +500,7 @@ void TYW_RESET_ODO(void)
eeprom_WriteRecord(EEPROM_BLOCK_02, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_02, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_03, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_03, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_04, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_04, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_05, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_05, ( uint8_t * )&Clear_EE_8, 8);
eeprom_WriteRecord(EEPROM_BLOCK_06, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_06, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_07, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_07, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_08, ( uint8_t * )&Clear_EE, 4); eeprom_WriteRecord(EEPROM_BLOCK_08, ( uint8_t * )&Clear_EE, 4);
......
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
#define ODO_CLEAR_MIL 50000u /*清除距离上限值 单位0.1KM*/ #define ODO_CLEAR_MIL 50000u /*清除距离上限值 单位0.1KM*/
#define EEPROM_BLOCK_00 0x00 #define EEPROM_BLOCK_00 0x00
#define EEPROM_BLOCK_01 0x16 #define EEPROM_BLOCK_01 0x20
#define EEPROM_BLOCK_02 0x32 #define EEPROM_BLOCK_02 0x40
#define EEPROM_BLOCK_03 0x48 #define EEPROM_BLOCK_03 0x60
#define EEPROM_BLOCK_04 0x64 #define EEPROM_BLOCK_04 0x80
#define EEPROM_BLOCK_05 0x80 #define EEPROM_BLOCK_05 0xC0
#define EEPROM_BLOCK_06 0x90 #define EEPROM_BLOCK_06 0xE0
#define EEPROM_BLOCK_07 0xA0 #define EEPROM_BLOCK_07 0x100
#define EEPROM_BLOCK_08 0xB0 #define EEPROM_BLOCK_08 0x120
#define EEPROM_BLOCK_09 0xC0 #define EEPROM_BLOCK_09 0x140
extern uint8_t ODO_Clear_Num_Value; extern uint8_t ODO_Clear_Num_Value;
......
...@@ -50,51 +50,34 @@ void Service_Interval_Second_Reset(void) ...@@ -50,51 +50,34 @@ void Service_Interval_Second_Reset(void)
static void Service_Interval_Write_EEProm(uint32_t u32Data [], uint16_t u16Len) static void Service_Interval_Write_EEProm(uint32_t u32Data [], uint16_t u16Len)
{ {
// uint32_t i = 0; ee_uint16_t tmpWritestatus = 0;
// uint32_t j = 1; ee_uint16_t Cnt = 0;
// uint32_t retryCnt = 0; tmpWritestatus = eeprom_WriteRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
// r_eel_status_t status = R_EEL_BUSY; while(tmpWritestatus == WRITING)
{
// while ( status != R_EEL_OK ) tmpWritestatus = eeprom_WriteRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
// { Cnt++;
// if ( j == 1 ) if(Cnt >= 1000)
// { {
// j = 0; break;
// retryCnt++; }
// status = Internal_EEL_Write(INTERNAL_EE_BLOCK_09, ( uint8_t * )u32Data, u16Len * 4); }
// }
// else
// {
// i++;
// if ( i >= 100 )
// {
// i = 0;
// j = 1;
// }
// }
// if ( retryCnt > 3 )
// {
// break;
// }
// }
eeprom_WriteRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
} }
static void Service_Interval_Read_EEProm(uint32_t u32Data [], uint16_t u16Len) static void Service_Interval_Read_EEProm(uint32_t u32Data [], uint16_t u16Len)
{ {
// uint32_t i = 0; ee_uint16_t tmpReadstatus = 0;
// r_eel_status_t status = R_EEL_BUSY; ee_uint16_t Cnt = 0;
tmpReadstatus = eeprom_ReadRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
// status = Internal_EEL_Read(INTERNAL_EE_BLOCK_09, ( uint8_t * )u32Data, u16Len * 4); while(tmpReadstatus == READING)
// if ( status != R_EEL_OK ) {
// { tmpReadstatus = eeprom_ReadRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
// for ( i = 0; i < u16Len; i++ ) Cnt++;
// { if(Cnt >= 1000)
// u32Data [ i ] = 0u; {
// } break;
// } }
eeprom_ReadRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4); }
} }
uint32_t g_ServiceMil100m = 0; uint32_t g_ServiceMil100m = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment