Commit b8519540 authored by 李延凯's avatar 李延凯

feat: 修改Git忽略文件列表, 添加诊断基础文件

parent 96ee6f9d
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/Objects
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/Listings
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/JLinkLog.txt
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Objects
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Listings
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/JLinkLog.txt
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/*.tyw05
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/*.uvoptx
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/*.VMW10
/.vscode
*.zip
*.7z
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/*.tyw05
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/*.tyw05
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/*.tyw05
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RunTong.uvoptx
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/*.uvoptx
/Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/*.VMW10
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Listings/HaoJin.map
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Objects
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvguix.tyw05
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvguix.tyw05
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvoptx
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Listings/HaoJin750TFT.map
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvguix.tyw05
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Listings/HaoJin750TFT.map
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/*.uvoptx
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/JLinkLog.txt
/Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/JLinkLog.txt
/******************************************************************************
文 件 名:Diag_ID_Def
功能描述:诊断地址配置文件
作 者:张暄
版 本:V1.0
日 期:2016.9.22
******************************************************************************/
#ifndef _DIAG_ID_DEF_H_
#define _DIAG_ID_DEF_H_
#define DIAG_ID_Tx 0x07E8 /*发送ID*/
#define DIAG_ID_Rx_PHY 0x07E0 /*接收ID,物理寻址*/
#define DIAG_ID_Rx_FUN 0x07DF /*接收ID,功能寻址*/
#endif
This diff is collapsed.
This diff is collapsed.
/******************************************************************************
文 件 名:DoCAN_ISO15765_Config.h
功能描述:ISO 15765 规范规定的诊断服务配置文件
作 者:张暄
版 本:V1.0
日 期:2016.7.18
******************************************************************************/
/******************************************************************************
Diagnostic/Programming Specifications Applicable to the OSI Layers
===============================================================================
* NO. OSI Layer Diagnostics services
-------------------------------------------------------------------------------
7 Application ISO 14229-1 ISO 14229-3
6 Presentation -
5 Session ISO 14229-2
* 4 Transport ISO 15765-2
* 3 Network ISO 15765-2
2 Data Link ISO 11898
1 Physical ISO 11898
===============================================================================
******************************************************************************/
#ifndef _DOCAN_ISO15765_CONFIG_H_
#define _DOCAN_ISO15765_CONFIG_H_
#include "Diag_ID_Def.h"
/*-----------------------------------------------------------------------------
If CAN frame data padding is used, the DLC is always set to 8, even if the
N_PDU to be transmitted is shorter than 8 bytes. The sender has to pad any
unused bytes in the frame. In particular, this can be the case for an SF, FC
frame or the last CF of a segmented message.
-----------------------------------------------------------------------------*/
#define FILLER_BYTE_HANDLING 1
#define FILLER_BYTE 0xAA
/*-----------------------------------------------------------------------------
Link layer Rx FIFO depth
-----------------------------------------------------------------------------*/
#define LINK_RX_FIFO_MAX_DEPTH 2
/*-----------------------------------------------------------------------------
Network layer buffer size
-----------------------------------------------------------------------------*/
#define N_USDATA_RX_BUFFER_SIZE 96
#define N_USDATA_TX_BUFFER_SIZE 96
/******************************************************************************
The FlowControl mechanism allows the receiver to inform the sender about the
receiver’s capabilities. Since different nodes may have different capabilities,
the FlowControl sent by the receiver informs the sender about its capabilities.
The sender shall conform to the receiver’s capabilities.
These capabilities are defined as follows.
******************************************************************************/
/*-----------------------------------------------------------------------------
— BlockSize (BS): The maximum number of N_PDUs the receiver allows the sender
to send, before waiting for an authorization to continue transmission of the
following N_PDUs.
-----------------------------------------------------------------------------*/
#define N_MAX_BS 8
/*-----------------------------------------------------------------------------
— SeparationTime minimum (STmin): The minimum time the sender is to wait
between transmission of two CF N_PDUs. (Unit: ms)
-----------------------------------------------------------------------------*/
#define N_STmin 20
/*-----------------------------------------------------------------------------
— N_WFTmax: Upper limit to the number of FC.WAIT a receiver is allowed to send
in a row. This parameter is a system design constant and is not
transmitted in the first FC N_PDU.
-----------------------------------------------------------------------------*/
#define N_WFTmax 0
/******************************************************************************
Timing parameters
******************************************************************************/
/*-----------------------------------------------------------------------------
- Timing Parametera : N_As
- Description : Time for transmission of the CAN frame (any N_PDU)
on the sender side
- Start : L_Data.request
- End : L_Data.confirm
- Timeout(Max) : 1,000 ms
- Performance Requirement :
-----------------------------------------------------------------------------*/
#define N_As (( uint32_t )25)
/*-----------------------------------------------------------------------------
- Timing Parametera : N_Ar
- Description : Time for transmission of the CAN frame (any N_PDU)
on the receiver side
- Start : L_Data.request
- End : L_Data.confirm
- Timeout(Max) : 1,000 ms
- Performance Requirement :
-----------------------------------------------------------------------------*/
#define N_Ar (( uint32_t )25)
/*-----------------------------------------------------------------------------
- Timing Parametera : N_Bs
- Description : Time until reception of the next FlowControl N_PDU
- Start : L_Data.confirm (FF) / L_Data.confirm (CF) /
L_Data.indication (FC)
- End : L_Data.indication (FC)
- Timeout(Max) : 1,000 ms
- Performance Requirement :
-----------------------------------------------------------------------------*/
#define N_Bs (( uint32_t )75)
/*-----------------------------------------------------------------------------
- Timing Parametera : N_Br
- Description : Time until transmission of the next FlowControl
N_PDU
- Start : L_Data.indication (FF) / L_Data.indication (CF)
L_Data.confirm (FC)
- End : L_Data.request (FC)
- Timeout(Max) : N/A
- Performance Requirement : (N_Br + N_Ar) < (0.9 × N_Bs timeout)
-----------------------------------------------------------------------------*/
#define N_Br (( uint32_t )9)
/*-----------------------------------------------------------------------------
- Timing Parametera : N_Cs
- Description : Time until transmission of the next
ConsecutiveFrame N_PDU
- Start : L_Data.indication (FC) / L_Data.confirm (CF)
- End : L_Data.request (CF)
- Timeout(Max) : N/A
- Performance Requirement : (N_Cs + N_As) < (0.9 × N_Cr timeout)
-----------------------------------------------------------------------------*/
#define N_Cs (( uint32_t )0)
/*-----------------------------------------------------------------------------
- Timing Parametera : N_Cr
- Description : Time until reception of the next Consecutive Frame
N_PDU
- Start : L_Data.confirm (FC) / L_Data.indication (CF)
- End : L_Data.indication (CF)
- Timeout(Max) : 1,000 ms
- Performance Requirement :
-----------------------------------------------------------------------------*/
#define N_Cr (( uint32_t )150)
/******************************************************************************
For debug purpose
******************************************************************************/
/*-----------------------------------------------------------------------------
Global debug switch
-----------------------------------------------------------------------------*/
#define DOCAN_DEBUG_EN 0
/*-----------------------------------------------------------------------------
Bug indicator functions
-----------------------------------------------------------------------------*/
#if DOCAN_DEBUG_EN
#define LINK_RX_FIFO_OVERFLOW_INDICATOR( )
#endif
#endif
This diff is collapsed.
/******************************************************************************
文 件 名:UDS_ISO14229_Server.h
功能描述:ISO 14229 规范规定的诊断服务服务器端函数头文件
作 者:张暄
版 本:V1.0
日 期:2016.11.1
******************************************************************************/
/******************************************************************************
诊断服务的OSI模型映射
===============================================================================
* NO. OSI Layer Diagnostics services
-------------------------------------------------------------------------------
* 7 Application ISO 14229-1 ISO 14229-3
6 Presentation -
* 5 Session ISO 14229-2
4 Transport ISO 15765-2
3 Network ISO 15765-2
2 Data Link ISO 11898
1 Physical ISO 11898
===============================================================================
******************************************************************************/
#ifndef _UDS_ISO14229_SERVER_H_
#define _UDS_ISO14229_SERVER_H_
#include "DoCAN_ISO15765.h"
#include "DoCAN_ISO15765_Config.h"
#include "UDS_ISO14229_Services.h"
/******************************************************************************
结构体声明
******************************************************************************/
/*** 会话层数据发送结果枚举 ***/
typedef enum
{
S_OK = 0,
S_NOK,
} S_Result_Enum;
/*---------------------------------------------------------------------------*/
/*** A_PCI解析结构(非负反馈) ***/
typedef struct
{
uint8_t SI;
} UDS_A_PCI_Struct;
/*** A_PCI解析结构(负反馈) ***/
typedef struct
{
uint8_t NR_SI;
uint8_t SI;
} UDS_NEG_A_PCI_Struct;
/*** 应用层接收数据解析结构 ***/
typedef struct
{
uint16_t TA_type;
uint8_t A_Data [ A_DATA_RX_BUFFER_SIZE ];
uint16_t Length; // 有效数据长度(不含A_PCI)
uint8_t New; // 新收到的数据
} UDS_RX_App_Data_Struct;
/*** 应用层接收A_PDU解析结构 ***/
typedef struct
{
uint16_t TA_type;
UDS_A_PCI_Struct A_PCI;
uint8_t Data [ A_DATA_RX_BUFFER_SIZE - 1 ];
uint16_t Length; // 有效数据长度(不含A_PCI)
uint8_t New; // 新收到的数据
} UDS_RX_A_PDU_Struct;
/*** 应用层发送数据解析结构 ***/
typedef struct
{
uint16_t TA_type;
uint8_t A_Data [ A_DATA_TX_BUFFER_SIZE ];
uint16_t Length; // 有效数据长度(不含A_PCI)
} UDS_TX_App_Data_Struct;
/*** 应用层发送正反馈A_PDU解析结构 ***/
typedef struct
{
uint16_t TA_type;
UDS_A_PCI_Struct A_PCI;
uint8_t Data [ A_DATA_TX_BUFFER_SIZE - 1 ];
uint16_t Length; // 有效数据长度(不含A_PCI)
} UDS_TX_A_PDU_Struct;
/*** 应用层发送负反馈A_PDU解析结构 ***/
typedef struct
{
uint16_t TA_type;
UDS_NEG_A_PCI_Struct A_PCI;
uint8_t Data [ A_DATA_TX_BUFFER_SIZE - 2 ];
uint16_t Length; // 有效数据长度(不含A_PCI)
} UDS_TX_NEG_A_PDU_Struct;
/*** 应用层接收数据解析联合体 ***/
typedef union
{
UDS_RX_App_Data_Struct Data;
UDS_RX_A_PDU_Struct A_PDU;
} UDS_APP_RX_Union;
/*** 应用层发送正反馈数据解析联合体 ***/
typedef union
{
UDS_TX_App_Data_Struct Data;
UDS_TX_A_PDU_Struct A_PDU;
} UDS_APP_TX_Union;
/*** 应用层发送负反馈数据解析联合体 ***/
typedef union
{
UDS_TX_App_Data_Struct Data;
UDS_TX_NEG_A_PDU_Struct A_PDU;
} UDS_APP_TX_NEG_Union;
/* 全局变量 变更为局部变量
uint8_t Service10DiagDataLength;
uint8_t Service11DiagDataLength;
uint8_t Service14DiagDataLength;
uint8_t Service19DiagDataLength;
uint8_t Service22DiagDataLength;
uint8_t Service27DiagDataLength;
uint8_t Service28DiagDataLength;
uint8_t Service2EDiagDataLength;
uint8_t Service2FDiagDataLength;
uint8_t Service31DiagDataLength;
uint8_t Service34DiagDataLength;
uint8_t Service36DiagDataLength;
uint8_t Service37DiagDataLength;
uint8_t Service3EDiagDataLength;
uint8_t Service85DiagDataLength;
*/
/******************************************************************************
函数声明
******************************************************************************/
/*-- 外部接口函数 -----------------------------------------------------------*/
/*** 后台服务函数 ***/
void UDS_Server_Application_Service(void);
/*** 传输层/网络层下层接口函数 ***/
void UDS_N_USData_Request(uint16_t N_TAtype, uint8_t *MessageData, uint16_t Length);
void UDS_N_USData_Confirm(uint16_t N_TAtype, uint8_t N_Result);
void UDS_N_USData_FF_Indication(uint16_t N_TAtype, uint16_t Length);
void UDS_N_USData_Indication(uint16_t N_TAtype, uint8_t *MessageData, uint16_t Length, uint8_t N_Result);
/*-- 内部函数 ---------------------------------------------------------------*/
/*** 会话层数据接口函数 ***/
void UDS_S_Data_Request(uint16_t S_TAtype, uint8_t *S_Data, uint16_t S_Length);
void UDS_S_Data_Confirm(uint16_t S_TAtype, S_Result_Enum S_Result);
void UDS_S_Data_Indication(uint16_t S_TAtype, uint8_t *S_Data, uint16_t S_Length, S_Result_Enum S_Result);
/*** 会话层时序控制函数 ***/
/*** 应用层服务控制函数 ***/
void UDS_Process_Service_Request(void);
extern void UDS_Service_Response(uint8_t si, uint8_t RspType, uint16_t A_TA_type, uint16_t A_Length, uint8_t *A_Data);
#endif
/******************************************************************************
文 件 名:UDS_ISO14229_Server_Config.h
功能描述:ISO 14229 规范规定的诊断服务服务器端配置文件
作 者:张暄
版 本:V1.0
日 期:2016.11.1
******************************************************************************/
/******************************************************************************
诊断服务的OSI模型映射
===============================================================================
* NO. OSI Layer Diagnostics services
-------------------------------------------------------------------------------
* 7 Application ISO 14229-1 ISO 14229-3
6 Presentation -
* 5 Session ISO 14229-2
4 Transport ISO 15765-2
3 Network ISO 15765-2
2 Data Link ISO 11898
1 Physical ISO 11898
===============================================================================
******************************************************************************/
#ifndef _UDS_ISO14229_SERVER_CONFIG_H_
#define _UDS_ISO14229_SERVER_CONFIG_H_
#include "stdint.h"
#include "Diag_ID_Def.h"
#define A_DATA_RX_BUFFER_SIZE N_USDATA_RX_BUFFER_SIZE
#define A_DATA_TX_BUFFER_SIZE N_USDATA_TX_BUFFER_SIZE
#define P2_SERVER (uint16_t)50 /*P2Server*/
#define P2_AST_SERVER (uint16_t)200 /*P2*Server*/
#define S3_SERVER (uint8_t)50 /*S3Server 50 00ms*/
#endif
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment