This commit introduces SocketCAN support for NuttX. New functions socketCAN_open(char * dev) and socketCAN_saveMsg(struct can_frame m) were added to support different open proccess and different NuttX structure of message, the overall princip remains the same (functions canOpenTH(char * dev) and sendMsg(uint16_t ID, uint8_t DATA[], int len) are called from block´s source code). File canopen.c now can support both characteristic device dev/can0 and socketcan.
There are also few unused functions like rcvMsg(uint8_t DATA[], int timeout), rcvMsgCob(int cob, uint8_t DATA[], int timeout) and canOpen(char * dev). I am not sure whether they should be removed as they do not support real time receive or whether they can have some usage.
SocketCAN communication was tested on existing blocks.
This commit introduces SocketCAN support for NuttX. New functions
socketCAN_open(char * dev)
andsocketCAN_saveMsg(struct can_frame m)
were added to support different open proccess and different NuttX structure of message, the overall princip remains the same (functionscanOpenTH(char * dev)
andsendMsg(uint16_t ID, uint8_t DATA[], int len)
are called from block´s source code). Filecanopen.c
now can support both characteristic device dev/can0 and socketcan.There are also few unused functions like
rcvMsg(uint8_t DATA[], int timeout)
,rcvMsgCob(int cob, uint8_t DATA[], int timeout)
andcanOpen(char * dev)
. I am not sure whether they should be removed as they do not support real time receive or whether they can have some usage.SocketCAN communication was tested on existing blocks.