From de232fcbbe58c09a5d90f35854bfe1892fdfff66 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 4 Jan 2016 20:25:24 +0300 Subject: [PATCH] Remove wait for CAN TX --- mcp_can.cpp | 54 ++++++++++++++--------------------------------------- mcp_can.h | 2 -- 2 files changed, 14 insertions(+), 42 deletions(-) diff --git a/mcp_can.cpp b/mcp_can.cpp index a87860a..77119f0 100644 --- a/mcp_can.cpp +++ b/mcp_can.cpp @@ -451,31 +451,6 @@ void MCP_CAN::mcp2515_write_id( const INT8U mcp_addr, const bool ext, const INT3 mcp2515_setRegisterS( mcp_addr, tbufdata, 4 ); } -/********************************************************************************************************* -** Function name: sendMsg -** Descriptions: send message -*********************************************************************************************************/ -INT8U MCP_CAN::mcp2515_getNextFreeTXBuf(INT8U *txbuf_n) /* get Next free txbuf */ -{ - INT8U res, i, ctrlval; - INT8U ctrlregs[MCP_N_TXBUFFERS] = { MCP_TXB0CTRL, MCP_TXB1CTRL, MCP_TXB2CTRL }; - - res = MCP_ALLTXBUSY; - *txbuf_n = 0x00; - - /* check all 3 TX-Buffers */ - for (i=0; i