58 lines
1.6 KiB
C
58 lines
1.6 KiB
C
// Generator version : v3.1
|
|
// DBC filename : CCU.dbc
|
|
#include "wch_candb-binutil.h"
|
|
|
|
// DBC file version
|
|
#if (VER_CANDB_MAJ != (0U)) || (VER_CANDB_MIN != (0U))
|
|
#error The WCH_CANDB binutil source file has inconsistency with core dbc lib!
|
|
#endif
|
|
|
|
#ifdef __DEF_WCH_CANDB__
|
|
|
|
wch_candb_rx_t wch_candb_rx;
|
|
|
|
wch_candb_tx_t wch_candb_tx;
|
|
|
|
#endif // __DEF_WCH_CANDB__
|
|
|
|
uint32_t wch_candb_Receive(wch_candb_rx_t* _m, const uint8_t* _d, uint32_t _id, uint8_t dlc_)
|
|
{
|
|
uint32_t recid = 0;
|
|
if ((_id >= 0x8EU) && (_id < 0x280U)) {
|
|
if ((_id >= 0x8EU) && (_id < 0x157U)) {
|
|
if (_id == 0x8EU) {
|
|
recid = Unpack_VAU2_NFC_TransferState_candb(&(_m->VAU2_NFC_TransferState), _d, dlc_);
|
|
} else if (_id == 0x121U) {
|
|
recid = Unpack_VAU2_Msg1_candb(&(_m->VAU2_Msg1), _d, dlc_);
|
|
}
|
|
} else {
|
|
if (_id == 0x157U) {
|
|
recid = Unpack_BCM_EEM_candb(&(_m->BCM_EEM), _d, dlc_);
|
|
} else if (_id == 0x24FU) {
|
|
recid = Unpack_VAU2_Msg2_candb(&(_m->VAU2_Msg2), _d, dlc_);
|
|
}
|
|
}
|
|
} else {
|
|
if ((_id >= 0x280U) && (_id < 0x5F7U)) {
|
|
if (_id == 0x280U) {
|
|
recid = Unpack_BCM_VEH_STATE_candb(&(_m->BCM_VEH_STATE), _d, dlc_);
|
|
} else if (_id == 0x51AU) {
|
|
recid = Unpack_VEH_VIN_candb(&(_m->VEH_VIN), _d, dlc_);
|
|
}
|
|
} else {
|
|
if (_id == 0x5F7U) {
|
|
recid = Unpack_LTE_Sum_State2_candb(&(_m->LTE_Sum_State2), _d, dlc_);
|
|
} else {
|
|
if (_id == 0x604U) {
|
|
recid = Unpack_FIU_WChF_TransferState_candb(&(_m->FIU_WChF_TransferState), _d, dlc_);
|
|
} else if (_id == 0x7DFU) {
|
|
recid = Unpack_Diag_Functional_candb(&(_m->Diag_Functional), _d, dlc_);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return recid;
|
|
}
|
|
|