📄 config.h
字号:
/*********************************************
* *
*********************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
//This segment should not be modified
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef __KERNEL__
#define __KERNEL__
#endif
#ifndef MODULE
#define MODULE
#endif
#include <linux/config.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
#ifdef CONFIG_SMP
#define __SMP__
#endif
#include <linux/config.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/devfs_fs_kernel.h>
//
#include <linux/errno.h> /* error codes */
#include <linux/miscdevice.h>
#include <linux/wait.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/uaccess.h>
#include <asm/arch/regs-gpio.h>
typedef u8 uint8; /* defined for unsigned 8-bits integer variable 无符号8位整型变量 */
typedef s8 int8; /* defined for signed 8-bits integer variable 有符号8位整型变量 */
typedef u16 uint16; /* defined for unsigned 16-bits integer variable 无符号16位整型变量 */
typedef s16 int16; /* defined for signed 16-bits integer variable 有符号16位整型变量 */
typedef u32 uint32; /* defined for unsigned 32-bits integer variable 无符号32位整型变量 */
typedef s32 int32; /* defined for signed 32-bits integer variable 有符号32位整型变量 */
typedef float fp32; /* single precision floating point variable (32bits) 单精度浮点数(32位长度) */
typedef double fp64; /* double precision floating point variable (64bits) 双精度浮点数(64位长度) */
/********************************/
/*Application Program Configurations*/
/* 应用程序配置 */
/********************************/
//This segment could be modified as needed.
//以下根据需要改动
#include "SJA1000.h"
#define CAN_MAJOR_NR 251 //CAN控制器主设备号定义为251
#define DEVICE_NAME "SJA1000_CAN" //CAN控制器设备名
#endif
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -