2 * Header file for the Linux CAN-bus driver.
3 * Written by Arnaud Westenberg email:arnaud@wanadoo.nl
4 * Rewritten for new CAN queues by Pavel Pisa - OCERA team member
5 * email:pisa@cmp.felk.cvut.cz
6 * This software is released under the GPL-License.
7 * Version lincan-0.2 9 Jul 2003
10 #ifdef __CONSTANTS_H__
12 #define __CONSTANTS_H__
14 /* Device name as it will appear in /proc/devices */
15 #define DEVICE_NAME "can"
17 /* Default driver major number, see /usr/src/linux/Documentation/devices.txt */
20 /* Timeout in jiffies before the system calls return with an error */
21 #define CANTIMEOUT (4*HZ)
23 /* Definition of the maximum number of concurrent supported hardware boards,
24 * chips per board, total number of chips, interrupts and message objects.
25 * Obviously there are no 32 different interrupts, but each chip can have its
26 * own interrupt so we have to check for it MAX_IRQ == MAX_TOT_CHIPS times.
28 #define MAX_HW_CARDS 8
29 #define MAX_HW_CHIPS 4
30 #define MAX_TOT_CHIPS (MAX_HW_CHIPS*MAX_HW_CARDS)
31 #define MAX_TOT_CHIPS_STR 32 /* must be explicit for MODULE_PARM */
33 #define MAX_MSGOBJS 15
34 #define MAX_TOT_MSGOBJS (MAX_TOT_CHIPS*MAX_MSGOBJS)
35 #define MAX_BUF_LENGTH 64
36 //#define MAX_BUF_LENGTH 4
42 /* These flags can be used for the msgobj_t structure flags data entry */
43 #define OBJ_OPENED (1<<0)
44 #define OBJ_BUFFERS_ALLOCATED (1<<1)
45 #define OBJ_TX_REQUEST (1<<2)
46 #define OBJ_TX_LOCK (1<<3)
48 /* These flags can be used for the chip_t structure flags data entry */
49 #define CHIP_CONFIGURED (1<<0)
50 #define CHIP_SEGMENTED (1<<1)
51 #define CHIP_IRQ_SETUP (1<<2)
53 /* These flags can be used for the candevices_t structure flags data entry */
54 #define CANDEV_PROGRAMMABLE_IRQ (1<<0)
55 #define CANDEV_IO_RESERVED (1<<1)
62 /* Flags for baud_rate function */
63 #define BTR1_SAM (1<<1)