X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/a8ff8ecbfa9fa4f402e763cd30cf3bb6c385e65f..88bf95b4a4434bafd1cd82b646d4ba902ce16086:/lincan/include/usbcan.h diff --git a/lincan/include/usbcan.h b/lincan/include/usbcan.h index 2d580fb..0f1e39c 100644 --- a/lincan/include/usbcan.h +++ b/lincan/include/usbcan.h @@ -71,59 +71,50 @@ int usbcan_chip_queue_status(struct canchip_t *chip); #ifdef CONFIG_OC_LINCAN_DETAILED_ERRORS -static const char *sja1000_ecc_errc_str[]={ - "bit error", - "form error", - "stuff error", - "other type of error" -}; - -static const char *sja1000_ecc_seg_str[]={ - "?0?", - "?1?", - "ID.28 to ID.21", - "start of frame", - "bit SRTR", - "bit IDE", - "ID.20 to ID.18", - "ID.17 to ID.13", - "CRC sequence", - "reserved bit 0", - "data field", - "data length code", - "bit RTR", - "reserved bit 1", - "ID.4 to ID.0", - "ID.12 to ID.5", - "?16?" - "active error flag", - "intermission", - "tolerate dominant bits", - "?20?", - "?21?", - "passive error flag", - "error delimiter", - "CRC delimiter", - "acknowledge slot", - "end of frame", - "acknowledge delimiter", - "overload flag", - "?29?", - "?30?", - "?31?" -}; +// static const char *sja1000_ecc_errc_str[]={ +// "bit error", +// "form error", +// "stuff error", +// "other type of error" +// }; +// +// static const char *sja1000_ecc_seg_str[]={ +// "?0?", +// "?1?", +// "ID.28 to ID.21", +// "start of frame", +// "bit SRTR", +// "bit IDE", +// "ID.20 to ID.18", +// "ID.17 to ID.13", +// "CRC sequence", +// "reserved bit 0", +// "data field", +// "data length code", +// "bit RTR", +// "reserved bit 1", +// "ID.4 to ID.0", +// "ID.12 to ID.5", +// "?16?" +// "active error flag", +// "intermission", +// "tolerate dominant bits", +// "?20?", +// "?21?", +// "passive error flag", +// "error delimiter", +// "CRC delimiter", +// "acknowledge slot", +// "end of frame", +// "acknowledge delimiter", +// "overload flag", +// "?29?", +// "?30?", +// "?31?" +// }; #endif /*CONFIG_OC_LINCAN_DETAILED_ERRORS*/ -/* CAN message over usb */ -struct usbcan_canmsg_t{ - __u8 chip_id; - __u16 flags; - __u8 id[4]; - __u8 length; - __u8 data[8]; -}; - /* Structure to hold all of our device specific stuff */ struct usbcan_usb { struct usb_device *udev; /* the usb device for this device */ @@ -134,19 +125,17 @@ struct usbcan_usb { unsigned char *ctl_in_buffer; /* the buffer to receive data */ size_t bulk_in_size; /* the size of the receive buffer */ size_t ctl_in_size; /* the size of the receive buffer */ - __u8 ctl_in_endpointAddr; /* the address of the bulk in endpoint */ - __u8 ctl_out_endpointAddr; /* the address of the bulk in endpoint */ - __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */ - __u8 bulk_out_endpointAddr; /* the address of the bulk out endpoint */ + u8 ctl_in_endpointAddr; /* the address of the bulk in endpoint */ + u8 ctl_out_endpointAddr; /* the address of the bulk in endpoint */ + u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */ + u8 bulk_out_endpointAddr; /* the address of the bulk out endpoint */ int errors; /* the last request tanked */ int open_count; /* count the number of openers */ spinlock_t err_lock; /* lock for errors */ struct mutex io_mutex; /* synchronize I/O with disconnect */ struct urb *rcv; -/* uchar8_t rcv_msg[16]; - uchar8_t tx_msg[16];*/ - __u8 rcv_msg[16]; - __u8 tx_msg[16]; + u8 rcv_msg[16]; + u8 tx_msg[16]; kthread_t rcvthread; /* usb receive kernel thread */ struct candevice_t *candev;