Modified mcp2518fd sendmsgbuf() len

This commit is contained in:
wangcoolc
2020-12-10 17:10:14 +08:00
committed by Baozhu Zuo
parent cbe5bf3af0
commit 3c78368258
+3 -2
View File
@@ -2443,13 +2443,14 @@ byte mcp2518fd::mcp2518fd_sendMsg(const byte *buf, byte len, unsigned long id, b
txObj.bF.ctrl.FDF = 1;
}
txObj.bF.ctrl.BRS = true;
n = DRV_CANFDSPI_DlcToDataBytes((CAN_DLC)txObj.bF.ctrl.DLC);
//Prepare data
for (i = 0; i < len; i++)
for (i = 0; i < n; i++)
{
txd[i] = buf[i];
}
mcp2518fd_TransmitMessageQueue();
return spiTransferError;
}