Commit Graph
22 Commits
Author SHA1 Message Date
Dmitry de232fcbbe Remove wait for CAN TX 2016-01-04 20:25:24 +03:00
Dmitry 75a299f28f Totally simplify 2016-01-04 19:53:06 +03:00
Dmitry 15a56d90e0 Add "mode" parameter to constructor 2015-12-26 14:49:53 +03:00
Dmitry 2d1d4f219e Add "const" to pData
Add "const" to pData to prevent compile errors in some situations
2015-12-25 01:14:22 +03:00
btetz cf0a689dd9 Added an offset to the txbuf_n pointer so that the actual ctrl reg value is read.
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.
2015-08-25 14:15:59 +09:00
latonita 79b3823cf2 isExtFrame function renamed 2015-04-07 17:00:04 +03:00
latonita c4d4d05702 83.3kbps baud rate support + extended flag getter
Quite commonly used 83.3kbps added. (Chrysler, Jeep, MB, etc..)
Added ability to check type of received frame.
2015-04-07 00:55:49 +03:00
Lowaichung 9a5ea4b50f Merge pull request #12 from BlueAndi/patch-1
Missing return statements added
2015-03-20 09:30:53 +08:00
Tsipizidis Charalampos db5e77992d Add GMLAN Baudrates support 2015-03-10 10:05:44 +02:00
Andreas Merkle b8803af39d Missing return statements added 2015-03-07 14:48:34 +01:00
reeedstudio 0c869d8ae3 fix some bug 2014-09-17 09:07:32 +08:00
Lowaichung 27ac208404 Merge pull request #8 from ipeukes/master
Possibility to handle frames with request bit set
2014-09-12 14:08:11 +08:00
reeedstudio 5e271cd095 Merge branch 'master' of https://github.com/Seeed-Studio/CAN_BUS_Shield 2014-09-12 11:08:40 +08:00
reeedstudio d26c12cca3 fix the set mask and filter fail bug 2014-09-12 11:08:06 +08:00
Ingo Peukes bc42abf219 Bugfix: When receiving a frame with remote request bit set
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.
2014-09-03 18:47:27 +02:00
BykeBlast 5c1392db30 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
2014-09-01 13:36:01 +02:00
reeedstudio 64ca6c9c32 add set mask and filter example 2014-07-08 20:11:32 +08:00
loovee 925f97c2c9 version 1.2 2014-07-08 13:55:49 +08:00
Loovee fec92a1b18 Merge pull request #2 from woodward1/patch-2
Set SPICS pin to output in begin()
2014-03-08 14:47:58 +08:00
woodward1 43d936ddf3 fixed corrupted can id bug
There was an error in the bit arithmatic for the can id.

Basically, if the 15th bit of the id was set, then the upper 16bits were 1 less than they should be.
e.g. 0x0001(8-F)XXX -> 0x0000(8-F)XXX
e.g. 0x0000(8-F)XXX -> 0xFFFF(8-F)XXX

The offending operation is (tbufdata[MCP_EID8]<<8). This promotes an unsigned char to a signed int, which results in the corrupted ids. The fix is to cast it to an unsigned int. Note that int's are 16 bit on avr.
2014-03-07 11:43:52 -08:00
woodward1 705f3be317 Set SPICS pin to output in begin()
It took me a while to figure this out, but the SPICS pin is not necessarily initialized to output when the arduino starts. Explicitly making it an output in the begin() method saves the library user from having to set the pin as output in their code (which they may not know they need to do, since it is not in the example code).
2014-02-28 15:57:16 -08:00
reeedstudio 94edfca904 update 2014-01-02 11:50:38 +08:00