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
acb1d22f
Commit
acb1d22f
authored
Jul 17, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修改存储地址区域32个字节为一个区域,地址0xa0不使用
parent
8e1d2405
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
50 deletions
+33
-50
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/Mileage/Services_Mileage_User.h
View file @
acb1d22f
...
...
@@ -11,15 +11,15 @@
#define ODO_CLEAR_MIL 50000u
/*清除距离上限值 单位0.1KM*/
#define EEPROM_BLOCK_00 0x00
#define EEPROM_BLOCK_01 0x
16
#define EEPROM_BLOCK_02 0x
32
#define EEPROM_BLOCK_03 0x
48
#define EEPROM_BLOCK_04 0x
64
#define EEPROM_BLOCK_05 0x
8
0
#define EEPROM_BLOCK_06 0x
9
0
#define EEPROM_BLOCK_07 0x
A
0
#define EEPROM_BLOCK_08 0x
B
0
#define EEPROM_BLOCK_09 0x
C
0
#define EEPROM_BLOCK_01 0x
20
#define EEPROM_BLOCK_02 0x
40
#define EEPROM_BLOCK_03 0x
60
#define EEPROM_BLOCK_04 0x
80
#define EEPROM_BLOCK_05 0x
C
0
#define EEPROM_BLOCK_06 0x
E
0
#define EEPROM_BLOCK_07 0x
10
0
#define EEPROM_BLOCK_08 0x
12
0
#define EEPROM_BLOCK_09 0x
14
0
extern
uint8_t
ODO_Clear_Num_Value
;
...
...
Firmware/Source/Component/Service_Interval/Service_Interval_User.c
View file @
acb1d22f
...
...
@@ -50,51 +50,34 @@ void Service_Interval_Second_Reset(void)
static
void
Service_Interval_Write_EEProm
(
uint32_t
u32Data
[],
uint16_t
u16Len
)
{
// uint32_t i = 0;
// uint32_t j = 1;
// uint32_t retryCnt = 0;
// r_eel_status_t status = R_EEL_BUSY;
// while ( status != R_EEL_OK )
// {
// if ( j == 1 )
// {
// j = 0;
// 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
);
ee_uint16_t
tmpWritestatus
=
0
;
ee_uint16_t
Cnt
=
0
;
tmpWritestatus
=
eeprom_WriteRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
while
(
tmpWritestatus
==
WRITING
)
{
tmpWritestatus
=
eeprom_WriteRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
Cnt
++
;
if
(
Cnt
>=
1000
)
{
break
;
}
}
}
static
void
Service_Interval_Read_EEProm
(
uint32_t
u32Data
[],
uint16_t
u16Len
)
{
// uint32_t i
= 0;
// r_eel_status_t status = R_EEL_BUSY
;
// status = Internal_EEL_Read(INTERNAL_EE_BLOCK_09, ( uint8_t * )u32Data, u16Len * 4);
// if ( status != R_EEL_OK )
// {
// for ( i = 0; i < u16Len; i++ )
// {
// u32Data [ i ] = 0u;
// }
//
}
eeprom_ReadRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
ee_uint16_t
tmpReadstatus
=
0
;
ee_uint16_t
Cnt
=
0
;
tmpReadstatus
=
eeprom_ReadRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
while
(
tmpReadstatus
==
READING
)
{
tmpReadstatus
=
eeprom_ReadRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
Cnt
++
;
if
(
Cnt
>=
1000
)
{
break
;
}
}
}
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