- Backward compatibility should be OK.
- mcp2515_write_canMsg and mcp2515_read_canMsg does transfer now with
single SPI session by using SPI READ RX BUFFER and LOAD TX BUFFER
- mcp2515_start_transmit uses directly SPI instruction RTS
- removed internal data buffer. Read and write uses directly provided
buffer
- works with 8Mhz clock
- Possible to set SPI. Some boards has 2 SPI.
- Works with NMEA2000 library
- New functions for better interrupt handling
The SPISettings object is used to configure the SPI port for your SPI device. All 3 parameters are combined to a single SPISettings object, which is given to SPI.beginTransaction().
Syntax
SPI_BEGIN() --> SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE0))
Stop using the SPI bus. Normally this is called after de-asserting the chip select, to allow other libraries to use the SPI bus.
Syntax
SPI_END() --> SPI.endTransaction()
The original code reads address 0x31, 0x41, or 0x51 "TXBnSIDH – TRANSMIT
BUFFER n STANDARD IDENTIFIER HIGH". Because that location points to a
constant value, some of the msg ids cause the program to loop 50 times
and then report a timeout error. After changing the address to point to
0x30, 0x40, or 0x50 "TXBnCTRL – TRANSMIT BUFFER n CONTROL REGISTER", all
of the messages send out properally with no timeout errors.
not clearing m_nRtr until next data frame without request bit is
received. This lead to sending out all frames in between with
request bit set aswell. Fixed by extending sendMsgBuf to
INT8U sendMsgBuf(INT32U id, INT8U ext, INT8U rtr, INT8U len, INT8U *buf)
and setMsg to
INT8U setMsg(INT32U id, INT8U ext, INT8U len, INT8U rtr, INT8U *pData)
giving the possibillity to specify if request bit is set or not when
sending a message.
Feature: New function INT8U MCP_CAN::isRemoteRequest(void) added
to make it possible to check if the remote request bit was set on
the last received message.