?? constants.h
字號:
/* constants.h * Header file for the Linux CAN-bus driver. * Written by Arnaud Westenberg email:arnaud@wanadoo.nl * This software is released under the GPL-License. * Version 0.7 6 Aug 2001 */#ifdef __CONSTANTS_H__#else#define __CONSTANTS_H__/* Device name as it will appear in /proc/devices */#define DEVICE_NAME "can"/* Default driver major number, see /usr/src/linux/Documentation/devices.txt */#define CAN_MAJOR 91/* Timeout in jiffies before the system calls return with an error */#define CANTIMEOUT (4*HZ)/* Definition of the maximum number of concurrent supported hardware boards, * chips per board, total number of chips, interrupts and message objects. * Obviously there are no 32 different interrupts, but each chip can have its * own interrupt so we have to check for it MAX_IRQ == MAX_TOT_CHIPS times. */#define MAX_HW_CARDS 8#define MAX_HW_CHIPS 4#define MAX_TOT_CHIPS (MAX_HW_CHIPS*MAX_HW_CARDS)#define MAX_IRQ 32#define MAX_MSGOBJS 15#define MAX_TOT_MSGOBJS (MAX_TOT_CHIPS*MAX_MSGOBJS)#define MAX_BUF_LENGTH 64#define IE (1<<1)#define SIE (1<<2)#define EIE (1<<3)#define SPACING 0x3c0/* These flags can be used for the msgobj_t structure flags data entry */#define OPENED (1<<0)/* These flags can be used for the chip_t structure flags data entry */#define CONFIGURED (1<<0)#define SEGMENTED (1<<1)/* These flags can be used for the candevices_t structure flags data entry */#define PROGRAMMABLE_IRQ (1<<0)enum timing_BTR1 { MAX_TSEG1 = 15, MAX_TSEG2 = 7};/* Flags for baud_rate function */#define BTR1_SAM (1<<1)#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -