Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
3d7cd5af
Commit
3d7cd5af
authored
Sep 18, 2024
by
王金亮
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into wjl_devlop
parents
56a29bb0
04acf3aa
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1155 additions
and
476 deletions
+1155
-476
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+89
-81
CAN_CH0_CAN_Communication_Matrix.c
...are/Source/Application/CAN_CH0_CAN_Communication_Matrix.c
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+560
-314
PicBin.c
Firmware/Source/Component/AMT630H/PicBin.c
+2
-1
PicBin.h
Firmware/Source/Component/AMT630H/PicBin.h
+10
-2
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+4
-4
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+1
-0
flash.h
...Device/Cmsemicon/BAT32A279/Library/Driver/include/flash.h
+1
-1
flash.c
...rce/Device/Cmsemicon/BAT32A279/Library/Driver/src/flash.c
+21
-15
UDS_ISO14229_Server.c
Firmware/Source/UDS/UDS_ISO14229_Server.c
+12
-4
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+414
-34
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+40
-19
No files found.
Firmware/Source/Application/BlueTooth.c
View file @
3d7cd5af
...
...
@@ -13,6 +13,7 @@ _QRCODE_RECT QRCode_Rect;
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
uint8_t
UUIDConfigBuf
[
22
]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
};
//"600032023120100000995"
uint8_t
SetBluetoothCloseCount
=
0
;
uint8_t
OSVersionASCLLList
[
20
]
=
{
0x56
,
0x00
,
...
...
@@ -47,98 +48,105 @@ void TextService(void);
void
BlueToothService
(
void
)
{
// SetUUIDTimes++;
if
(
Get_Dis_Bluetooth_Open_Close
()
==
0
)
if
(
SYS_OPR_STAT_IGN_ON
)
{
if
(
Get
BlueToothVaild
==
0
)
if
(
Get
_Dis_Bluetooth_Open_Close
()
==
0
)
{
SetBluetoothTurnXX
(
1
);
GetBlueToothVaild
=
1
;
if
(
GetBlueToothVaild
==
0
)
{
SetBluetoothTurnXX
(
1
);
GetBlueToothVaild
=
1
;
}
}
}
else
{
if
(
GetBlueToothVaild
==
1
)
else
{
SetBluetoothTurnXX
(
0
);
GetBlueToothVaild
=
0
;
if
(
GetBlueToothVaild
==
1
)
{
if
(
SetBluetoothCloseCount
<
30
)
{
SetBluetoothTurnXX
(
0
);
}
else
{
GetBlueToothVaild
=
0
;
SetBluetoothCloseCount
=
0
;
}
SetBluetoothCloseCount
++
;
}
}
}
if
((
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
&&
(
GetPhoneBookVaild
==
0
))
{
PackedTransfer_GetPhoneBookCmd
();
GetPhoneBookVaild
=
1
;
}
else
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_DisConnect
)
{
GetPhoneBookVaild
=
0
;
}
if
((
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
&&
(
GetPhoneBookVaild
==
0
))
{
PackedTransfer_GetPhoneBookCmd
();
GetPhoneBookVaild
=
1
;
}
else
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_DisConnect
)
{
GetPhoneBookVaild
=
0
;
}
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
Menu_Change_Branch_To_Item
(
MENU_BRANCH_ANIMATION
,
MENU_ITEM_MAIN_ITEM
);
}
SetUUIDData
((
char
*
)
UUIDConfigBuf
,
22
);
if
(
OTA_Update_Flag
==
1
)
{
QRCode_Rect
.
x
=
650
;
QRCode_Rect
.
y
=
210
;
}
else
{
QRCode_Rect
.
x
=
QRCode_X
;
QRCode_Rect
.
y
=
QRCode_Y
;
}
// QRCode_Rect.x = 650;
// QRCode_Rect.y = 210;
QRCode_Rect
.
height
=
240
;
QRCode_Rect
.
width
=
240
;
SetScreenType
(
QRCode_TYPE
,
QRCode_Rect
);
if
(
Menu_Get_Current_Cursor_Information
()
!=
MENU_ITEM_FAULT_INFORMATION
)
{
OTA_Update_Flag
=
0
;
}
if
(
OTA_Update_Flag
==
1
)
{
if
(
OTA_Update_Count_Open
<
5
)
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
SetUpdateCtrl
(
1
,
QRCode_Rect
);
OTA_Update_Count_Open
++
;
}
OTA_Update_Count_Close
=
0
;
}
if
(
g_u8Cursor_Posittion
==
MENU_ITEM_PHONE_CONNECT_APP
)
/*导航界面*/
{
;
}
else
/*非导航界面*/
{
Menu_Change_Branch_To_Item
(
MENU_BRANCH_ANIMATION
,
MENU_ITEM_MAIN_ITEM
);
}
}
SetUUIDData
((
char
*
)
UUIDConfigBuf
,
22
);
if
(
OTA_Update_Flag
==
1
)
{
QRCode_Rect
.
x
=
650
;
QRCode_Rect
.
y
=
210
;
}
else
{
QRCode_Rect
.
x
=
QRCode_X
;
QRCode_Rect
.
y
=
QRCode_Y
;
}
// QRCode_Rect.x = 650;
// QRCode_Rect.y = 210;
QRCode_Rect
.
height
=
240
;
QRCode_Rect
.
width
=
240
;
SetScreenType
(
QRCode_TYPE
,
QRCode_Rect
);
// if(Menu_Get_Current_Cursor_Information() != MENU_ITEM_FAULT_INFORMATION)
// {
// OTA_Update_Flag = 0;
// }
if
(
OTA_Update_Flag
==
1
)
{
if
(
OTA_Update_Count_Open
<
5
)
{
SetUpdateCtrl
(
1
,
QRCode_Rect
);
OTA_Update_Count_Open
++
;
}
OTA_Update_Count_Close
=
0
;
}
else
{
if
(
OTA_Update_Count_Close
<
5
)
{
SetUpdateCtrl
(
0
,
QRCode_Rect
);
OTA_Update_Count_Close
++
;
}
OTA_Update_Count_Open
=
0
;
}
SetTaskbarHeight
(
150
);
SetBlueToothName
((
uint8_t
*
)
HJBlueToothName
,
sizeof
(
HJBlueToothName
));
TextService
();
}
else
{
if
(
OTA_Update_Count_Close
<
5
)
{
SetUpdateCtrl
(
0
,
QRCode_Rect
);
OTA_Update_Count_Close
++
;
}
OTA_Update_Count_Open
=
0
;
GetBlueToothVaild
=
0
;
OTA_Update_Flag
=
0
;
SetBluetoothTurnXX
(
0
);
SetUpdateCtrl
(
0
,
QRCode_Rect
);
}
SetTaskbarHeight
(
150
);
SetBlueToothName
((
uint8_t
*
)
HJBlueToothName
,
sizeof
(
HJBlueToothName
));
TextService
();
// BlueConnectStatus = GetBlueToothPowerSTATE();
// juasfha = BlueToothPhoneData.BlueToothPhoneSate;
// juasfha = BlueToothPhoneData.PhoneBookTotalCount;
// for(i=0;i<20;i++)
// {
// sjhja[i] = BlueToothPhoneData.PhoneNumber[i];
// }
// for(i=0;i<100;i++)
// {
// PhoneName[i] = BlueToothPhoneData.BlueToothPhoneName[i];
// }
// _QRCODE_RECT QRCode_Rect;
// QRCode_Rect.x = QRCode_X;
// QRCode_Rect.y = QRCode_Y;
// QRCode_Rect.height = QRCode_HEIGHT;
// QRCode_Rect.width = QRCode_WIDTH;
// SetScreenType(QRCode_TYPE, QRCode_Rect);
}
TEXT_STRUCT
TextPara
[
TEXT_NUM_TOTAL
]
=
...
...
Firmware/Source/Application/CAN_CH0_CAN_Communication_Matrix.c
View file @
3d7cd5af
...
...
@@ -45,7 +45,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
5
000ul
,
1
000ul
,
0x402ul
,
((
void
*
)
0
),
((
void
*
)
0
),
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
3d7cd5af
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/AMT630H/PicBin.c
View file @
3d7cd5af
...
...
@@ -118,7 +118,8 @@ static const uint16_t PicIndexData[] = {
Pic_0910
,
13
,
639
,
293
,
Pic_0911
,
17
,
636
,
292
,
Pic_0912
,
13
,
639
,
293
,
Pic_0913
,
17
,
636
,
292
,
Pic_0914
,
13
,
638
,
293
,
Pic_0915
,
16
,
636
,
293
,
Pic_0916
,
11
,
640
,
293
,
Pic_0917
,
14
,
639
,
293
,
Pic_0899
,
11
,
638
,
293
,
Pic_0918
,
3
,
643
,
293
,
Pic_0898
,
14
,
637
,
293
,
Pic_0897
,
15
,
637
,
292
,
Pic_0919
,
11
,
640
,
293
,
Pic_0920
,
12
,
639
,
293
,
Pic_0921
,
14
,
638
,
293
,
Pic_0922
,
14
,
638
,
292
,
Pic_0923
,
14
,
638
,
293
,
Pic_0924
,
15
,
637
,
293
,
Pic_0925
,
221
,
501
,
160
,
Pic_0926
,
50
,
619
,
240
,
Pic_0926
,
50
,
619
,
175
,
Pic_0927
,
50
,
619
,
240
,
Pic_0927
,
50
,
619
,
175
,
Pic_0928
,
75
,
894
,
310
,
Pic_0929
,
75
,
894
,
310
,
Pic_0930
,
64
,
612
,
240
,
Pic_0930
,
64
,
612
,
175
,
Pic_0931
,
64
,
612
,
240
,
Pic_0931
,
64
,
612
,
175
,
Pic_0932
,
777
,
124
,
85
,
Pic_0933
,
317
,
101
,
210
,
Pic_0934
,
209
,
102
,
260
,
Pic_0935
,
461
,
36
,
367
,
Pic_0936
,
350
,
92
,
367
,
Pic_0937
,
323
,
564
,
521
,
Pic_0938
,
41
,
62
,
399
,
Pic_0939
,
41
,
62
,
401
,
Pic_0933
,
317
,
101
,
210
,
Pic_0934
,
209
,
102
,
260
,
Pic_0935
,
461
,
36
,
367
,
Pic_0936
,
350
,
92
,
367
,
Pic_0937
,
323
,
564
,
521
,
Pic_0938
,
41
,
62
,
399
,
Pic_0939
,
41
,
62
,
401
,
Pic_0940
,
155
,
53
,
498
,
Pic_0941
,
1521
,
0
,
470
,
Pic_0942
,
46
,
634
,
551
,
Pic_0943
,
28
,
751
,
555
,
};
#define PicIndexData_LEN 14888
//uint32_t PicIndexDataLEN = 0;
...
...
Firmware/Source/Component/AMT630H/PicBin.h
View file @
3d7cd5af
#ifndef PICBIN_H
#define PICBIN_H
/* Flash Bin Version:202409
02 2024-09-02 13:18:34
Compression ratio:70.00% */
/* Flash Bin Version:202409
15 2024-09-15 09:22:36
Compression ratio:70.00% */
#define Pic_0001 1
#define Pic_0002 2
#define Pic_0003 3
...
...
@@ -941,6 +941,10 @@
#define Pic_0937 937
#define Pic_0938 938
#define Pic_0939 939
#define Pic_0940 940
#define Pic_0941 941
#define Pic_0942 942
#define Pic_0943 943
enum
{
Pic_0001_0_0
=
0
,
...
...
@@ -2125,9 +2129,13 @@ enum {
Pic_0937_564_521
,
Pic_0938_62_399
,
Pic_0939_62_401
,
Pic_0940_53_498
,
Pic_0941_0_470
,
Pic_0942_634_551
,
Pic_0943_751_555
,
};
#define PIC_INDEX_DATA_CRC 0x
53F47F46
#define PIC_INDEX_DATA_CRC 0x
8509F1BE
extern
void
User_PicIndexDataInit
(
void
);
#endif
Firmware/Source/Component/Key/Key_user.c
View file @
3d7cd5af
...
...
@@ -306,7 +306,7 @@ void Get_Into_OTA_Update_Mode(void)
{
if
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_FAULT_INFORMATION
)
{
OTA_Update_Flag
=
!
OTA_Update_Flag
;
OTA_Update_Flag
=
1U
;
}
}
void
KEY_LEFT_EVENT_NONE_Service
(
void
)
...
...
@@ -387,13 +387,13 @@ void Get_DisTime_Service(void)
void
My_Key_Service
(
void
)
{
/* 自检时不可操作按键 */
if
(
g_u8SelfCheck
)
/* 自检
和OTA界面
时不可操作按键 */
if
(
(
g_u8SelfCheck
)
&&
(
OTA_Update_Flag
==
0
))
{
if
((
Get_ActualVechileSpeed
()
==
0
)
||
((
Get_DispVechileSpeed
()
>=
1990
)
&&
(
Get_DispEngineSpeed
()
>=
12000
)))
{
Key_Service
();
}
}
}
}
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
3d7cd5af
...
...
@@ -66,6 +66,7 @@ static void Power_KL30_Init(void)
g_stRTCInformation
.
u8RTCYear
=
20
;
RTE_RTC_Init
(
g_stRTCInformation
);
Menu_User_Init
();
UDS_Startup_Init
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/Library/Driver/include/flash.h
View file @
3d7cd5af
...
...
@@ -2,7 +2,7 @@
#define __FLASH_H__
#include <stdint.h>
#include "common.h"
#define SECTOR_SIZE
512
#define SECTOR_SIZE
1024
#define WORD_SIZE 4
//#define FLASH_PROTCET
#define PROTECT_VALUE ((uint32_t)0x1234ABCD)
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/Library/Driver/src/flash.c
View file @
3d7cd5af
...
...
@@ -61,40 +61,46 @@ int EraseChip (uint32_t adr)
* @param adr - sector address of user code flash
* @return status: 0 - OK, 1 - Failed
***********************************************************************************************************************/
int
EraseSector
(
uint32_t
adr
)
int
EraseSector
(
uint32_t
adr
)
{
#ifdef FLASH_PROTCET
if
(
flash_protect_flag
!=
PROTECT_VALUE
)
{
return
(
1
);
}
flash_protect_flag
=
0
;
if
(
flash_protect_flag
!=
PROTECT_VALUE
)
{
return
(
1
);
}
flash_protect_flag
=
0
;
#endif
__DI
;
__DI
;
FMC
->
FLERMD
=
0x10
;
FMC
->
FLPROT
=
0xF1
;
FMC
->
FLOPMD1
=
0x55
;
FMC
->
FLOPMD2
=
0xAA
;
FMC
->
FLOPMD2
=
0xAA
;
// Write data to start address of sector to trigger Erase Operation
*
(
uint32_t
*
)
adr
=
0xFFFFFFFF
;
*
(
uint32_t
*
)
adr
=
0xFFFFFFFF
;
// polling Erase Over Flag
while
((
FMC
->
FLSTS
&
FMC_FLSTS_OVF_Msk
)
==
0
);
while
((
FMC
->
FLSTS
&
FMC_FLSTS_OVF_Msk
)
==
0
)
{
;
}
FMC
->
FLSTS
=
FMC_FLSTS_OVF_Msk
;
FMC
->
FLERMD
=
0x00
;
FMC
->
FLPROT
=
0xF0
;
if
(
FMC
->
FLSTS
&
FMC_FLSTS_EVF_Msk
)
/*
if(FMC->FLSTS & FMC_FLSTS_EVF_Msk)
{
FMC->FLSTS = FMC_FLSTS_EVF_Msk;
__EI;
return
(
1
);
/* verify ng */
return(1);
}
else
{
__EI;
return
(
0
);
/* verify ok */
}
return(0);
} */
__EI
;
return
0
;
}
/***********************************************************************************************************************
...
...
Firmware/Source/UDS/UDS_ISO14229_Server.c
View file @
3d7cd5af
...
...
@@ -203,11 +203,13 @@ void UDS_S_Data_Indication(uint16_t S_TAtype, uint8_t *S_Data, uint16_t S_Length
返回值:无 SYSC0_RUNPLL2CNTR
******************************************************************************/
extern
uint8_t
S3_Server_refresh
;
extern
uint8_t
S3_ServerEN
;
extern
uint8_t
SessionType
;
void
UDS_Process_Service_Request
(
void
)
{
if
(
UDS_APP_RX
.
A_PDU
.
New
)
{
S3_Server
_refresh
=
1
;
S3_Server
EN
=
0
;
// 收到消息时,暂停S3Timer
switch
(
UDS_APP_RX
.
A_PDU
.
A_PCI
.
SI
)
{
case
0x10
:
UDS_Service_10_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
...
...
@@ -218,11 +220,11 @@ void UDS_Process_Service_Request(void)
UDS_Service_22_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
}
break
;
/* case 0x2E: UDS_Service_2E_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
case
0x27
:
UDS_Service_27_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
break
;
case 0x28: UDS_Service_28_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
case
0x2E
:
UDS_Service_2E_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
break
;
/* case 0x28: UDS_Service_28_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
case 0x85: UDS_Service_85_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break; */
...
...
@@ -239,6 +241,12 @@ void UDS_Process_Service_Request(void)
break
;
}
UDS_APP_RX
.
A_PDU
.
New
=
0
;
if
(
SessionType
>
DefaultSession
)
// 非默认会话时执行
{
S3_Server_refresh
=
1
;
// 诊断请求处理完成, 刷新S3Timer
S3_ServerEN
=
1
;
// 消息处理完成,恢复S3Timer计时
}
}
}
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
3d7cd5af
This diff is collapsed.
Click to expand it.
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
3d7cd5af
...
...
@@ -29,12 +29,12 @@
/******************************************************************************
program version
*******************************************************************************/
#define SWV 0x10
5
// 0x100 = 1.00 software version 软件版本号
#define SWV 0x10
6
// 0x100 = 1.00 software version 软件版本号
#define HWV 0x110 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x104 // 0x100 = 1.00 bootloader version boot程序版本号
#define internal_version (10
5
UL)
/* 内部版本号 105 -> 1.05 */
#define internal_date (20240
80
5UL)
/* 内部版本日期 20240805 -> 2024.08.05 */
#define internal_version (10
6
UL)
/* 内部版本号 105 -> 1.05 */
#define internal_date (20240
91
5UL)
/* 内部版本日期 20240805 -> 2024.08.05 */
/**
*DFlash
...
...
@@ -47,6 +47,8 @@
#define FLASH_APP_RODATA_INFO (0x00501C00UL)
/* 存储只读DID信息 */
#define FLASH_APP_RWDATA_INFO (0x00502000UL)
/* 存储可写的DID信息 */
#define FLASH_PAGE_SIZE (0x400UL)
/* FLASH 页面大小 */
#define Data_Flash_Addr_BootValid_OFFSET 0x00000000
#define Data_Flash_Addr_DiagReceive_OFFSET 0x00002000
#define Data_Flash_Addr_Diag2E_OFFSET 0x00004000
...
...
@@ -56,6 +58,8 @@
#define Jump_To_Boot_No_Answer 0xA77A8AA8
#define Flag_App_OTAStatus 0x3663B88B // ����Boot��ԭ������ΪOTA
#define FLAG_APP_FLAG (0xA77A5AA5U)
/* 表示APP标识已写入 */
#define EnableInterrupts \
{ \
__asm CLI; \
...
...
@@ -176,8 +180,6 @@
// #define sendKey_LV11 0x12
#define NormalKeyUnlock 0x01
#define NormalKeyLock 0x00
#define BootKeyUnlock 0x02
#define BootKeyLock 0x00
#define RequestSeedMaxCnt 0x04
#define AttemptMaxCnt 0x03
...
...
@@ -338,26 +340,45 @@ typedef struct
uint8_t
OpCode
;
}
DiagSendDataNeg
;
void
UDS_Service_10_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_11_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_22_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_3E_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
S3_ServerCNTT
(
void
);
extern
void
DIAG_InitParameter
(
void
);
typedef
struct
{
uint32_t
Flag
;
uint8_t
DID_5000
[
32
];
/* programming date */
// uint8_t fill_data[17]; /* 用于保证该结构体长度是4的倍数 */
}
Diag_Write_Data_t
;
extern
void
UDS_Service_10_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
extern
void
UDS_Service_11_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
extern
void
UDS_Service_22_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
extern
void
UDS_Service_27_Indication
(
uint32_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
extern
void
UDS_Service_2E_Indication
(
uint32_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
extern
void
UDS_Service_3E_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
extern
void
S3_ServerCNTT
(
void
);
extern
void
UDS_Normal_Init
(
void
);
extern
void
UDS_Startup_Init
(
void
);
typedef
void
(
*
InitFunction
)(
void
);
/***********Local Functin*************/
uint8_t
GetCurrentSession
(
void
);
uint8_t
SerXXNRC12Filter
(
uint8_t
insub
,
const
uint8_t
*
supportsub
,
uint8_t
size
,
uint8_t
*
index
);
uint8_t
SerXXNRC13Filter
(
uint8_t
type
,
uint8_t
serlength
,
const
uint8_t
*
length
,
uint8_t
index
);
uint8_t
SerXXNRC22Filter
(
void
);
uint8_t
SerXXNRC31DIDFilter
(
uint16_t
inDID
,
const
uint16_t
*
DIDList
,
uint8_t
size
,
uint8_t
*
index
);
uint8_t
SerXXNRC7EFilter
(
const
uint8_t
*
SubSupportSession
,
uint8_t
index
);
uint8_t
SerXXNRC7FFilter
(
uint8_t
SupportSession
);
void
Write_App_InValid
(
uint32_t
m32
);
extern
uint8_t
GetCurrentSession
(
void
);
extern
uint8_t
SerXXNRC12Filter
(
uint8_t
insub
,
const
uint8_t
*
supportsub
,
uint8_t
size
,
uint8_t
*
index
);
extern
uint8_t
SerXXNRC13Filter
(
uint8_t
type
,
uint8_t
serlength
,
const
uint8_t
*
length
,
uint8_t
index
);
extern
uint8_t
SerXXNRC22Filter
(
void
);
extern
uint8_t
SerXXNRC31DIDFilter
(
uint16_t
inDID
,
const
uint16_t
*
DIDList
,
uint8_t
size
,
uint8_t
*
index
);
extern
uint8_t
SerXXNRC7EFilter
(
const
uint8_t
*
SubSupportSession
,
uint8_t
index
);
extern
uint8_t
SerXXNRC7FFilter
(
uint8_t
SupportSession
);
extern
void
Write_App_InValid
(
uint32_t
m32
);
extern
void
Get_Into_630H_Update_MCU_Mode
(
void
);
extern
void
Check_MCU_Info_in_630H
(
void
);
extern
void
Ser27_CreateRandomSeed
(
void
);
extern
uint32_t
CalculateKey
(
uint8_t
seed_array
[]);
extern
uint32_t
Combine_U8_Into_U32
(
uint8_t
*
U8
);
extern
uint8_t
Write_Data_Flash
(
uint32_t
addr
,
uint32_t
size
,
uint8_t
*
data
);
extern
void
erase_memory
(
uint32_t
start_addr
,
uint32_t
end_addr
);
#endif
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