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
9a2ea4c4
Commit
9a2ea4c4
authored
Aug 15, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修改保养存储策略
parent
18921f19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
eeManager_Interface.c
Firmware/Source/Component/Eeprom/eeManager_Interface.c
+6
-6
Service_Interval.c
...ware/Source/Component/Service_Interval/Service_Interval.c
+29
-9
No files found.
Firmware/Source/Component/Eeprom/eeManager_Interface.c
View file @
9a2ea4c4
...
...
@@ -62,7 +62,7 @@ void EE_SDA_InConfig(void)
--------------------------------------------------------------------------*/
void
EE_SDA_OutConfig
(
void
)
{
RTE_GPIO_Config
(
EE_SDA
,
RTE_GPIO_
OUTPUT_OD
);
RTE_GPIO_Config
(
EE_SDA
,
RTE_GPIO_
DIR_OUT
);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_GetValue
...
...
@@ -89,8 +89,8 @@ ee_uint8_t EE_SDA_GetValue(void)
--------------------------------------------------------------------------*/
void
EE_SDA_OUT
(
ee_uint8_t
data
)
{
RTE_GPIO_Config
(
EE_SDA
,
RTE_GPIO_DIR_OUT
|
data
);
//
RTE_GPIO_Set_Level(EE_SDA, data);
//
RTE_GPIO_Config(EE_SDA, RTE_GPIO_DIR_OUT | data);
RTE_GPIO_Set_Level
(
EE_SDA
,
data
);
}
/*-------------------------------------------------------------------------
...
...
@@ -103,7 +103,7 @@ void EE_SDA_OUT(ee_uint8_t data)
--------------------------------------------------------------------------*/
void
EE_SCL_OutConfig
(
void
)
{
RTE_GPIO_Config
(
EE_SCL
,
RTE_GPIO_
OUTPUT_OD
);
RTE_GPIO_Config
(
EE_SCL
,
RTE_GPIO_
DIR_OUT
);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SCL_OUT
...
...
@@ -115,8 +115,8 @@ void EE_SCL_OutConfig(void)
--------------------------------------------------------------------------*/
void
EE_SCL_OUT
(
ee_uint8_t
data
)
{
RTE_GPIO_Config
(
EE_SCL
,
RTE_GPIO_DIR_OUT
|
data
);
//
RTE_GPIO_Set_Level(EE_SCL, data);
//
RTE_GPIO_Config(EE_SCL, RTE_GPIO_DIR_OUT | data);
RTE_GPIO_Set_Level
(
EE_SCL
,
data
);
}
/*-------------------------------------------------------------------------
...
...
Firmware/Source/Component/Service_Interval/Service_Interval.c
View file @
9a2ea4c4
...
...
@@ -276,16 +276,17 @@ void Service_Interval_TimerSleepFix(Intlib_uint32_t FixTimer)
void
Service_Interval_SetKm
(
Intlib_uint32_t
IntervalKm
)
{
DataIntervalSave_t
DataIntervalSave
;
if
(
g_IntervalCalc
!=
Intlib_NULL
)
DataIntervalSave_t
ReadDataIntervalSave
;
Intlib_uint8_t
u8Errcount
=
0
;
if
(
g_IntervalCalc
!=
Intlib_NULL
)
{
g_IntervalCalc
->
Interval100m
=
IntervalKm
*
10
;
g_IntervalCalc
->
MilAfterReset
=
g_ReadODO_Cbk
(
);
g_IntervalCalc
->
Interval100m
=
IntervalKm
*
10
;
g_IntervalCalc
->
MilAfterReset
=
g_ReadODO_Cbk
();
DataIntervalSave
.
Flag
=
0x7887A55A
;
DataIntervalSave
.
Interval100m
=
g_IntervalCalc
->
Interval100m
;
DataIntervalSave
.
Flag
=
0x7887A55A
;
DataIntervalSave
.
Interval100m
=
g_IntervalCalc
->
Interval100m
;
DataIntervalSave
.
MilAfterReset
=
g_IntervalCalc
->
MilAfterReset
;
if
(
g_IntervalCalc
->
IntervalDayEnable
)
if
(
g_IntervalCalc
->
IntervalDayEnable
)
{
DataIntervalSave
.
Interval1s
=
g_IntervalCalc
->
Interval1s
;
DataIntervalSave
.
TotalTimer
=
g_IntervalCalc
->
CurTimer_1s
;
...
...
@@ -296,9 +297,28 @@ void Service_Interval_SetKm(Intlib_uint32_t IntervalKm)
DataIntervalSave
.
TotalTimer
=
0u
;
}
if
(
g_EEPromWrite_Cbk
!=
Intlib_NULL
)
while
(
u8Errcount
<
3
)
{
g_EEPromWrite_Cbk
((
Intlib_uint32_t
*
)
&
DataIntervalSave
,
sizeof
(
DataIntervalSave_t
)
/
4
);
if
(
g_EEPromWrite_Cbk
!=
Intlib_NULL
)
{
g_EEPromWrite_Cbk
((
Intlib_uint32_t
*
)
&
DataIntervalSave
,
sizeof
(
DataIntervalSave_t
)
/
4
);
}
if
(
g_EEPromRead_Cbk
!=
Intlib_NULL
)
{
g_EEPromRead_Cbk
((
Intlib_uint32_t
*
)
&
ReadDataIntervalSave
,
sizeof
(
DataIntervalSave_t
)
/
4
);
}
if
(
memcmp
(
&
DataIntervalSave
,
&
ReadDataIntervalSave
,
sizeof
(
DataIntervalSave_t
))
==
0
)
{
break
;
}
u8Errcount
++
;
if
(
u8Errcount
>=
3
)
{
break
;
}
Gen_TimeDelay
(
10
*
1000u
,
50u
);
}
}
}
...
...
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