 |
RTEMS 7.0-rc1
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
35#ifndef __OCCAN_DRIVER_H__
36#define __OCCAN_DRIVER_H__
48 unsigned char data[8];
58 unsigned int err_warn;
59 unsigned int err_dovr;
60 unsigned int err_errp;
67 unsigned int err_arb_bitnum[32];
74 unsigned int err_bus_bit;
75 unsigned int err_bus_form;
76 unsigned int err_bus_stuff;
77 unsigned int err_bus_other;
80 unsigned int err_bus_rx;
81 unsigned int err_bus_tx;
84 unsigned int err_bus_segs[32];
95 unsigned int tx_buf_error;
98 unsigned int rx_sw_dovr;
103#define OCCAN_SEG_ID28 0x02
104#define OCCAN_SEG_ID20 0x06
105#define OCCAN_SEG_ID17 0x07
106#define OCCAN_SEG_ID12 0x0f
107#define OCCAN_SEG_ID4 0x0e
109#define OCCAN_SEG_START 0x03
110#define OCCAN_SEG_SRTR 0x04
111#define OCCAN_SEG_IDE 0x05
112#define OCCAN_SEG_RTR 0x0c
113#define OCCAN_SEG_RSV0 0x09
114#define OCCAN_SEG_RSV1 0x0d
116#define OCCAN_SEG_DLEN 0x0b
117#define OCCAN_SEG_DFIELD 0x0a
119#define OCCAN_SEG_CRC_SEQ 0x08
120#define OCCAN_SEG_CRC_DELIM 0x18
122#define OCCAN_SEG_ACK_SLOT 0x19
123#define OCCAN_SEG_ACK_DELIM 0x1b
124#define OCCAN_SEG_EOF 0x1a
125#define OCCAN_SEG_INTERMISSION 0x12
126#define OCCAN_SEG_ACT_ERR 0x11
127#define OCCAN_SEG_PASS_ERR 0x16
128#define OCCAN_SEG_DOMINANT 0x13
129#define OCCAN_SEG_EDELIM 0x17
130#define OCCAN_SEG_OVERLOAD 0x1c
133#define CANMSG_OPT_RTR 0x40
134#define CANMSG_OPT_EXTENDED 0x80
135#define CANMSG_OPT_SSHOT 0x01
137#define OCCAN_IOC_START 1
138#define OCCAN_IOC_STOP 2
140#define OCCAN_IOC_GET_CONF 3
141#define OCCAN_IOC_GET_STATS 4
142#define OCCAN_IOC_GET_STATUS 5
144#define OCCAN_IOC_SET_SPEED 6
145#define OCCAN_IOC_SPEED_AUTO 7
146#define OCCAN_IOC_SET_LINK 8
147#define OCCAN_IOC_SET_FILTER 9
148#define OCCAN_IOC_SET_BLK_MODE 10
149#define OCCAN_IOC_SET_BUFLEN 11
150#define OCCAN_IOC_SET_BTRS 12
154 unsigned char code[4];
155 unsigned char mask[4];
159#define OCCAN_STATUS_RESET 0x01
160#define OCCAN_STATUS_OVERRUN 0x02
161#define OCCAN_STATUS_WARN 0x04
162#define OCCAN_STATUS_ERR_PASSIVE 0x08
163#define OCCAN_STATUS_ERR_BUSOFF 0x10
164#define OCCAN_STATUS_QUEUE_ERROR 0x80
166#define OCCAN_BLK_MODE_RX 0x1
167#define OCCAN_BLK_MODE_TX 0x2
169void occan_register_drv (
void);
172#define OCCAN_SPEED_500K 500000
173#define OCCAN_SPEED_250K 250000
174#define OCCAN_SPEED_125K 125000
175#define OCCAN_SPEED_75K 75000
176#define OCCAN_SPEED_50K 50000
177#define OCCAN_SPEED_25K 25000
178#define OCCAN_SPEED_10K 10000