helping stm32h

This commit is contained in:
rusefillc 2023-05-08 23:32:14 -04:00
parent 90e50a2f6e
commit c287f35b1f
2 changed files with 3 additions and 1 deletions

View File

@ -97,9 +97,11 @@ private:
#ifdef STM32H7XX
#define CAN_SID(f) ((f).std.SID)
#define CAN_EID(f) ((f).ext.EID)
#define CAN_ISX(f) ((f).common.XTD)
#define CAN_ID(f) ((f).common.XTD ? CAN_EID(f) : CAN_SID(f))
#else
#define CAN_SID(f) ((f).SID)
#define CAN_EID(f) ((f).EID)
#define CAN_ISX(f) ((f).IDE)
#define CAN_ID(f) ((f).IDE ? CAN_EID(f) : CAN_SID(f))
#endif

View File

@ -75,7 +75,7 @@ static void printPacket(const size_t busIndex, const CANRxFrame &rx) {
int id = CAN_ID(rx);
if (rx.IDE == CAN_IDE_EXT) {
if (CAN_ISX(rx)) {
// print extended IDs in hex only
efiPrintf("CAN%d RX: ID %07x DLC %d: %02x %02x %02x %02x %02x %02x %02x %02x",
busIndex,