From 5c1392db30aabed7a17de33342cf93e3f5836449 Mon Sep 17 00:00:00 2001 From: BykeBlast Date: Mon, 1 Sep 2014 13:36:01 +0200 Subject: [PATCH] Update mcp_can.cpp - Added: buffer limit in mcp2515_readRegisterS - Added: return code check in readMsgBuf - Added: function readMsgBufID to read message and object id in a single phase --- mcp_can.cpp | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/mcp_can.cpp b/mcp_can.cpp index 9e7137d..580cf10 100644 --- a/mcp_can.cpp +++ b/mcp_can.cpp @@ -65,8 +65,7 @@ void MCP_CAN::mcp2515_readRegisterS(const INT8U address, INT8U values[], const I spi_readwrite(MCP_READ); spi_readwrite(address); // mcp2515 has auto-increment of address-pointer - for (i=0; i