Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TY
TianYing_ty100
Commits
adf95d2f
Commit
adf95d2f
authored
Jul 17, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shihao' into 'dev'
Shihao See merge request
!53
parents
bcd73fec
acb1d22f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
52 deletions
+35
-52
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+2
-2
Services_Mileage_User.h
Firmware/Source/Component/Mileage/Services_Mileage_User.h
+9
-9
Service_Interval_User.c
...Source/Component/Service_Interval/Service_Interval_User.c
+24
-41
No files found.
Firmware/Source/Component/Key/Key_user.c
View file @
adf95d2f
...
@@ -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
);
...
...
Firmware/Source/Component/Mileage/Services_Mileage_User.h
View file @
adf95d2f
...
@@ -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 0x
16
#define EEPROM_BLOCK_01 0x
20
#define EEPROM_BLOCK_02 0x
32
#define EEPROM_BLOCK_02 0x
40
#define EEPROM_BLOCK_03 0x
48
#define EEPROM_BLOCK_03 0x
60
#define EEPROM_BLOCK_04 0x
64
#define EEPROM_BLOCK_04 0x
80
#define EEPROM_BLOCK_05 0x
8
0
#define EEPROM_BLOCK_05 0x
C
0
#define EEPROM_BLOCK_06 0x
9
0
#define EEPROM_BLOCK_06 0x
E
0
#define EEPROM_BLOCK_07 0x
A
0
#define EEPROM_BLOCK_07 0x
10
0
#define EEPROM_BLOCK_08 0x
B
0
#define EEPROM_BLOCK_08 0x
12
0
#define EEPROM_BLOCK_09 0x
C
0
#define EEPROM_BLOCK_09 0x
14
0
extern
uint8_t
ODO_Clear_Num_Value
;
extern
uint8_t
ODO_Clear_Num_Value
;
...
...
Firmware/Source/Component/Service_Interval/Service_Interval_User.c
View file @
adf95d2f
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment