Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
fcc380c4
Commit
fcc380c4
authored
Dec 05, 2024
by
梁百峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:雅迪检测台写入
parent
c6cad5b7
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
341 additions
and
121 deletions
+341
-121
R485_Communication_Matrix.c
source/R485_Communication_Matrix.c
+86
-10
R485_Communication_Matrix.h
source/R485_Communication_Matrix.h
+2
-0
io_config.c
source/app/api_gpio/io_config.c
+56
-18
api_timer.c
source/app/api_timer/api_timer.c
+4
-2
app_tft.c
source/app/app_tft/app_tft.c
+31
-4
bsp_app_led_output.c
source/bsp_source/bsp_button/bsp_app_led_output.c
+1
-1
bsp_button.c
source/bsp_source/bsp_button/bsp_button.c
+9
-5
bsp_motor.c
source/bsp_source/bsp_motor/bsp_motor.c
+1
-1
mfs_uart.c
source/bsp_source/mfs_uart/mfs_uart.c
+1
-1
main.c
source/main.c
+146
-77
main.h
source/main.h
+2
-0
CAN_CFG.C
source/nm_osek/CAN_CFG.C
+2
-2
No files found.
source/R485_Communication_Matrix.c
View file @
fcc380c4
...
...
@@ -14,6 +14,7 @@ uint32_t R485_Send_0x40(void)
case
2
:
break
;
case
3
:
// memset(R485_ID40h.Msg, 0, 64);
break
;
case
4
:
break
;
...
...
@@ -69,8 +70,8 @@ uint32_t R485_Send_0x41(void)
R485_ID41h
.
Sig
.
CruiseMode
=
0x0
;
//巡航
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30
//
R485_ID41h.Sig.TotalBatterySOC = 0x0; //电量
// R485_ID41h.Sig.VehicleStatus = 0x
0
; //整车状态
R485_ID41h
.
Sig
.
TotalBatterySOC
=
0x0
;
//电量
// R485_ID41h.Sig.VehicleStatus = 0x
3
; //整车状态
// R485_ID41h.Sig.SpeedGear = 0x2; //挡位
...
...
@@ -197,7 +198,56 @@ uint32_t R485_Send_0x41(void)
R485_ID41h
.
Sig
.
RotorLocked
=
0
;
break
;
case
3
:
R485_ID41h
.
Sig
.
EleHeadlightFunctionSettings
=
0x1
;
// 自动大灯
if
(
clearodoflag
==
1
)
{
R485_ID41h
.
Sig
.
EleHeadlightFunctionSettings
=
0x1
;
// 自动大灯
R485_ID41h
.
Sig
.
ChargeState
=
0x0
;
//充电状态
R485_ID41h
.
Sig
.
SlopePattern
=
0x0
;
//跛行
R485_ID41h
.
Sig
.
CushionSensorStatus
=
0x1
;
//坐垫压力
R485_ID41h
.
Sig
.
SlopeDescentFunctionStatus
=
0x0
;
//陡坡缓降
R485_ID41h
.
Sig
.
TCSActivation
=
0x1
;
//TCS激活
R485_ID41h
.
Sig
.
TCSFunctionalStatus
=
0x0
;
//TCS状态
R485_ID41h
.
Sig
.
ElectronicCushionStatus
=
0x1
;
//座桶开关
R485_ID41h
.
Sig
.
SupportSwitchSignalFeedback
=
0x0
;
//边撑
R485_ID41h
.
Sig
.
CruiseMode
=
0x0
;
//巡航
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0x300
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30 22km
R485_ID41h
.
Sig
.
TotalBatterySOC
=
0x2C
;
//电量
R485_ID41h
.
Sig
.
VehicleStatus
=
0x3
;
//整车状态
R485_ID41h
.
Sig
.
SpeedGear
=
0x1
;
//挡位
R485_ID41h
.
Sig
.
TotalBatteryVoltage
=
0x4B
;
//总电池电压
R485_ID41h
.
Sig
.
IOTRealTime_Hour
=
0x16
;
//时间:时
R485_ID41h
.
Sig
.
IOTRealTime_Minute
=
0x16
;
//时间:分
R485_ID41h
.
Sig
.
IOTRealTime_Second
=
0
;
//时间:秒
R485_ID41h
.
Sig
.
HandlebarFaultIndicator
=
0
;
R485_ID41h
.
Sig
.
UUpBridgeArmMosFault
=
0
;
R485_ID41h
.
Sig
.
UDownBridgeArmMosFault
=
0
;
R485_ID41h
.
Sig
.
VUpBridgeArmMosFault
=
0
;
R485_ID41h
.
Sig
.
VDownBridgeArmMosFault
=
0
;
R485_ID41h
.
Sig
.
WUpBridgeArmMosFault
=
0
;
R485_ID41h
.
Sig
.
WDownBridgeArmMosFault
=
0
;
R485_ID41h
.
Sig
.
MCUFaultStateU_PhaseHallFault
=
0
;
R485_ID41h
.
Sig
.
MCUFaultStateV_PhaseHallFault
=
0
;
R485_ID41h
.
Sig
.
MCUFaultStateW_PhaseHallFault
=
0
;
R485_ID41h
.
Sig
.
MCUFaultStatus_HandlebarFault
=
0
;
R485_ID41h
.
Sig
.
BMS_0CommunicationStatus
=
0
;
R485_ID41h
.
Sig
.
MCUCommunicationStatus
=
0
;
R485_ID41h
.
Sig
.
ALMCommunicationStatus
=
0
;
R485_ID41h
.
Sig
.
ICMCommunicationStatus
=
0
;
R485_ID41h
.
Sig
.
BrakeLeverFault
=
0
;
R485_ID41h
.
Sig
.
PhaseLossFault
=
0
;
R485_ID41h
.
Sig
.
MCUOverTempProtection
=
0
;
R485_ID41h
.
Sig
.
MotorOvertempProtection
=
0
;
R485_ID41h
.
Sig
.
RotorLocked
=
0
;
}
else
{
R485_ID41h
.
Sig
.
EleHeadlightFunctionSettings
=
0x1
;
// 自动大灯
R485_ID41h
.
Sig
.
ChargeState
=
0x0
;
//充电状态
R485_ID41h
.
Sig
.
SlopePattern
=
0x0
;
//跛行
R485_ID41h
.
Sig
.
CushionSensorStatus
=
0x1
;
//坐垫压力
...
...
@@ -241,6 +291,8 @@ uint32_t R485_Send_0x41(void)
R485_ID41h
.
Sig
.
MCUOverTempProtection
=
0
;
R485_ID41h
.
Sig
.
MotorOvertempProtection
=
0
;
R485_ID41h
.
Sig
.
RotorLocked
=
0
;
}
break
;
case
4
:
R485_ID41h
.
Sig
.
EleHeadlightFunctionSettings
=
0x0
;
// 自动大灯
...
...
@@ -530,7 +582,7 @@ uint32_t R485_Send_0x41(void)
break
;
case
10
:
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0x300
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30 88km
R485_ID41h
.
Sig
.
TotalBatterySOC
=
0xC
6
;
//电量
R485_ID41h
.
Sig
.
TotalBatterySOC
=
0xC
8
;
//电量
R485_ID41h
.
Sig
.
VehicleStatus
=
0x3
;
//整车状态
R485_ID41h
.
Sig
.
SpeedGear
=
0
;
//挡位
//功率暂空一会做
...
...
@@ -716,16 +768,12 @@ uint32_t R485_Send_0x47(void)
break
;
case
4
:
// zhenduanflag = 0;
// Port_SetPinConfig(1, 19, &stc_OUT_pin_config); // VBAT~
// Port_SetPinConfig(1, 20, &stc_OUT_pin_config); // VBAT
// Port_SetPinConfig(1, 21, &stc_OUT_pin_config); //DC12V
// Port_SetPinConfig(1, 15, &stc_OUT_pin_config); // ACC1
Port_SetPortPinLevel
(
1
,
19
,
PortGpioLow
);
Port_SetPortPinLevel
(
1
,
20
,
PortGpioLow
);
Port_SetPortPinLevel
(
1
,
21
,
PortGpioLow
);
Port_SetPortPinLevel
(
1
,
15
,
PortGpioLow
);
g_Stage
=
1
;
// zhenduansendStep = 0;
// zhenduanflag = 0;
break
;
...
...
@@ -733,7 +781,11 @@ uint32_t R485_Send_0x47(void)
break
;
}
RS485_TX_finish
=
1
;
u32sendendflag
=
R485_Send
(
0x47
,
R485_zhenduan_Msg
,
length
);
if
(
zhenduansendStep
!=
4
)
{
u32sendendflag
=
R485_Send
(
0x47
,
R485_zhenduan_Msg
,
length
);
}
RS485_send_time
=
0
;
Delay
(
10
);
Port_SetPortPinLevel
(
1
,
4
,
PortGpioLow
);
...
...
@@ -817,3 +869,27 @@ uint32_t R485_Send_Line_0x47(uint8_t n)
return
u32sendendflag
;
}
uint32_t
R485_Send_clear
(
void
)
{
uint8_t
length
;
HJ_OtherKeyCurrent
.
count
=
3
;
uint32_t
u32sendendflag
=
0
;
if
(
RS485_TX_finish
==
0
)
{
if
(
RS485_send_time
>
3000
)
{
Port_SetPortPinLevel
(
1
,
4
,
PortGpioHigh
);
Delay
(
10
);
RS485_TX_finish
=
1
;
u32sendendflag
=
R485_Send
(
0x41
,
R485_ID41h
.
Msg
,
sizeof
(
R485_ID41h
.
Msg
));
RS485_send_time
=
0
;
Delay
(
10
);
Port_SetPortPinLevel
(
1
,
4
,
PortGpioLow
);
Delay
(
10
);
RS485_TX_finish
=
1
;
}
}
RS485_TX_finish
=
1
;
Port_SetPortPinLevel
(
1
,
4
,
PortGpioLow
);
return
u32sendendflag
;
}
\ No newline at end of file
source/R485_Communication_Matrix.h
View file @
fcc380c4
...
...
@@ -1129,4 +1129,6 @@ extern uint32_t R485_Send_0x42(void);
extern
uint32_t
R485_Send_0x47
(
void
);
extern
uint32_t
R485_Send_Line_0x47
(
uint8_t
n
);
extern
uint32_t
R485_Send_clear
(
void
);
#endif
source/app/api_gpio/io_config.c
View file @
fcc380c4
...
...
@@ -76,6 +76,8 @@ void Api_GPIO_Init(void)
// Port_SetPinConfig(1, 7, &stc_IN_pin_config); //不知道什么功能连着5V电源
Port_SetPinConfig
(
1
,
10
,
&
stc_IN_pin_config
);
// 左转向输出采AD
// Port_SetPinConfig(1, 19, &stc_IN_pin_config); // VBAT~
Port_EnableInput
();
//-----------------------OUT---------------------------//
...
...
@@ -101,6 +103,7 @@ void Api_GPIO_Init(void)
Port_SetPinConfig
(
2
,
21
,
&
stc_OUT_pin_config
);
//双闪按键
Port_SetPinConfig
(
2
,
14
,
&
stc_OUT_pin_config
);
//按键+
Port_SetPinConfig
(
2
,
13
,
&
stc_OUT_pin_config
);
//按键-
Port_SetPinConfig
(
2
,
9
,
&
stc_OUT_pin_config
);
//确认键
Port_SetPinConfig
(
0
,
30
,
&
stc_OUT_pin_config
);
//蓝牙指示灯
Port_SetPinConfig
(
2
,
0
,
&
stc_OUT_pin_config
);
//远光
...
...
@@ -154,6 +157,7 @@ void Api_GPIO_Init(void)
.
enGpioDirection
=
PortGpioOutput
,
.
enGpioInitOutputLevel
=
PortGpioHigh
,
};
// Port_SetPinConfig(2, 28, &stc_OUT_pin_high_config); //AIRBAG_OFF_OUT
}
...
...
@@ -177,7 +181,10 @@ void Line_Temp(void)
LINE_TurnRightOFF
;
LINE_ABSON
;
LINE_BLEOFF
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
case
1
:
...
...
@@ -189,7 +196,7 @@ void Line_Temp(void)
LINE_ABSOFF
;
LINE_BLEOFF
;
lineNum
=
5
;
if
(
zhenduanflag
!=
2
)
if
(
zhenduanflag
!=
1
)
{
if
(
LineGetSta
.
lowlight1
!=
1
)
{
...
...
@@ -206,7 +213,7 @@ void Line_Temp(void)
LINE_ABSOFF
;
LINE_BLEOFF
;
lineNum
=
6
;
if
(
zhenduanflag
!=
2
)
if
(
zhenduanflag
!=
1
)
{
if
(
LineGetSta
.
highlight1
!=
1
)
{
...
...
@@ -223,7 +230,7 @@ void Line_Temp(void)
LINE_ABSOFF
;
LINE_BLEOFF
;
lineNum
=
7
;
if
(
zhenduanflag
!=
2
)
if
(
zhenduanflag
!=
1
)
{
if
(
LineGetSta
.
weizhilight1
!=
1
)
{
...
...
@@ -239,7 +246,10 @@ void Line_Temp(void)
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEOFF
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
case
5
:
LINE_LampLowOFF
;
...
...
@@ -249,7 +259,10 @@ void Line_Temp(void)
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEOFF
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
case
6
:
LINE_LampLowOFF
;
...
...
@@ -259,7 +272,10 @@ void Line_Temp(void)
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEOFF
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
case
7
:
LINE_LampLowOFF
;
...
...
@@ -270,7 +286,7 @@ void Line_Temp(void)
LINE_ABSON
;
LINE_BLEOFF
;
lineNum
=
4
;
if
(
zhenduanflag
!=
2
)
if
(
zhenduanflag
!=
1
)
{
if
(
LineGetSta
.
ABSlight1
!=
1
)
{
...
...
@@ -287,7 +303,7 @@ void Line_Temp(void)
LINE_ABSOFF
;
LINE_BLEON
;
lineNum
=
1
;
if
(
zhenduanflag
!=
2
)
if
(
zhenduanflag
!=
1
)
{
if
(
LineGetSta
.
ble1
!=
1
)
{
...
...
@@ -303,17 +319,36 @@ void Line_Temp(void)
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEOFF
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
case
10
:
LINE_LampLowON
;
LINE_LampHighON
;
LINE_weizhiON
;
LINE_TurnLeftON
;
LINE_TurnRightON
;
LINE_ABSON
;
LINE_LampLowOFF
;
LINE_LampHighOFF
;
LINE_weizhiOFF
;
LINE_TurnLeftOFF
;
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEOFF
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
case
11
:
LINE_LampLowOFF
;
LINE_LampHighOFF
;
LINE_weizhiOFF
;
LINE_TurnLeftOFF
;
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEON
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
default:
LINE_LampLowOFF
;
...
...
@@ -323,7 +358,10 @@ void Line_Temp(void)
LINE_TurnRightOFF
;
LINE_ABSOFF
;
LINE_BLEOFF
;
zhenduanflag
=
0
;
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
0
;
}
break
;
}
}
...
...
source/app/api_timer/api_timer.c
View file @
fcc380c4
...
...
@@ -505,11 +505,13 @@ extern uint32_t Time_100us_Uart9;
static
void
TIMER4_50US_ISR
(
void
)
{
if
(
Time_100us
<
0xffffffff
)
if
(
Time_100us
<
0xffffffff
)
Time_100us
++
;
if
(
RS485_send_time
<
0xffffffff
)
RS485_send_time
++
;
if
(
Time_100us_Uart9
<
0xffffffff
)
if
(
Time_100us_Uart9
<
0xffffffff
)
Time_100us_Uart9
++
;
//TFT �����õ�
if
(
UP_VSYNC
)
...
...
source/app/app_tft/app_tft.c
View file @
fcc380c4
...
...
@@ -103,7 +103,7 @@ unsigned int g_RPM_Val;
uint8_t
corenum
[
100
];
uint8_t
corenum1
[
100
];
uint8_t
corenum2
[
100
];
uint8_t
SCnum
=
0
;
...
...
@@ -1516,6 +1516,7 @@ void CompilationDate_S(uint16_t uiStartX,uint16_t uiDspLine)
DspOneLineDynamicStr
(
uiDspInfo
,
uiStartX
,
uiDspLine
);
}
void
DisplayStaticCurrent_S
(
uint16_t
uiStartX
,
uint16_t
uiDspLine
)
{
uint8_t
uiDspInfo
[
16
+
1
];
...
...
@@ -3033,6 +3034,16 @@ void HJ_OtherDisplay()
{
case
0
:
AUTO_Display
();
if
(
SCnum
==
1
)
{
SCnum
=
0
;
}
else
{
SCnum
=
1
;
}
Port_SetPortPinLevel
(
1
,
21
,
PortGpioHigh
);
//stb
Port_SetPortPinLevel
(
1
,
15
,
PortGpioHigh
);
//stb
break
;
case
1
:
//SetDisplayStaticItemW2(HJ_rightlight , 90, 225, DRAW_LUMIN_ICOM_WINDOW);
...
...
@@ -3044,6 +3055,8 @@ void HJ_OtherDisplay()
SetDisplayStaticItemW2
(
YD_dianliangdi
,
20
,
240
,
DRAW_LUMIN_ICOM_WINDOW
);
//灯全灭
SetDisplayStaticItemW2
(
YD_READY
,
70
,
240
,
DRAW_LUMIN_ICOM_WINDOW
);
//灯全灭
SetDisplayStaticItemW2
(
YD_jinguang
,
150
,
240
,
DRAW_LUMIN_ICOM_WINDOW
);
//灯全灭
Port_SetPortPinLevel
(
1
,
21
,
PortGpioHigh
);
//stb
Port_SetPortPinLevel
(
1
,
15
,
PortGpioHigh
);
//stb
// sprintf(uiDspInfoled,"POWERlow;READY;",HJ_CurFuelNum);
// DspOneLineDynamicStr(uiDspInfoled, 20, 240);
// sprintf(uiDspInfoled,"Lowbeam",HJ_CurFuelNum);
...
...
@@ -3150,6 +3163,16 @@ void HJ_OtherDisplay()
case
10
:
sprintf
(
uiDspInfoTime
,
"Time: 19:09"
,
HJ_CurFuelNum
);
SetDisplayStaticItemW2
(
HJ_Alllight
,
20
,
240
,
DRAW_LUMIN_ICOM_WINDOW
);
Port_SetPortPinLevel
(
1
,
21
,
PortGpioHigh
);
//stb
Port_SetPortPinLevel
(
1
,
15
,
PortGpioHigh
);
//stb
if
(
SCnum
==
1
)
{
SCnum
=
0
;
}
else
{
SCnum
=
1
;
}
// SetDisplayStaticItemW2(, 90, 225, DRAW_LUMIN_ICOM_WINDOW);
break
;
...
...
@@ -3242,9 +3265,13 @@ void UpdateCenterTripC(void)
break
;
case
STAGE_AutoCheck
:
//�Լ�
// AUTO_Display();
DspOneLineDynamicStr
(
corenum
,
0
,
70
);
DspOneLineDynamicStr
(
corenum1
,
0
,
90
);
DspOneLineDynamicStr
(
corenum2
,
0
,
110
);
if
(
zhenduansendStep
==
4
)
{
DspOneLineDynamicStr
(
corenum
,
0
,
70
);
DspOneLineDynamicStr
(
corenum1
,
0
,
90
);
DspOneLineDynamicStr
(
corenum2
,
0
,
110
);
}
break
;
case
STAGE_Led_Telltale_Check
:
//双闪
...
...
source/bsp_source/bsp_button/bsp_app_led_output.c
View file @
fcc380c4
...
...
@@ -429,7 +429,7 @@ void HJ_LED(en_port_gpio_level_t LedState)
//Port_SetPortPinLevel(2, 0, PortGpioHigh);
// Port_SetPortPinLevel(2, 14, PortGpioHigh);
//Speed_Output_Update(PWMCH_SPEED_OUT, 1910, 50);
Port_SetPortPinLevel
(
1
,
21
,
PortGpioHigh
);
//测试
//
Port_SetPortPinLevel(1, 21, PortGpioHigh);//测试
break
;
case
3
:
...
...
source/bsp_source/bsp_button/bsp_button.c
View file @
fcc380c4
...
...
@@ -521,7 +521,9 @@ void Button_Statu_Manage(void)
{
zhenduanflag
=
0
;
zhenduansendStep
=
0
;
g_Stage
=
2
;
// zhenduanflag = 0;
// RS485_TX_finish = 0;
}
else
...
...
@@ -589,6 +591,8 @@ void Button_Statu_Manage(void)
Botton
.
EOL
.
Statu
=
1
;
Button_Press
=
1
;
Button_Value
=
13
;
clearodoflag
=
1
;
// zhenduanflag = 0xFF;
}
Botton
.
EOL
.
Time
=
0
;
}
...
...
@@ -829,7 +833,7 @@ void Button_Statu_Manage(void)
if
(
Botton
.
End
.
Time
>
50
)
{
Botton
.
End
.
Time
=
51
;
Port_SetPortPinLevel
(
1
,
21
,
PortGpioHigh
);
//
Port_SetPortPinLevel(1, 21, PortGpioHigh);
}
}
else
{
...
...
@@ -837,7 +841,7 @@ void Button_Statu_Manage(void)
if
(
Botton
.
End
.
Time
>
100
)
{
Botton
.
End
.
Time
=
0
;
Port_SetPortPinLevel
(
1
,
21
,
PortGpioLow
);
//
Port_SetPortPinLevel(1, 21, PortGpioLow);
}
}
...
...
@@ -2548,7 +2552,7 @@ void Stage_Manage()
#if (SEMI_AUTOMATIC_STAGE)
UserPressKey15
();
//KL15����
#else
UserPressKey15
();
//KL15����
//
UserPressKey15();//KL15����
#endif
}
...
...
@@ -2566,8 +2570,8 @@ void Stage_Manage()
#else
// UserPressEOL();//��������
g_Stage
=
STAGE_Other
;
//
g_Stage = STAGE_Other;
clearodoflag
=
1
;
ClearOtherSWFlagFun
();
ClearOtherFlagFun
();
Othercount
=
0
;
...
...
source/bsp_source/bsp_motor/bsp_motor.c
View file @
fcc380c4
...
...
@@ -235,7 +235,7 @@ void SMC_Drive_Init(stc_motor_t *motorConfig,uint8_t cycle_width,uint8_t clkdiv)
.
enGpioDirection
=
PortGpioOutput
,
.
enGpioInitOutputLevel
=
PortGpioLow
};
Port_SetPinConfig
(
1
,
21
,
&
stc_port_pin_config1_21
);
//
Port_SetPinConfig( 1, 21, &stc_port_pin_config1_21 );
//
m_stc_smc
.
unPWC
.
u16Register
=
0
;
...
...
source/bsp_source/mfs_uart/mfs_uart.c
View file @
fcc380c4
...
...
@@ -1002,7 +1002,7 @@ en_result_t Mfs_Uart_Read(pstc_uart_type_t pstcUart,
}
/* Call wait loop hook */
PDL_WAIT_LOOP_HOOK
();
//
PDL_WAIT_LOOP_HOOK();
}
return
Ok
;
...
...
source/main.c
View file @
fcc380c4
This diff is collapsed.
Click to expand it.
source/main.h
View file @
fcc380c4
...
...
@@ -134,4 +134,6 @@ extern uint8_t Linestep;
extern
uint8_t
lineNum
;
extern
uint8_t
linewrong
;
extern
uint8_t
powerwrong
;
extern
uint8_t
clearodoflag
;
extern
uint32_t
clearodotime
;
#endif
/* __MAIN_H__ */
source/nm_osek/CAN_CFG.C
View file @
fcc380c4
...
...
@@ -67,7 +67,7 @@ void NM_D_Init(uint8_t state)
Port_SetPinConfig
(
1
,
22
,
&
stc_port_pin_config_out
);
//en
stc_port_pin_config_out
.
enGpioInitOutputLevel
=
PortGpioHigh
;
Port_SetPinConfig
(
1
,
21
,
&
stc_port_pin_config_out
);
//
Port_SetPinConfig( 1, 21, &stc_port_pin_config_out );
#endif
#if (CAN_3RD)
stc_port_pin_config_out
.
enGpioInitOutputLevel
=
PortGpioLow
;
...
...
@@ -76,7 +76,7 @@ void NM_D_Init(uint8_t state)
//stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioHigh;
//Port_SetPinConfig( 1, 21, &stc_port_pin_config_out );
#endif
bsp_CAN1_Init
();
//
bsp_CAN1_Init();
break
;
case
BusSleep
:
bsp_tx_msgbuf_abort
(
1
);
...
...
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