⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constants.h

📁 PCM9880是一块PC/104界面的双端口隔离CAN总线通讯卡
💻 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 + -