chg-stn-motherboard-ti-mcu/ivec_ECU/ivec_ecu_common/inc/ivec_ecu_common.h

52 lines
1.2 KiB
C

#ifndef IVEC_ECU_COMMON_H
#define IVEC_ECU_COMMON_H
#include "ivec_mcal_common.h"
typedef enum
{
//common
commonECU_SUCCESS = 0,
commonECU_WAIT,
commonECU_INVALID_PARAM=-7,
commonECU_FAIL = -6,
commonECU_INIT_FAIL = -5,
commonECU_DEINIT_FAIL,
commonECU_CONFIG_FAIL,
commonECU_READ_FAIL,
commonECU_WRITE_FAIL,
commonECU_ALREADY_INIT=-20,
commonECU_ALREADY_DEINIT,
commonECU_NOT_IMPLEMENTED
}IVEC_EcuCommonErr_e;
typedef struct{
uint32_t u32CanId;
uint8_t ucCanDlc;
uint8_t pucCanData[8];
}IVEC_EcuCommonCanFrame_s;
#define IVEC_DELAY_MS(x)
#define ECU_LOG_ENABLE 0
#if ECU_LOG_ENABLE==1
#define IVEC_ECU_LOG(LOG_STRING, msg ,...) QL_LOG(QL_LOG_LEVEL_INFO, LOG_STRING, msg, ##__VA_ARGS__)
#else
#define IVEC_ECU_LOG(LOG_STRING,msg, ...)
#endif
#if 0
#define IVEC_ECU_FUNC_ENTRY(LOG_STRING,...) QL_LOG(QL_LOG_LEVEL_INFO, LOG_STRING, "ECU Entry", ##__VA_ARGS__)
#else
#define IVEC_ECU_FUNC_ENTRY(LOG_STRING, ...)
#endif
#if 0
#define IVEC_ECU_FUNC_EXIT(LOG_STRING,...) QL_LOG(QL_LOG_LEVEL_INFO, LOG_STRING, "ECU Exit:%d", ##__VA_ARGS__)
#else
#define IVEC_ECU_FUNC_EXIT(LOG_STRING, ...)
#endif
#endif /* IVEC_ECU_COMMON_H */