equal
deleted
inserted
replaced
60 UNS8 canReceive(CAN_HANDLE fd0, Message *m) |
60 UNS8 canReceive(CAN_HANDLE fd0, Message *m) |
61 { |
61 { |
62 UNS8 data; |
62 UNS8 data; |
63 TPCANMsg peakMsg; |
63 TPCANMsg peakMsg; |
64 if ((errno = CAN_Read(((CANPort*)fd0)->fd, & peakMsg))) { // Blocks until no new message or error. |
64 if ((errno = CAN_Read(((CANPort*)fd0)->fd, & peakMsg))) { // Blocks until no new message or error. |
65 if(errno != -EIDRM) // error is not "Can Port closed while reading" |
65 if(errno != -EIDRM && errno != -EPERM) // error is not "Can Port closed while reading" |
66 { |
66 { |
67 perror("!!! Peak board : error of reading. (from f_can_receive function) \n"); |
67 perror("!!! Peak board : error of reading. (from f_can_receive function) \n"); |
68 } |
68 } |
69 return 1; |
69 return 1; |
70 } |
70 } |