It is possible that a call to can2040_transmit() that occurs during an rx message, after an ack is generated, but before the 6th eof bit is received, could lead to report_line_txpending() incorrectly scheduling a duplicate ack. Depending on the timing of the can2040_transmit() it could result in a race condition in the PIO.
Further constrain the ack generation check in report_line_txpending() to avoid this race.
It is possible that a call to can2040_transmit() that occurs during an rx message, after an ack is generated, but before the 6th eof bit is received, could lead to report_line_txpending() incorrectly scheduling a duplicate ack. Depending on the timing of the can2040_transmit() it could result in a race condition in the PIO.
Further constrain the ack generation check in report_line_txpending() to avoid this race.