Обновление
This commit is contained in:
parent
97be62b1a6
commit
919ebd0b3b
|
|
@ -11,6 +11,8 @@
|
||||||
#include "CmsisRtosThreadUtils.h"
|
#include "CmsisRtosThreadUtils.h"
|
||||||
#include "SystemMutexCmsis.h"
|
#include "SystemMutexCmsis.h"
|
||||||
|
|
||||||
|
#define LOG_UDS_TP 0
|
||||||
|
|
||||||
#define TP_FRAME_PADDING 0xAA
|
#define TP_FRAME_PADDING 0xAA
|
||||||
|
|
||||||
#define WAIT_FC_FRAME_TIMEOUT 1000
|
#define WAIT_FC_FRAME_TIMEOUT 1000
|
||||||
|
|
@ -76,17 +78,11 @@ typedef struct __attribute__ ((packed)) {
|
||||||
uint8_t timeST;
|
uint8_t timeST;
|
||||||
} eTpFrameFC;
|
} eTpFrameFC;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint32_t adrCan;
|
|
||||||
uint16_t len;
|
|
||||||
uint8_t data[50];
|
|
||||||
} tCanTP_data;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t adrCan;
|
uint32_t adrCan;
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
uint8_t data[1024];
|
uint8_t data[1024];
|
||||||
} tCanTP_Ext_data;
|
} tCanTP_data;
|
||||||
|
|
||||||
typedef void (*tReceivedTP_func)(void *arg, tCanTP_data *data);
|
typedef void (*tReceivedTP_func)(void *arg, tCanTP_data *data);
|
||||||
typedef bool (*tReceivedCan_func)(void *arg, can_rx_message_type *data);
|
typedef bool (*tReceivedCan_func)(void *arg, can_rx_message_type *data);
|
||||||
|
|
|
||||||
|
|
@ -412,9 +412,11 @@ _Noreturn void CanTpProcessing_ListenerTask(tCanSerialPortFrameTp *env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == TP_RECEIVED_DATA) {
|
if (result == TP_RECEIVED_DATA) {
|
||||||
|
|
||||||
|
#if (LOG_UDS_TP == 1)
|
||||||
sendLogCanTpHex(env, env->dataBuf->data, env->dataBuf->len);
|
sendLogCanTpHex(env, env->dataBuf->data, env->dataBuf->len);
|
||||||
LoggerFormatInfo(LOGGER, LOG_SIGN, "Data received: %s", env->hexString)
|
LoggerFormatInfo(LOGGER, LOG_SIGN, "Data received: %s", env->hexString)
|
||||||
|
#endif
|
||||||
env->receivedTP_func(env->callback_argTp, env->dataBuf);
|
env->receivedTP_func(env->callback_argTp, env->dataBuf);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue