2 * Header file for the Linux CAN-bus driver.
3 * Written by Arnaud Westenberg email:arnaud@wanadoo.nl
4 * This software is released under the GPL-License.
5 * Version 0.7 6 Aug 2001
10 #define __CONSTANTS_H__
12 /* Device name as it will appear in /proc/devices */
13 #define DEVICE_NAME "can"
15 /* Default driver major number, see /usr/src/linux/Documentation/devices.txt */
18 /* Timeout in jiffies before the system calls return with an error */
19 #define CANTIMEOUT (4*HZ)
21 /* Definition of the maximum number of concurrent supported hardware boards,
22 * chips per board, total number of chips, interrupts and message objects.
23 * Obviously there are no 32 different interrupts, but each chip can have its
24 * own interrupt so we have to check for it MAX_IRQ == MAX_TOT_CHIPS times.
26 #define MAX_HW_CARDS 8
27 #define MAX_HW_CHIPS 4
28 #define MAX_TOT_CHIPS (MAX_HW_CHIPS*MAX_HW_CARDS)
29 #define MAX_TOT_CHIPS_STR 32 /* must be explicit for MODULE_PARM */
31 #define MAX_MSGOBJS 15
32 #define MAX_TOT_MSGOBJS (MAX_TOT_CHIPS*MAX_MSGOBJS)
33 #define MAX_BUF_LENGTH 64
41 /* These flags can be used for the msgobj_t structure flags data entry */
43 #define BUFFERS_ALLOCATED (1<<1)
45 /* These flags can be used for the chip_t structure flags data entry */
46 #define CONFIGURED (1<<0)
47 #define SEGMENTED (1<<1)
49 /* These flags can be used for the candevices_t structure flags data entry */
50 #define PROGRAMMABLE_IRQ (1<<0)
57 /* Flags for baud_rate function */
58 #define BTR1_SAM (1<<1)