Commit 90633f28 authored by 张明扬's avatar 张明扬 🇨🇳

Merge branch 'ZMY' into 'dev'

fix:修改28服务TXRX使能与禁止使能控制

See merge request !23
parents 936978e1 6a54a18d
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
******************************************************************************/ ******************************************************************************/
#include "UDS_ISO14229_Services.h" #include "UDS_ISO14229_Services.h"
#include "flash.h" #include "flash.h"
#include "CAN_Signal\CAN_Lib.h"
#include "CAN_APP\CAN_CH0_CAN_Communication_Matrix.h"
typedef struct typedef struct
{ {
uint8_t ProjecName[16]; // 项目名 uint8_t ProjecName[16]; // 项目名
...@@ -1104,9 +1105,9 @@ void UDS_Service_27_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A ...@@ -1104,9 +1105,9 @@ void UDS_Service_27_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
28# - CommunicationControl 28# - CommunicationControl
******************************************************************************/ ******************************************************************************/
static const uint8_t Ser28BanResponse = AbleResponseType; static const uint8_t Ser28BanResponse = AbleResponseType;
static const uint8_t Ser28Sub [] = {enableRxAndTx, enableRxAndDisableTx, disableRxAndEnableTx, disableRxAndTx}; static const uint8_t Ser28Sub [] = {enableRxAndTx,/*enableRxAndDisableTx, disableRxAndEnableTx, */disableRxAndTx};
static const uint8_t Ser28MinLen [] = {2}; static const uint8_t Ser28MinLen [] = {2};
static const uint8_t Ser28SubLen [] = {2, 2, 2, 2}; static const uint8_t Ser28SubLen [] = {2, /*2, 2,*/ 2};
static const uint8_t Ser28UnlockLevel [] = {NoNeed, NoNeed, NoNeed, NoNeed}; static const uint8_t Ser28UnlockLevel [] = {NoNeed, NoNeed, NoNeed, NoNeed};
static const uint8_t Ser28SupportSession = ProgrammingMode | ExtendedDiagnosticMode; static const uint8_t Ser28SupportSession = ProgrammingMode | ExtendedDiagnosticMode;
static const uint8_t Ser28SubSupportSession [] = {ProgrammingMode | ExtendedDiagnosticMode, ProgrammingMode | ExtendedDiagnosticMode, ProgrammingMode | ExtendedDiagnosticMode, ProgrammingMode | ExtendedDiagnosticMode}; static const uint8_t Ser28SubSupportSession [] = {ProgrammingMode | ExtendedDiagnosticMode, ProgrammingMode | ExtendedDiagnosticMode, ProgrammingMode | ExtendedDiagnosticMode, ProgrammingMode | ExtendedDiagnosticMode};
...@@ -1182,36 +1183,8 @@ void UDS_Service_28_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A ...@@ -1182,36 +1183,8 @@ void UDS_Service_28_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
{ {
if (UDS_ISO14229_Transfer[1] & normalCommunicationMessages) if (UDS_ISO14229_Transfer[1] & normalCommunicationMessages)
{ {
// L CoCAN_Ch5_Rx_Enable (ENABLE); CAN_RX_SetEnable(&CAN_CH0_CanMsgOp, CAN_N_RX_Enable);
// L CoCAN_Ch5_Tx_Enable(ENABLE); CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
// CAN_RX_SetEnable(CAN_RX_Enable);
// CAN_TX_SetEnable(CAN_TX_Enable);
}
if (UDS_ISO14229_Transfer[1] & networkManagementCommunicationMessages)
{
}
}
else if (enableRxAndDisableTx == SubFunction)
{
if (UDS_ISO14229_Transfer[1] & normalCommunicationMessages)
{
// L CoCAN_Ch5_Rx_Enable (ENABLE);
// L CoCAN_Ch5_Tx_Enable (DISABLE);
// CAN_RX_SetEnable(CAN_RX_Enable);
// CAN_TX_SetEnable(CAN_TX_Disable);
}
if (UDS_ISO14229_Transfer[1] & networkManagementCommunicationMessages)
{
}
}
else if (disableRxAndEnableTx == SubFunction)
{
if (UDS_ISO14229_Transfer[1] & normalCommunicationMessages)
{
// L CoCAN_Ch5_Rx_Enable (DISABLE);
// L CoCAN_Ch5_Tx_Enable (ENABLE);
// CAN_RX_SetEnable(CAN_RX_Disable);
// CAN_TX_SetEnable(CAN_TX_Enable);
} }
if (UDS_ISO14229_Transfer[1] & networkManagementCommunicationMessages) if (UDS_ISO14229_Transfer[1] & networkManagementCommunicationMessages)
{ {
...@@ -1221,10 +1194,8 @@ void UDS_Service_28_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A ...@@ -1221,10 +1194,8 @@ void UDS_Service_28_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
{ {
if (UDS_ISO14229_Transfer[1] & normalCommunicationMessages) if (UDS_ISO14229_Transfer[1] & normalCommunicationMessages)
{ {
// L CoCAN_Ch5_Rx_Enable (DISABLE); CAN_RX_SetEnable(&CAN_CH0_CanMsgOp, CAN_N_RX_Disable);
// L CoCAN_Ch5_Tx_Enable(DISABLE); CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
// CAN_RX_SetEnable(CAN_RX_Disable);
// CAN_TX_SetEnable(CAN_TX_Disable);
} }
if (UDS_ISO14229_Transfer[1] & networkManagementCommunicationMessages) if (UDS_ISO14229_Transfer[1] & networkManagementCommunicationMessages)
{ {
......
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