📄 makefile.txt
字号:
/*******************************************************************************************
#define CS_AD S3C2410_GPF4
#define CLK_AD S3C2410_GPF5
#define INDATA_AD S3C2410_GPF6
#define OUTDATA_AD S3C2410_GPF0
//#define EOC_AD S3C2410_GPF8
#define CS_AD_CONFIG S3C2410_GPF4_OUTP
#define CLK_AD_CONFIG S3C2410_GPF5_OUTP
#define INDATA_AD_CONFIG S3C2410_GPF6_OUTP
#define OUTDATA_AD_CONFIG S3C2410_GPF0_INP
//#define EOC_AD_CONFIG S3C2410_GPF8_INP
#define AD_IOC_MAGIC 'k'
#define CS_ON _IO(AD_IOC_MAGIC,0)
#define CS_OFF _IO(AD_IOC_MAGIC,1)
#define CLK_ON _IO(AD_IOC_MAGIC,2)
#define CLK_OFF _IO(AD_IOC_MAGIC,3)
#define INDATA_ON _IO(AD_IOC_MAGIC,4)
#define INDATA_OFF _IO(AD_IOC_MAGIC,5)
int ad_open (struct inode *inode,struct file *filp)
int ad_read(struct file *fp,char * buf, size_t size,loff_t * offt)
int ad_release (struct inode *inode,struct file *filp)
static int ad_ioctl(struct inode *inode,struct file *file, unsigned int cmd,unsigned long arg)
struct file_operations ad_fops ={
.owner = THIS_MODULE,
.open = ad_open,
.read = ad_read,
.ioctl = ad_ioctl,
.release = ad_release,
};
static int __init ad_init(void)
static void __exit ad_exit(void)
module_init(ad_init);
module_exit(ad_exit);
************************************************************************************************************/
CC = arm-linux-gcc
HOSTCC = gcc
KERNELDIR = /usr/src/linux-2.6.8.1-zzm
PWD := $(shell pwd)
export CC HOSTCC
obj-m := tlc2543.o
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.ko *.o
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -