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
0dcd2258
Commit
0dcd2258
authored
Jul 16, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/ty/tianying_ty100
into CHENJIALE
parents
964c1cad
9d6df02e
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
624 additions
and
162 deletions
+624
-162
TianYing.uvprojx
...ware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
+19
-9
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+2
-1
Components.h
Firmware/Source/Component/Components.h
+2
-1
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+10
-2
Maintenance.c
Firmware/Source/Component/Maintenance/Maintenance.c
+0
-99
Maintenance.h
Firmware/Source/Component/Maintenance/Maintenance.h
+0
-18
Services_Mileage_User.c
Firmware/Source/Component/Mileage/Services_Mileage_User.c
+13
-29
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+2
-2
Service_Interval.c
...ware/Source/Component/Service_Interval/Service_Interval.c
+377
-0
Service_Interval.h
...ware/Source/Component/Service_Interval/Service_Interval.h
+63
-0
Service_Interval_User.c
...Source/Component/Service_Interval/Service_Interval_User.c
+120
-0
Service_Interval_User.h
...Source/Component/Service_Interval/Service_Interval_User.h
+14
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+1
-1
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
View file @
0dcd2258
...
...
@@ -275,7 +275,7 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>
1
</Type>
<StartAddress>
0x
800
0
</StartAddress>
<StartAddress>
0x0
</StartAddress>
<Size>
0x40000
</Size>
</OCR_RVCT4>
<OCR_RVCT5>
...
...
@@ -849,24 +849,34 @@
<FilePath>
..\..\..\..\Source\Component\LED_Driver\LED_Driver_V1.3.lib
</FilePath>
</File>
<File>
<FileName>
Maintenance
.c
</FileName>
<FileName>
System_Monitor
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Component\
Maintenance\Maintenance
.c
</FilePath>
<FilePath>
..\..\..\..\Source\Component\
System_Monitor\System_Monitor
.c
</FilePath>
</File>
<File>
<FileName>
Maintenance
.h
</FileName>
<FileName>
System_Monitor
.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\
Maintenance\Maintenance
.h
</FilePath>
<FilePath>
..\..\..\..\Source\Component\
System_Monitor\System_Monitor
.h
</FilePath>
</File>
<File>
<FileName>
S
ystem_Monitor
.c
</FileName>
<FileName>
S
ervice_Interval
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Component\S
ystem_Monitor\System_Monitor
.c
</FilePath>
<FilePath>
..\..\..\..\Source\Component\S
ervice_Interval\Service_Interval
.c
</FilePath>
</File>
<File>
<FileName>
S
ystem_Monitor
.h
</FileName>
<FileName>
S
ervice_Interval
.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\System_Monitor\System_Monitor.h
</FilePath>
<FilePath>
..\..\..\..\Source\Component\Service_Interval\Service_Interval.h
</FilePath>
</File>
<File>
<FileName>
Service_Interval_User.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Component\Service_Interval\Service_Interval_User.c
</FilePath>
</File>
<File>
<FileName>
Service_Interval_User.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\Service_Interval\Service_Interval_User.h
</FilePath>
</File>
</Files>
</Group>
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
0dcd2258
...
...
@@ -36,8 +36,9 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\powermanag_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\system_monitor_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\telltales_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\maintenance.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\system_monitor.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\service_interval.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\service_interval_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\rte_tick_timer_bat32a239.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\rte_wdt_bat32a239.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\rte_gpio_bat32a239.__i"
...
...
Firmware/Source/Component/Components.h
View file @
0dcd2258
...
...
@@ -31,7 +31,8 @@
#include "TrmerM\TrmerM.h"
#include "RTC\RTE_RTC.h"
#include "AD\RTE_AD.h"
#include "Maintenance\Maintenance.h"
#include "Service_Interval\Service_Interval.h"
#include "Service_Interval\Service_Interval_User.h"
...
...
Firmware/Source/Component/Key/Key_user.c
View file @
0dcd2258
...
...
@@ -494,6 +494,7 @@ void TYW_RESET_ODO(void)
{
ClearODO_Flag
=
1
;
Data_Mileage_Clear
();
Service_Interval_First_Reset
(
);
/*保养*/
eeprom_WriteRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_01
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_02
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
...
...
@@ -512,9 +513,16 @@ void TYW_RESET_ODO(void)
void
Maintain_Reset_Service
(
void
)
{
if
((
Get_
Data_Maintenace_Interval_Processing
()
==
0
)
&&
(
PageMenu
!=
Page_Trip
)
&&
(
PageMenu
!=
Page_TCS
)
&&
(
PageType
==
Page_Menu
))
if
((
Get_
SERVICE_WARNING_ForCan
()
==
1
)
&&
(
PageMenu
!=
Page_Trip
)
&&
(
PageMenu
!=
Page_TCS
)
&&
(
PageType
==
Page_Menu
))
{
Data_Maintenance_Interval_Reset
();
if
(
Get_Interval_SetKm
()
==
5000
)
//0.1
{
Service_Interval_Second_Reset
();
}
else
{
Service_Interval_SetKm
(
2000
);
}
}
}
...
...
Firmware/Source/Component/Maintenance/Maintenance.c
deleted
100644 → 0
View file @
964c1cad
#include "Maintenance.h"
/*** 保养里程 ***/
uint32_t
DataServiceInterval
=
0xFFFFu
;
uint32_t
NVM_User_Settings_Service
;
/***********临时接口*********/
/******************************************************************************
Data_Maintenance_Interval_Set
功 能: 写入保养
参 数: 无
返回值:无
******************************************************************************/
void
Data_Maintenance_Interval_Set
(
uint32_t
u32Data
)
{
uint32_t
u32Data1
[
1u
]
=
{
0
};
u32Data1
[
0u
]
=
u32Data
;
Data_User_EEPROM_Write
(
EM_Maintenance_BLOCK
,
u32Data1
,
1u
);
}
/******************************************************************************
Data_Maintenance_Interval_Set_Flag
功 能: 写入保养标志
参 数: 无
返回值:无
******************************************************************************/
void
Data_Maintenance_Interval_Set_Flag
(
uint32_t
u32Data
)
{
uint32_t
u32Data1
[
1u
]
=
{
0
};
u32Data1
[
0u
]
=
u32Data
;
Data_User_EEPROM_Write
(
EM_Maintenance_Firstflg
,
u32Data1
,
1u
);
}
/******************************************************************************
函数名:Data_Service_Interval_Processing
功 能: 剩余保养里程处理
参 数: 无
返回值:无
******************************************************************************/
uint32_t
Get_Data_Maintenace_Interval_Processing
(
void
)
{
uint32_t
MileageDev
=
0
;
uint32_t
Servicekm
=
0
;
uint32_t
ODO_Data
=
0
;
ODO_Data
=
Data_ODO_Read
()
/
10
;
if
(
ODO_Data
>=
NVM_User_Settings_Service
)
{
Servicekm
=
0u
;
}
else
{
MileageDev
=
NVM_User_Settings_Service
-
ODO_Data
;
Servicekm
=
MileageDev
;
}
if
(
Servicekm
>=
2000u
)
{
Servicekm
=
2000u
;
}
DataServiceInterval
=
Servicekm
;
return
DataServiceInterval
;
}
/******************************************************************************
函数名:Data_Service_Interval_Reset
功 能: 重置保养里程
参 数: 无
返回值:无
******************************************************************************/
void
Data_Maintenance_Interval_Reset
(
void
)
{
uint32_t
ODO_Data
=
0
;
uint32_t
u32Data
[
1u
]
=
{
0
};
uint32_t
Maintenance_Firstflg
[
1u
]
=
{
0
};
ODO_Data
=
Data_ODO_Read
()
/
10u
;
Data_User_EEPROM_Read
(
EM_Maintenance_Firstflg
,
Maintenance_Firstflg
,
1u
);
if
(
Maintenance_Firstflg
[
0u
]
==
0xFFFFFFFF
)
{
NVM_User_Settings_Service
=
ODO_Data
+
1000
;
u32Data
[
0u
]
=
NVM_User_Settings_Service
;
Data_User_EEPROM_Write
(
EM_Maintenance_BLOCK
,
u32Data
,
1u
);
Maintenance_Firstflg
[
0u
]
=
1
;
Data_User_EEPROM_Write
(
EM_Maintenance_Firstflg
,
Maintenance_Firstflg
,
1u
);
}
else
if
(
Maintenance_Firstflg
[
0u
]
==
1
)
{
NVM_User_Settings_Service
=
ODO_Data
+
2000
;
u32Data
[
0u
]
=
NVM_User_Settings_Service
;
Data_User_EEPROM_Write
(
EM_Maintenance_BLOCK
,
u32Data
,
1u
);
}
}
Firmware/Source/Component/Maintenance/Maintenance.h
deleted
100644 → 0
View file @
964c1cad
#ifndef MAINTENANCE_H
#define MAINTENANCE_H
#include "Components.h"
#include "Application.h"
extern
uint32_t
NVM_User_Settings_Service
;
/******获取剩余保养里程*******/
uint32_t
Get_Data_Maintenace_Interval_Processing
(
void
);
//用来判断
/********重置保养里程*********/
void
Data_Maintenance_Interval_Reset
(
void
);
//用按键重置
extern
void
Data_Maintenance_Interval_Set
(
uint32_t
u32Data
);
void
Data_Maintenance_Interval_Set_Flag
(
uint32_t
u32Data
);
#endif
Firmware/Source/Component/Mileage/Services_Mileage_User.c
View file @
0dcd2258
#include "Components.h"
__align
(
4
)
uint8_t
DataMilleageBuf
[
Data_MEM_Block_Mileage
];
uint8_t
DataMilleageBuf
[
Data_MEM_Block_Mileage
];
uint8_t
DataODOBuf
[
Data_MEM_Block_ODO
];
uint8_t
DataTripBuf
[
Data_MEM_Block_Trip
*
EM_TRIP_MAX
];
Mileage_t
g_WriteMileage
;
Mileage_t
g_ReadMileage
;
uint8_t
odo_writeState
;
uint8_t
odo_readState
;
extern
uint32_t
NVM_User_Settings_Service
;
uint32_t
Milleage_InitFlag
=
0U
;
/******************************************************************************
Function:Data_ODO_KL30Init
Description:
...
...
@@ -97,14 +89,6 @@ void Data_User_Mileage_KL30Init(void)
TripInit
[
EM_TRIP_D
].
IsRestart
=
1u
;
Data_Trip_KL30_Init
(
DataTripBuf
,
TripInit
,
EM_TRIP_MAX
,
Func
.
EEPromWrite_Cbk
);
Data_User_EEPROM_Read
(
EM_Maintenance_BLOCK
,
TempBuf
,
1u
);
NVM_User_Settings_Service
=
TempBuf
[
0u
];
if
(
TempBuf
[
0u
]
==
0xFFFFFFFF
)
{
NVM_User_Settings_Service
=
500
;
Data_User_EEPROM_Write
(
EM_Maintenance_BLOCK
,
&
NVM_User_Settings_Service
,
1u
);
}
Data_User_EEPROM_Read
(
EM_MenuData_Tcs_Val
,
TempBuf
,
1u
);
if
(
TempBuf
[
0u
]
==
0xFFFFFFFF
)
{
...
...
@@ -167,13 +151,13 @@ uint32_t Get_MileageInit_Status(void)
eeprom_ReadRecord
(
EEPROM_BLOCK_03
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
case
EM_Maintenance_BLOCK
:
eeprom_ReadRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
//
case EM_Maintenance_BLOCK:
//
eeprom_ReadRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
//
break;
case
EM_Maintenance_Firstflg
:
eeprom_ReadRecord
(
EEPROM_BLOCK_07
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
//
case EM_Maintenance_Firstflg:
//
eeprom_ReadRecord(EEPROM_BLOCK_07, (uint8_t *)u32Data, u16Len * 4);
//
break;
case
EM_MenuData_Tcs_Val
:
eeprom_ReadRecord
(
EEPROM_BLOCK_08
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
...
...
@@ -216,13 +200,13 @@ uint32_t Get_MileageInit_Status(void)
eeprom_WriteRecord
(
EEPROM_BLOCK_03
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
case
EM_Maintenance_BLOCK
:
eeprom_WriteRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
//
case EM_Maintenance_BLOCK:
//
eeprom_WriteRecord(EEPROM_BLOCK_05, (uint8_t *)u32Data, u16Len * 4);
//
break;
case
EM_Maintenance_Firstflg
:
eeprom_WriteRecord
(
EEPROM_BLOCK_07
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
//
case EM_Maintenance_Firstflg:
//
eeprom_WriteRecord(EEPROM_BLOCK_07, (uint8_t *)u32Data, u16Len * 4);
//
break;
case
EM_MenuData_Tcs_Val
:
eeprom_WriteRecord
(
EEPROM_BLOCK_08
,
(
uint8_t
*
)
u32Data
,
u16Len
*
1
);
break
;
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
0dcd2258
...
...
@@ -78,7 +78,7 @@ static void Power_KL30_Init(void)
// TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHC, ActiveLevel_High);
// TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHD, ActiveLevel_High);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
Service_Interval_User_KL30Init
();
Telltales_Init
();
Telltales_UserInit
();
MenuData_Unit_Init
();
...
...
@@ -140,7 +140,7 @@ static void Power_Wakeup_Init(void)
Data_TPMS_KL15_WAKE_UP_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
FaultCode_Init
();
Service_Interval_User_WakeupInit
();
CAN_TX_Count_Init
();
}
...
...
Firmware/Source/Component/Service_Interval/Service_Interval.c
0 → 100644
View file @
0dcd2258
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/Service_Interval/Service_Interval.h
0 → 100644
View file @
0dcd2258
#ifndef SERVICE_INTERVAL_H
#define SERVICE_INTERVAL_H
/*
Platform_32Bit
Platform_16Bit
*/
#ifdef Platform_16Bit
#define Intlib_uint8_t unsigned char
#define Intlib_uint16_t unsigned int
#define Intlib_uint32_t unsigned long
#else
#define Intlib_uint8_t unsigned char
#define Intlib_uint16_t unsigned short
#define Intlib_uint32_t unsigned int
#define Intlib_uint64_t unsigned long long
#endif
#ifndef Intlib_NULL
#define Intlib_NULL ( void * )0u
#endif
/* NULL */
#define Int_PowerON 1u
/**< 电源状态 KL15 ON */
#define Int_PowerOFF 0u
/**< 电源状态 KL15 ON */
typedef
Intlib_uint8_t
(
*
Int_PowerSts
)(
void
);
typedef
Intlib_uint32_t
(
*
Int_ReadODO
)(
void
);
typedef
void
(
*
Int_EEPromWrite
)(
Intlib_uint32_t
u32Data
[],
Intlib_uint16_t
u16Len
);
typedef
void
(
*
Int_EEPromRead
)(
Intlib_uint32_t
u32Data
[],
Intlib_uint16_t
u16Len
);
typedef
struct
{
Int_PowerSts
PowerSts_Cbk
;
/**< 获取系统电源状态回调 */
Int_ReadODO
ReadODO_Cbk
;
/**< 获取当前总计里程回调 */
Int_EEPromWrite
EEPromWrite_Cbk
;
/**< 写EEPROM回调函数 */
Int_EEPromRead
EEPromRead_Cbk
;
/**< 从EEPROM读取保养相关数据回调 */
}
Maintain_Func_t
;
typedef
struct
{
Intlib_uint32_t
IntervalDayEnable
;
/**< 保养天数功能使能,0:无此功能 1:使能 */
Intlib_uint32_t
IntervalKm
;
/**< 系统设定的保养里程间隔,单位km,这里特指首次保养的里程间隔,如不区分首次,则为默认值 */
Intlib_uint32_t
IntervalDay
;
/**< 系统设定的保养天数间隔,单位天,这里特指首次保养的天数间隔,如不区分首次,则为默认值 */
}
Maintain_Init_t
;
#define Data_MEM_Block_Maintain (( Intlib_uint8_t )32u)
/**< 此功能库,需要的内存空间大小,此为最小值 */
void
Service_Interval_KL30_Init
(
Intlib_uint8_t
*
pMemSpace
,
Maintain_Init_t
*
pInitData
,
Maintain_Func_t
*
pFunc
);
void
Service_Interval_Wakeup_Init
(
Intlib_uint8_t
*
pMemSpace
,
Maintain_Func_t
*
pFunc
);
void
Service_Interval_Processing
(
void
);
void
Service_Interval_TimerISR
(
void
);
void
Service_Interval_TimerSleepFix
(
Intlib_uint32_t
FixTimer
);
void
Service_Interval_SetKm
(
Intlib_uint32_t
IntervalKm
);
void
Service_Interval_SetDay
(
Intlib_uint32_t
IntervalDay
);
Intlib_uint32_t
Service_Interval_GetMil100m
(
void
);
Intlib_uint32_t
Service_Interval_GetDay
(
void
);
Intlib_uint32_t
Get_Interval_SetKm
(
void
);
#endif
Firmware/Source/Component/Service_Interval/Service_Interval_User.c
0 → 100644
View file @
0dcd2258
#include "Service_Interval.h"
#include "Service_Interval_User.h"
uint8_t
__attribute__
((
aligned
(
4
)))
DataMaintainBuf
[
Data_MEM_Block_Maintain
];
static
void
Service_Interval_Write_EEProm
(
uint32_t
u32Data
[],
uint16_t
u16Len
);
static
void
Service_Interval_Read_EEProm
(
uint32_t
u32Data
[],
uint16_t
u16Len
);
void
Service_Interval_User_KL30Init
(
void
)
{
Maintain_Init_t
InitData
;
Maintain_Func_t
Func
;
InitData
.
IntervalDayEnable
=
0
;
//默认值
InitData
.
IntervalDay
=
90
;
InitData
.
IntervalKm
=
500
;
//回调函数
Func
.
PowerSts_Cbk
=
Common_Get_IG_Sts
;
Func
.
ReadODO_Cbk
=
Data_ODO_Read
;
Func
.
EEPromWrite_Cbk
=
Service_Interval_Write_EEProm
;
Func
.
EEPromRead_Cbk
=
Service_Interval_Read_EEProm
;
Service_Interval_KL30_Init
(
DataMaintainBuf
,
&
InitData
,
&
Func
);
}
void
Service_Interval_User_WakeupInit
(
void
)
{
Maintain_Func_t
Func
;
//回调函数
Func
.
PowerSts_Cbk
=
Common_Get_IG_Sts
;
Func
.
ReadODO_Cbk
=
Data_ODO_Read
;
Func
.
EEPromWrite_Cbk
=
Service_Interval_Write_EEProm
;
Func
.
EEPromRead_Cbk
=
Service_Interval_Read_EEProm
;
Service_Interval_Wakeup_Init
(
DataMaintainBuf
,
&
Func
);
}
void
Service_Interval_First_Reset
(
void
)
{
Service_Interval_SetKm
(
500
);
// 500km
}
void
Service_Interval_Second_Reset
(
void
)
{
Service_Interval_SetKm
(
1000
);
// 1000km
}
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
);
}
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
);
}
uint32_t
g_ServiceMil100m
=
0
;
uint8_t
Get_SERVICE_WARNING_ForCan
(
void
)
{
uint8_t
Res
;
uint32_t
m_Condition_1
;
m_Condition_1
=
Service_Interval_GetMil100m
();
g_ServiceMil100m
=
Service_Interval_GetMil100m
();
if
(
m_Condition_1
<=
0u
)
{
Res
=
1u
;
/*87606-4*/
}
else
{
Res
=
0u
;
/*87606-5*/
}
return
Res
;
}
Firmware/Source/Component/Service_Interval/Service_Interval_User.h
0 → 100644
View file @
0dcd2258
#ifndef SERVICE_INTERVAL_USER_H
#define SERVICE_INTERVAL_USER_H
#include "Components.h"
void
Service_Interval_User_KL30Init
(
void
);
void
Service_Interval_User_WakeupInit
(
void
);
void
Service_Interval_First_Reset
(
void
);
void
Service_Interval_Second_Reset
(
void
);
void
Service_Interval_WriteKm
(
uint32_t
IntervalKm
);
uint8_t
Get_SERVICE_WARNING_ForCan
(
void
);
#endif
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
0dcd2258
...
...
@@ -496,7 +496,7 @@ static void LED_Auto_Start_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Maintain_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Get_
Data_Maintenace_Interval_Processing
()
==
0
)
if
(
Get_
SERVICE_WARNING_ForCan
()
==
1
)
{
LED_STATE
=
1
;
}
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
0dcd2258
...
...
@@ -88,6 +88,7 @@ void Sys_100ms_Tasks(void)
counter_val
.
time
.
RTC_Hours
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Hours
);
counter_val
.
time
.
RTC_Minutes
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Minutes
);
}
Service_Interval_Processing
();
Fuel_Cal_Sevice
(
100u
);
BackLight_Process
();
Services_Mileage_Callback
();
...
...
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