Author | William Welch Copyright © 2009, all rights reserved. |
Adapted-by | |
Compiler | 2.4 |
a small CAN library compatible with CANopen
Cia DS 301 version 4.02
No dependency found
co_send(dword in cob_id, byte in data[8], byte in len)
co_decode_cob_id(dword in cob_id, byte out func, byte out node_id)
co_receive(dword out cob_id, byte out data[8], byte out len)
co_encode_cob_id(byte in func, byte in node_id, dword out cob_id)
co_send(dword in cob_id, byte in data[8], byte in len)
send standard 11-bit CANopen message FIXME: we are only using one of the TX buffers (3 are available) FIXME: handle timeout
co_decode_cob_id(dword in cob_id, byte out func, byte out node_id)
extract function code and node_id from 11-bit cob_id
co_receive(dword out cob_id, byte out data[8], byte out len)
receive standard 11-bit CANopen message FIXME: we are assuming rollover is set up from RXB0 to RXB1 FIXME: handle timeout
co_encode_cob_id(byte in func, byte in node_id, dword out cob_id)
format the COB-ID, which is a 'standard' 11-bit CAN identifier. the function code is upper 4 bits, the node_id is lower 7 bits.
16f819 | 16f819_canopen_mcp2515_txhb.jal |
18f2585 | 18f2585_can_monitor.jal |