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

📄 pcan_common.h

📁 CAN 驱动编程
💻 H
字号:
#ifndef __PCAN_COMMON_H__#define __PCAN_COMMON_H__//****************************************************************************// Copyright (C) 2001,2002,2003  PEAK System-Technik GmbH//// linux@peak-system.com// www.peak-system.com//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.//// Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de)//****************************************************************************//****************************************************************************//// global defines to include in all files this module is made of// ! this must always the 1st include in all files !//// $Log: pcan_common.h,v $// Revision 1.10  2003/03/02 10:58:07  klaus// merged USB thread into main path//// Revision 1.9  2003/03/02 10:58:07  klaus// merged USB thread into main path//// Revision 1.8.2.4  2003/01/29 20:34:20  klaus// release_20030129_a and release_20030129_u released//// Revision 1.8.2.3  2003/01/29 20:34:19  klaus// release_20030129_a and release_20030129_u released//// Revision 1.8.2.2  2003/01/28 23:28:26  klaus// reorderd pcan_usb.c and pcan_usb_kernel.c, tidied up//// Revision 1.8.2.1  2003/01/07 22:28:50  klaus// header file dependency check inserted////****************************************************************************//****************************************************************************// DEFINES#ifndef __KERNEL__#define __KERNEL__#endif#ifndef MODULE#define MODULE#endif// support for MODVERSIONS#include <linux/autoconf.h>#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)#define MODVERSIONS#endif#ifdef MODVERSIONS#include <linux/modversions.h>#endif// support for PARPORT_SUBSYSTEM#if !defined(CONFIG_PARPORT_MODULE) && !defined(CONFIG_PARPORT) && defined(PARPORT_SUBSYSTEM)#undef PARPORT_SUBSYSTEM#endif// support for USB#if !defined(CONFIG_USB_MODULE) && !defined(CONFIG_USB) && defined(USB_SUPPORT)#undef USB_SUPPORT#endif// support only versions 2.2.x and 2.4.x#include <linux/version.h>  // if this file is not found: please look @ /boot/vmlinuz.version.h#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)  #error "This kernel is too old and not supported"#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)  #define LINUX_22 // LINUX 2.2.x#else    #define LINUX_24 // > LINUX 2.4.x#endif// switch to disable all printks for not debugging#ifdef DEBUG#define DPRINTK printk#else#define DPRINTK(stuff...)#endif#endif // __PCAN_COMMON_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -