Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mcp2515_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ byte mcp2515_can::mcp2515_getNextFreeTXBuf(byte* txbuf_n) { // get
}

// check all 3 TX-Buffers except reserved
for (i = 0; i < MCP_N_TXBUFFERS - nReservedTx; i++) {
for (i = MCP_N_TXBUFFERS - nReservedTx; i >= 0; i--) {
if ((status & txStatusPendingFlag(i)) == 0) {
*txbuf_n = txCtrlReg(i) + 1; // return SIDH-address of Buffer
mcp2515_modifyRegister(MCP_CANINTF, txIfFlag(i), 0);
Expand Down