Added sleep support for MCP2515 + MCP2551. This way, you can reduce the power consumption of a complete node down to around 240uA!
Changes:
- Reintroduced gpio support from commits 43521de/bac66d1 (adlerweb, 15/01/2018) and corrected the errors
- Introduced advanced sleep support based on https://github.com/coryjfowler/MCP_CAN_lib/pull/10/files
- added example code (receive_sleep and send_sleep)
- tested everything
- 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
- 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
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.