== Communication protocol between CAN and CC2540 chip. ==[[BR]] List of commands from CC2540 to CAN transiver: 1. Subscribe to a message 2. Subscribe to a message with a bitmask 3. Unsubscribe from messages 4. Unsubscribe from messages with a bitmask 5. List of all subscriptions 6. Reset filter state 7. Passthrough message {{{ enum { CMD_SUBSCRIBE = 1, CMD_SUBSCRIBE_BITMASK, CMD_UNSUBSCRIBE, CMD_UNSUBSCRIBE_BITMASK, CMD_LIST, CMD_RESET, CMD_MSG } cmd_type; }}} Command message structure ||= Byte =||= Bitmask =||= Description =||= Values =|| || 0 || || Command code || 1 - 7|| || 1 || || Payload size || 0 - 254|| || 2 - 255 || || Payload |||| Examples 0x01:0x08:0x00:0x00:0x07:0x06:0x00:0x01:0x05:0x05 1. byte - subsribe command 2. byte - payload size 8 byte = 2 CAN message IDs * 4 byte each 3. - 10. bytes 0076h & 0155h