Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
7c76aa5c
Commit
7c76aa5c
authored
Jul 03, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加蜂鸣器和调整自检时间
parent
11c9b80e
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
275 additions
and
168 deletions
+275
-168
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+1
-1
GpioUser.c
Firmware/Source/Application/GPIO_USER/GpioUser.c
+1
-1
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+152
-76
GUI_Display.h
Firmware/Source/Application/GUI_Display/GUI_Display.h
+4
-0
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+46
-45
SEG_DISPLAY.h
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
+4
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+2
-4
System_Monitor.c
Firmware/Source/Component/System_Monitor/System_Monitor.c
+2
-2
System_Monitor_User.c
...are/Source/Component/System_Monitor/System_Monitor_User.c
+4
-4
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+19
-21
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+40
-14
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
7c76aa5c
...
@@ -15,7 +15,7 @@ void Can_Set_Buff_3A2(canlib_uint8_t CopyData[])
...
@@ -15,7 +15,7 @@ void Can_Set_Buff_3A2(canlib_uint8_t CopyData[])
p3A2
->
Sig
.
ICU_POWERStateFB
=
Get_CAN_Power_State
();
p3A2
->
Sig
.
ICU_POWERStateFB
=
Get_CAN_Power_State
();
p3A2
->
Sig
.
ICU_KL15State
=
(
Get_CAN_Power_State
()
!=
KEY_OFF
);
p3A2
->
Sig
.
ICU_KL15State
=
(
Get_CAN_Power_State
()
!=
KEY_OFF
);
p3A2
->
Sig
.
ICU_LEDLightState
=
Get_LINE_IN_BigLED
();
p3A2
->
Sig
.
ICU_LEDLightState
=
Get_LINE_IN_BigLED
();
p3A2
->
Sig
.
ICU_BuzzerState
=
1
;
//蜂鸣器
p3A2
->
Sig
.
ICU_BuzzerState
=
BUZZER_ON
;
//蜂鸣器
p3A2
->
Sig
.
Res0
=
0
;
p3A2
->
Sig
.
Res0
=
0
;
p3A2
->
Sig
.
ICU_IndicatorLightState
=
Get_Interact_Light_State
();
p3A2
->
Sig
.
ICU_IndicatorLightState
=
Get_Interact_Light_State
();
p3A2
->
Sig
.
ICU_IndicatorLightPowerState
=
1
;
p3A2
->
Sig
.
ICU_IndicatorLightPowerState
=
1
;
...
...
Firmware/Source/Application/GPIO_USER/GpioUser.c
View file @
7c76aa5c
...
@@ -42,7 +42,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
...
@@ -42,7 +42,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config
(
RTE_GPIO_PORT03_PIN01
,
GpioOut_Low
);
//SDB_LED_DRIVER
RTE_GPIO_Config
(
RTE_GPIO_PORT03_PIN01
,
GpioOut_Low
);
//SDB_LED_DRIVER
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN00
,
GpioOut_Low
);
//SEDIO-编程
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN00
,
GpioOut_Low
);
//SEDIO-编程
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN01
,
GpioOut_
High
);
//OUT_EN_1
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN01
,
GpioOut_
Low
);
//OUT_EN_1
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN02
,
RTE_GPIO_DIR_IN
);
//OUT_ST
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN02
,
RTE_GPIO_DIR_IN
);
//OUT_ST
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN03
,
GpioOut_High
);
//OUT_EN
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN03
,
GpioOut_High
);
//OUT_EN
...
...
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
7c76aa5c
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/GUI_Display/GUI_Display.h
View file @
7c76aa5c
...
@@ -36,6 +36,7 @@ typedef struct
...
@@ -36,6 +36,7 @@ typedef struct
#define BATTERY_SEG_MAP_MAX (sizeof(batterySegMap)/sizeof(BatterySegMap_st_t))
#define BATTERY_SEG_MAP_MAX (sizeof(batterySegMap)/sizeof(BatterySegMap_st_t))
#define POWERON_SCAN_TIMER 3000ul
#define POWERON_SCAN_TIMER 3000ul
extern
uint8_t
BUZZER_ON
;
void
Gauge_Power_SOC_pull_Display
(
void
);
void
Gauge_Power_SOC_pull_Display
(
void
);
// void Gauge_Power_2_SOC_Display(void);
// void Gauge_Power_2_SOC_Display(void);
...
@@ -60,6 +61,9 @@ void Gauge_Service(void);
...
@@ -60,6 +61,9 @@ void Gauge_Service(void);
void
Temp_Calc_Init
(
void
);
void
Temp_Calc_Init
(
void
);
void
Temp_Calc_Send
(
void
);
void
Temp_Calc_Send
(
void
);
uint32_t
Get_Temp_Calc
(
void
);
uint32_t
Get_Temp_Calc
(
void
);
void
Gauge_CAN_setup_Service
(
void
);
void
Checkself_LED_Display
(
void
);
void
BUZZER_Init
(
void
);
#endif
#endif
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
7c76aa5c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
const
uint8_t
SEG_DISPLAY_NUMBER0
[]
=
{
0x3Fu
,
0x06u
,
0x5Bu
,
0x4Fu
,
0x66u
,
0x6Du
,
0x7Du
,
0x07u
,
0x7Fu
,
0x6Fu
};
const
uint8_t
SEG_DISPLAY_NUMBER0
[]
=
{
0x3Fu
,
0x06u
,
0x5Bu
,
0x4Fu
,
0x66u
,
0x6Du
,
0x7Du
,
0x07u
,
0x7Fu
,
0x6Fu
};
const
uint8_t
SEG_UNDISPLAY_NUMBER0
[]
=
{
0x00u
,
0x06u
,
0x5Bu
,
0x4Fu
,
0x66u
,
0x6Du
,
0x7Du
,
0x07u
,
0x7Fu
,
0x6Fu
};
const
uint8_t
SEG_UNDISPLAY_NUMBER0
[]
=
{
0x00u
,
0x06u
,
0x5Bu
,
0x4Fu
,
0x66u
,
0x6Du
,
0x7Du
,
0x07u
,
0x7Fu
,
0x6Fu
};
uint8_t
SOC_charge_seg_Flag
=
0
;
uint8_t
SOC_charge_seg_Flag
=
0
;
uint8_t
checkself_seg_Flag
=
0
;
/**@brief 边框线显示函数
/**@brief 边框线显示函数
* @param[in] m_Flag 是否显示 -1 显示 -0 不显示
* @param[in] m_Flag 是否显示 -1 显示 -0 不显示
* @return 函数执行结果
* @return 函数执行结果
...
@@ -1051,7 +1051,7 @@ _Fun_Res SEG_SET_Fault_Code(uint8_t m_Flag, uint16_t m_NUM)
...
@@ -1051,7 +1051,7 @@ _Fun_Res SEG_SET_Fault_Code(uint8_t m_Flag, uint16_t m_NUM)
IC1_SEG083
=
IC_SEG_OFF
;
IC1_SEG083
=
IC_SEG_OFF
;
IC1_SEG084
=
IC_SEG_OFF
;
IC1_SEG084
=
IC_SEG_OFF
;
IC1_SEG085
=
IC_SEG_OFF
;
IC1_SEG085
=
IC_SEG_OFF
;
IC1_SEG086
=
IC_SEG_OFF
;
//
IC1_SEG086 = IC_SEG_OFF;
IC1_SEG087
=
IC_SEG_OFF
;
IC1_SEG087
=
IC_SEG_OFF
;
IC1_SEG088
=
IC_SEG_OFF
;
IC1_SEG088
=
IC_SEG_OFF
;
IC1_SEG089
=
IC_SEG_OFF
;
IC1_SEG089
=
IC_SEG_OFF
;
...
@@ -2033,7 +2033,7 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2033,7 +2033,7 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
IC2_SEG077
=
IC_SEG_ON
;
IC2_SEG077
=
IC_SEG_ON
;
Num
=
m_NUM
/
10000u
;
Num
=
m_NUM
/
10000u
;
if
(
m_NUM
>
10000
)
if
(
m_NUM
>
10000
||
checkself_seg_Flag
==
1
)
{
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
...
@@ -2100,7 +2100,7 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2100,7 +2100,7 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
}
}
/*千位*/
/*千位*/
Num
=
(
m_NUM
/
1000u
)
%
10u
;
Num
=
(
m_NUM
/
1000u
)
%
10u
;
if
(
m_NUM
>
1000
)
if
(
m_NUM
>
1000
||
checkself_seg_Flag
==
1
)
{
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
...
@@ -2167,7 +2167,7 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2167,7 +2167,7 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
}
}
/*百位*/
/*百位*/
Num
=
(
m_NUM
/
100u
)
%
10u
;
Num
=
(
m_NUM
/
100u
)
%
10u
;
if
(
m_NUM
>
100
)
if
(
m_NUM
>
100
||
checkself_seg_Flag
==
1
)
{
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
...
@@ -2434,10 +2434,13 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2434,10 +2434,13 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
uint8_t
Checkself_SEG_step
=
0
;
uint8_t
Checkself_SEG_step
=
0
;
uint8_t
Checkself_SEG_step_count
=
0
;
uint8_t
Checkself_SEG_step_count
=
0
;
uint16_t
Buzzer_time
=
0
;
void
Checkself_Init
(
void
)
void
Checkself_Init
(
void
)
{
{
Checkself_SEG_step
=
0
;
Checkself_SEG_step
=
0
;
Checkself_SEG_step_count
=
0
;
Checkself_SEG_step_count
=
0
;
checkself_seg_Flag
=
0
;
Buzzer_time
=
0
;
}
}
uint8_t
soc_all
=
0
;
uint8_t
soc_all
=
0
;
void
Checkself_SEG_Display
(
void
)
void
Checkself_SEG_Display
(
void
)
...
@@ -2447,59 +2450,30 @@ void Checkself_SEG_Display(void)
...
@@ -2447,59 +2450,30 @@ void Checkself_SEG_Display(void)
uint16_t
hour
=
0
;
uint16_t
hour
=
0
;
uint16_t
min
=
0
;
uint16_t
min
=
0
;
uint32_t
ODO
=
0
;
uint32_t
ODO
=
0
;
soc_all
=
(
Checkself_SEG_step
/
3
)
*
11
+
100
;
uint32_t
allhour
=
(
Checkself_SEG_step
/
3
)
*
11111
;
soc_all
=
(
Checkself_SEG_step
/
1
)
*
11
+
100
;
uint32_t
allhour
=
(
Checkself_SEG_step
/
1
)
*
11111
;
// Fuel = Checkself_SEG_step / 5u;
// Fuel = Checkself_SEG_step / 5u;
// SEG_SET_FuelDial(1, Fuel);
// SEG_SET_FuelDial(1, Fuel);
SEG_SET_EleDial_AllSOC
(
1
,
soc_all
);
SEG_SET_EleDial_AllSOC
(
1
,
soc_all
);
SEG_SET_EleDial_2SOC
(
1
,
(
Checkself_SEG_step
/
3
)
+
1
);
SEG_SET_EleDial_2SOC
(
1
,
(
Checkself_SEG_step
/
1
)
+
1
);
SEG_SET_EleDial_1SOC
(
1
,
(
Checkself_SEG_step
/
3
)
+
1
);
SEG_SET_EleDial_1SOC
(
1
,
(
Checkself_SEG_step
/
1
)
+
1
);
SEG_SET_Clock_ALL
(
1
,
allhour
);
SEG_SET_Clock_ALL
(
1
,
allhour
);
hour
=
(
Checkself_SEG_step
/
3
)
*
11
;
hour
=
(
Checkself_SEG_step
/
1
)
*
11
;
min
=
(
Checkself_SEG_step
/
3
)
*
11
;
min
=
(
Checkself_SEG_step
/
1
)
*
11
;
SEG_SET_Clock
(
hour
,
min
,
1
,
1
,
1
);
SEG_SET_Clock
(
hour
,
min
,
1
,
1
,
1
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_00_Grass_Full_R
,
LED_ON
);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON);
if
(
Checkself_SEG_step_count
<
20
)
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_ON);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_Battery_Charging_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_10_READY_G
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Key_Access_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_12_Seat_Detection_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_13_OVERLOAD_R
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_14_Cutterhead_Switch_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_15_Cutterhead_Gear_W
,
LED_ON
);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_17_External_Discharge_W, LED_ON);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_21_LED_Open_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_31_Working_Hours_One_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_32_Charging_Connection_R
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_Recharge
,
1
);
// SEG_SET_LED_STS(SEG_LED_System_Light, 1);
SEG_SET_LED_STS
(
SEG_LED_Chloramine
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Cutter_Overload
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Seat_Detection
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Key_Access
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Ready
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Cutter_Head_switch
,
1
);
// SEG_SET_LED_STS(SEG_LED_External_Discharge, 1);
SEG_SET_LED_STS
(
SEG_LED_Distance_Light
,
1
);
SEG_SET_LED_STS
(
SEG_LED_HHT_Charger
,
1
);
if
(
Checkself_SEG_step_count
<
60
)
{
{
Checkself_SEG_step_count
++
;
Checkself_SEG_step_count
++
;
}
}
else
else
{
{
Checkself_SEG_step_count
=
6
0
;
Checkself_SEG_step_count
=
2
0
;
}
}
if
(
Checkself_SEG_step_count
<
3
0
)
if
(
Checkself_SEG_step_count
<
1
0
)
{
{
Checkself_SEG_step
++
;
Checkself_SEG_step
++
;
}
}
...
@@ -2516,6 +2490,33 @@ void Checkself_SEG_Display(void)
...
@@ -2516,6 +2490,33 @@ void Checkself_SEG_Display(void)
Checkself_SEG_step
--
;
Checkself_SEG_step
--
;
}
}
}
}
// if (Checkself_SEG_step_count < 60)
// {
// Checkself_SEG_step_count++;
// }
// else
// {
// Checkself_SEG_step_count = 60;
// }
// if (Checkself_SEG_step_count < 30)
// {
// Checkself_SEG_step++;
// }
// else
// {
// if (Checkself_SEG_step == 0)
// {
// Checkself_SEG_step = 0;
// SEG_SET_EleDial_2SOC(1, 0);
// SEG_SET_EleDial_1SOC(1, 0);
// }
// else
// {
// Checkself_SEG_step--;
// }
// }
}
}
void
TYW_Check_Count
(
void
)
void
TYW_Check_Count
(
void
)
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
View file @
7c76aa5c
...
@@ -113,6 +113,10 @@ extern void Checkself_Init (void);
...
@@ -113,6 +113,10 @@ extern void Checkself_Init (void);
extern
void
Checkself_SEG_Display
(
void
);
extern
void
Checkself_SEG_Display
(
void
);
extern
uint8_t
SOC_charge_seg_Flag
;
extern
uint8_t
SOC_charge_seg_Flag
;
extern
uint8_t
Checkself_SEG_step
;
extern
uint8_t
Checkself_SEG_step_count
;
extern
uint8_t
checkself_seg_Flag
;
extern
uint16_t
Buzzer_time
;
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
7c76aa5c
...
@@ -86,8 +86,6 @@ static void Power_Wakeup_Init(void)
...
@@ -86,8 +86,6 @@ static void Power_Wakeup_Init(void)
Line_In_KL15_ON_Init
();
Line_In_KL15_ON_Init
();
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
400
,
64000000
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
400
,
64000000
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
400
,
64000000
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
400
,
64000000
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER0
,
TIMERM_CHB
,
ActiveLevel_High
);
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_COUNTER0
,
TIMERM_CHD
,
ActiveLevel_High
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
Telltales_Init
();
Telltales_Init
();
...
@@ -118,8 +116,8 @@ static void Power_IG_ON_Init(void)
...
@@ -118,8 +116,8 @@ static void Power_IG_ON_Init(void)
static
void
Power_Sleep_Init
(
void
)
static
void
Power_Sleep_Init
(
void
)
{
{
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
40
0
,
0
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
0
,
0
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
40
0
,
0
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
0
,
0
);
//TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHB, ActiveLevel_High);
//TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHB, ActiveLevel_High);
//TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHC, ActiveLevel_High);
//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_COUNTER0, TIMERM_CHD, ActiveLevel_High);
...
...
Firmware/Source/Component/System_Monitor/System_Monitor.c
View file @
7c76aa5c
...
@@ -23,8 +23,8 @@ MonitorStruct SysNM_KL15Monitor;
...
@@ -23,8 +23,8 @@ MonitorStruct SysNM_KL15Monitor;
#define EXIT_LOW_N_RANGE 7000U
#define EXIT_LOW_N_RANGE 7000U
#define ENTER_LOW_Y_RANGE 9000U
#define ENTER_LOW_Y_RANGE 9000U
#define EXIT_LOW_Y_RANGE 9500U
#define EXIT_LOW_Y_RANGE 9500U
#define EXIT_HIGH_Y_RANGE 1
60
00U
#define EXIT_HIGH_Y_RANGE 1
75
00U
#define ENTER_HIGH_Y_RANGE 1
65
00U
#define ENTER_HIGH_Y_RANGE 1
80
00U
#define EXIT_HIGH_N_RANGE 18500U
#define EXIT_HIGH_N_RANGE 18500U
#define ENTER_HIGH_N_RANGE 19000U
#define ENTER_HIGH_N_RANGE 19000U
#define Top_Vol 0xffffu
#define Top_Vol 0xffffu
...
...
Firmware/Source/Component/System_Monitor/System_Monitor_User.c
View file @
7c76aa5c
...
@@ -5,15 +5,15 @@
...
@@ -5,15 +5,15 @@
#include "wdt.h"
#include "wdt.h"
#define u16Base_Vol 0u
#define u16Base_Vol 0u
#define u16ENTER_LOW_N_RANGE
65
00U
#define u16ENTER_LOW_N_RANGE
70
00U
#define u16EXIT_LOW_N_RANGE 7
0
00U
#define u16EXIT_LOW_N_RANGE 7
5
00U
#define u16ENTER_LOW_Y_RANGE 9000U
#define u16ENTER_LOW_Y_RANGE 9000U
#define u16EXIT_LOW_Y_RANGE 10000U
#define u16EXIT_LOW_Y_RANGE 10000U
#define u16EXIT_HIGH_Y_RANGE 17500U
#define u16EXIT_HIGH_Y_RANGE 17500U
#define u16ENTER_HIGH_Y_RANGE 18000U
#define u16ENTER_HIGH_Y_RANGE 18000U
#define u16EXIT_HIGH_N_RANGE 1
80
00U
#define u16EXIT_HIGH_N_RANGE 1
75
00U
#define u16ENTER_HIGH_N_RANGE 1
9
000U
#define u16ENTER_HIGH_N_RANGE 1
8
000U
#define u16Top_Vol 0xffffu
#define u16Top_Vol 0xffffu
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
7c76aa5c
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include "Application.h"
#include "Application.h"
#include "CAN_APP\CAN_CH0_CAN_Communication_Matrix.h"
#include "CAN_APP\CAN_CH0_CAN_Communication_Matrix.h"
#include "Components.h"
#include "Components.h"
#define openLED_flag (Get_CAN_Power_State() != PKEY_ON && Get_CAN_Power_State() != KEY_OFF)
static
Tellib_uint16_t
LED_EFI_failure_Judgement
(
void
);
static
Tellib_uint16_t
LED_EFI_failure_Judgement
(
void
);
static
void
LED_EFI_failure_Execution
(
Tellib_uint16_t
led_status
);
static
void
LED_EFI_failure_Execution
(
Tellib_uint16_t
led_status
);
static
Tellib_uint16_t
LED_Fuel_Alarm_Judgement
(
void
);
static
Tellib_uint16_t
LED_Fuel_Alarm_Judgement
(
void
);
...
@@ -225,7 +225,7 @@ static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status)
...
@@ -225,7 +225,7 @@ static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Grass_Full_Judgement
(
void
)
static
Tellib_uint16_t
LED_Grass_Full_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Line_In_Get_Status
(
LINE_IN_GrassFull
))
if
(
Line_In_Get_Status
(
LINE_IN_GrassFull
)
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -254,7 +254,7 @@ static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
...
@@ -254,7 +254,7 @@ static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_38E_Sig_BMCU_Moto1_Locked_RotorFault
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_38E_Sig_BMCU_Moto1_Locked_RotorFault
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_38E_Sig_BMCU_Moto2_Locked_RotorFault
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_38E_Sig_BMCU_Moto2_Locked_RotorFault
();
if
(
Signal1
==
0x1
||
Signal2
==
0x1
)
if
(
(
Signal1
==
0x1
||
Signal2
==
0x1
)
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -308,7 +308,7 @@ static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
...
@@ -308,7 +308,7 @@ static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_SeatDetectState
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_SeatDetectState
();
if
(
Signal1
==
0x1
)
if
(
Signal1
==
0x1
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -327,7 +327,7 @@ static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status)
...
@@ -327,7 +327,7 @@ static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status)
}
}
else
else
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
&&
openLED_flag
)
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_12_Seat_Detection_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_12_Seat_Detection_W
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_Seat_Detection
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Seat_Detection
,
1
);
...
@@ -344,7 +344,7 @@ static Tellib_uint16_t LED_Key_Access_Judgement(void)
...
@@ -344,7 +344,7 @@ static Tellib_uint16_t LED_Key_Access_Judgement(void)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc
();
if
(
Signal1
==
0x1
)
if
(
Signal1
==
0x1
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -373,7 +373,7 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
...
@@ -373,7 +373,7 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigCharge
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigCharge
();
Tellib_uint8_t
Signal3
=
Get_CAN_Power_State
();
Tellib_uint8_t
Signal3
=
Get_CAN_Power_State
();
if
(
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
)
>=
9000
&&
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
)
<=
16000
)
if
(
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
)
>=
9000
&&
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
)
<=
16000
&&
openLED_flag
)
{
{
if
(
Signal1
==
0x1
&&
Signal2
==
0X1
)
if
(
Signal1
==
0x1
&&
Signal2
==
0X1
)
{
{
...
@@ -416,7 +416,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
...
@@ -416,7 +416,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
}
}
else
else
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
SEG_LED_Recharge
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_Battery_Charging_W
,
LED_OFF
);
SEG_SET_LED_STS
(
SEG_LED_Recharge
,
0
);
SEG_SET_LED_STS
(
SEG_LED_Recharge
,
0
);
}
}
}
}
...
@@ -450,7 +450,7 @@ static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
...
@@ -450,7 +450,7 @@ static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_157_Sig_BMCU_PTOSwicthState
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_157_Sig_BMCU_PTOSwicthState
();
if
(
Signal1
==
0x1
)
if
(
Signal1
==
0x1
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -575,7 +575,7 @@ static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_st
...
@@ -575,7 +575,7 @@ static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_st
static
Tellib_uint16_t
LED_LED_Open_Judgement
(
void
)
static
Tellib_uint16_t
LED_LED_Open_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Line_In_Get_Status
(
LINE_IN_BigLED
))
if
(
Line_In_Get_Status
(
LINE_IN_BigLED
)
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -681,7 +681,7 @@ static Tellib_uint16_t LED_Gears_Judgement(void)
...
@@ -681,7 +681,7 @@ static Tellib_uint16_t LED_Gears_Judgement(void)
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_TravelSpeedGear
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_TravelSpeedGear
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState
();
if
(
Signal2
!=
0x1
)
if
(
Signal2
!=
0x1
&&
openLED_flag
)
{
{
if
(
Signal1
==
0x1
||
Signal1
==
0x2
)
if
(
Signal1
==
0x1
||
Signal1
==
0x2
)
{
{
...
@@ -712,7 +712,7 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
...
@@ -712,7 +712,7 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_157_Sig_BMCU_BladeSpeedGear
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_157_Sig_BMCU_BladeSpeedGear
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_157_Sig_BMCU_ErrorGrage
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_157_Sig_BMCU_ErrorGrage
();
if
(
Signal2
==
0x0
)
if
(
Signal2
==
0x0
&&
openLED_flag
)
{
{
if
(
Signal1
==
0x1
||
Signal1
==
0x2
||
Signal1
==
0x3
)
if
(
Signal1
==
0x1
||
Signal1
==
0x2
||
Signal1
==
0x3
)
{
{
...
@@ -723,7 +723,7 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
...
@@ -723,7 +723,7 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
LED_STATE
=
0
;
LED_STATE
=
0
;
}
}
}
}
else
if
(
Signal2
==
0x1
||
Signal2
==
0x2
||
Signal2
==
0x3
||
Signal2
==
0x4
)
else
if
(
(
Signal2
==
0x1
||
Signal2
==
0x2
||
Signal2
==
0x3
||
Signal2
==
0x4
)
&&
openLED_flag
)
{
{
LED_STATE
=
2
;
LED_STATE
=
2
;
}
}
...
@@ -812,7 +812,7 @@ static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
...
@@ -812,7 +812,7 @@ static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_ErrorGrage
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_ErrorGrage
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage
();
Tellib_uint8_t
Signal2
=
Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage
();
Tellib_uint8_t
Signal3
=
System_Indicator_CANFlag
;
Tellib_uint8_t
Signal3
=
System_Indicator_CANFlag
;
if
(
Signal1
==
0x4
||
Signal1
==
0x5
||
Signal2
==
0x4
||
Signal2
==
0x5
||
Signal3
==
1
)
if
(
(
Signal1
==
0x4
||
Signal1
==
0x5
||
Signal2
==
0x4
||
Signal2
==
0x5
||
Signal3
==
1
)
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
...
@@ -841,7 +841,7 @@ static Tellib_uint16_t LED_P_GEAR_G_Judgement(void)
...
@@ -841,7 +841,7 @@ static Tellib_uint16_t LED_P_GEAR_G_Judgement(void)
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState
();
Tellib_uint8_t
Signal2
=
Get_CAN_Power_State
();
Tellib_uint8_t
Signal2
=
Get_CAN_Power_State
();
if
(
Signal1
==
0x1
)
if
(
Signal1
==
0x1
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -865,17 +865,15 @@ static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status)
...
@@ -865,17 +865,15 @@ static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status)
}
}
else
if
(
led_status
==
2u
)
else
if
(
led_status
==
2u
)
{
{
if
(
FLASH_SYNC_
1
Hz
)
if
(
FLASH_SYNC_
05
Hz
)
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_ON
);
SEG_SET_GEAR
(
Gear_P
,
1
);
}
}
else
else
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_O
N
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_O
FF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_OFF
);
SEG_SET_GEAR
(
Gear_P
,
0
);
}
}
}
}
else
else
...
@@ -915,7 +913,7 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
...
@@ -915,7 +913,7 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattChargeState
();
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattChargeState
();
if
(
Signal1
==
0x1
||
Signal1
==
0x2
||
Signal1
==
0x3
)
if
(
(
Signal1
==
0x1
||
Signal1
==
0x2
||
Signal1
==
0x3
)
&&
openLED_flag
)
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
}
}
...
@@ -955,7 +953,7 @@ static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
...
@@ -955,7 +953,7 @@ static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
}
}
static
void
LED_Power_Battery_Failure_R_Execution
(
Tellib_uint16_t
led_status
)
static
void
LED_Power_Battery_Failure_R_Execution
(
Tellib_uint16_t
led_status
)
{
{
if
(
led_status
==
1u
)
if
(
led_status
==
1u
&&
openLED_flag
)
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_01_Power_Battery_Failure_R
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_01_Power_Battery_Failure_R
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_Power_Battery_Failure
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Power_Battery_Failure
,
1
);
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
7c76aa5c
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
#include "Components.h"
#include "Components.h"
#include "RTE.h"
#include "RTE.h"
#include "UDS_ISO14229_Server.h"
#include "UDS_ISO14229_Server.h"
void
Sys_Pseudo_Real_Time_Tasks
(
void
)
void
Sys_Pseudo_Real_Time_Tasks
(
void
)
{
{
Power_Management_Service
();
Power_Management_Service
();
DoCAN_Communication_Service
();
DoCAN_Communication_Service
();
UDS_Server_Application_Service
();
UDS_Server_Application_Service
();
BU98R10_Update_Service
();
BU98R10_Update_Service
();
LED_Driver_Service
();
LED_Driver_Service
();
}
}
void
Sys_2ms_Tasks
(
void
)
void
Sys_2ms_Tasks
(
void
)
...
@@ -20,7 +20,7 @@ void Sys_2ms_Tasks(void)
...
@@ -20,7 +20,7 @@ void Sys_2ms_Tasks(void)
Can_Write_Fun
(
&
CAN_CH0_CanMsgTxOp
,
2000u
);
Can_Write_Fun
(
&
CAN_CH0_CanMsgTxOp
,
2000u
);
Sys_Status_Update_Service
();
Sys_Status_Update_Service
();
Analog_Signal_Conv_Service
();
Analog_Signal_Conv_Service
();
CanMSg_XMS_Analysis
(
&
CAN_CH0_CanMsgOp
,
2u
);
CanMSg_XMS_Analysis
(
&
CAN_CH0_CanMsgOp
,
2u
);
}
}
void
Sys_5ms_Tasks
(
void
)
void
Sys_5ms_Tasks
(
void
)
...
@@ -28,7 +28,6 @@ void Sys_5ms_Tasks(void)
...
@@ -28,7 +28,6 @@ void Sys_5ms_Tasks(void)
Flash_Sync_Signal_Generation_Service
();
Flash_Sync_Signal_Generation_Service
();
}
}
void
Sys_10ms_Tasks
(
void
)
void
Sys_10ms_Tasks
(
void
)
{
{
Line_In_Debounce_Service
(
10u
);
Line_In_Debounce_Service
(
10u
);
...
@@ -56,7 +55,36 @@ void Sys_50ms_Tasks(void)
...
@@ -56,7 +55,36 @@ void Sys_50ms_Tasks(void)
void
Sys_75ms_Tasks
(
void
)
void
Sys_75ms_Tasks
(
void
)
{
{
if
(
checkself_seg_Flag
==
1
)
{
Checkself_SEG_Display
();
// if (Checkself_SEG_step_count < 20)
// {
// Checkself_SEG_step_count++;
// }
// else
// {
// Checkself_SEG_step_count = 20;
// }
// if (Checkself_SEG_step_count < 10)
// {
// Checkself_SEG_step++;
// }
// else
// {
// if (Checkself_SEG_step == 0)
// {
// Checkself_SEG_step = 0;
// SEG_SET_EleDial_2SOC(1, 0);
// SEG_SET_EleDial_1SOC(1, 0);
// }
// else
// {
// Checkself_SEG_step--;
// }
// }
}
}
}
uint8_t
u8LEDDriverCheckCount
=
0U
;
uint8_t
u8LEDDriverCheckCount
=
0U
;
...
@@ -65,25 +93,23 @@ void Sys_100ms_Tasks(void)
...
@@ -65,25 +93,23 @@ void Sys_100ms_Tasks(void)
BackLight_Process
();
BackLight_Process
();
Interact_Light_Process
();
Interact_Light_Process
();
S3_ServerCNTT
();
S3_ServerCNTT
();
if
(
u8LEDDriverCheckCount
>=
10U
)
if
(
u8LEDDriverCheckCount
>=
10U
)
{
{
u8LEDDriverCheckCount
=
0U
;
u8LEDDriverCheckCount
=
0U
;
LED_Driver_Work_Check
();
LED_Driver_Work_Check
();
LED_Driver_Service_Immediate
();
//注意顺序1
LED_Driver_Service_Immediate
();
// 注意顺序1
}
}
else
else
{
{
u8LEDDriverCheckCount
++
;
u8LEDDriverCheckCount
++
;
}
}
}
}
/**
/**
* @brief 50us中断服务 尽可能的减少中断使用
* @brief 50us中断服务 尽可能的减少中断使用
*
*
*/
*/
void
Sys_Exact_50us_Tasks
(
void
)
void
Sys_Exact_50us_Tasks
(
void
)
{
{
...
@@ -91,9 +117,9 @@ void Sys_Exact_50us_Tasks(void)
...
@@ -91,9 +117,9 @@ void Sys_Exact_50us_Tasks(void)
DoCAN_Timer_Update
(
50u
);
DoCAN_Timer_Update
(
50u
);
GenDelay_Tick
();
GenDelay_Tick
();
task_1ms
++
;
task_1ms
++
;
if
(
task_1ms
>=
20U
)
if
(
task_1ms
>=
20U
)
{
{
task_1ms
=
0U
;
task_1ms
=
0U
;
eeprom_1ms_timeCount
(
);
eeprom_1ms_timeCount
();
}
}
}
}
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