From 98654c7844408b536a44c3f3693a9c9a7335b21a Mon Sep 17 00:00:00 2001 From: Antonio Brewer Date: Tue, 5 Apr 2022 10:55:40 -0400 Subject: [PATCH] Update FlexCAN_T4.tpp --- FlexCAN_T4.tpp | 1 + 1 file changed, 1 insertion(+) diff --git a/FlexCAN_T4.tpp b/FlexCAN_T4.tpp index a567dba..cf8691f 100644 --- a/FlexCAN_T4.tpp +++ b/FlexCAN_T4.tpp @@ -1000,6 +1000,7 @@ FCTP_FUNC int FCTP_OPT::readMB(CAN_message_t &msg) { } FCTP_FUNC bool FCTP_OPT::struct2queueTx(const CAN_message_t &msg) { + if (FLEXCANb_ESR1(_bus) & 0x20) return -2; if ( txBuffer.size() == txBuffer.capacity() ) return 0; /* no queues available */ uint8_t buf[sizeof(CAN_message_t)]; memmove(buf, &msg, sizeof(msg));