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

📄 fx469.h

📁 fx469驱动程序的源代码,运行在uClinux中,嵌入式设计
💻 H
字号:
#include  	<asm-armnommu/uaccess.h>#include 	  <linux/slab.h>#include	  <linux/errno.h>#include	 <linux/sched.h>#include   <asm-armnommu/hardware.h>#ifdef MODULE#include <linux/module.h>#include <linux/version.h>char kernel_version[]=UTS_RELEASE;#else#define MOD_INC_USE_COUNT#define MOD_DEC_USE_COUNT#endif#define	IopMod		(VPint(IOPMOD))#define	IopData		(VPint(IOPDATA))#define	SET_IOPDATA(n)		IopData |=(1<<(n))#define	CLEAR_IOPDATA(n)	IopData &=~(1<<(n))#define  FX469_WRITE_IRQ    0#define  FX469_READ_IRQ     1#define  FX469_WRITE_BIT    2       //fx469 write port#define  FX469_READ_BIT     3       //fx469 read port#define  ullong             unsigned long longDECLARE_WAIT_QUEUE_HEAD(fx469_read_queue);DECLARE_WAIT_QUEUE_HEAD(fx469_write_queue);char	set_led2=0;int   irq_count=0;ullong  *write_task_ptr;ullong  *read_task_ptr;unsigned char  fx469_read_buf[20];unsigned char  fx469_write_buf[20];int   fx469_buf_count=0;int   user_read_count=0;int   fx469_write_count=0;int   fx469_write_bit_count=0;int   fx469_read_bit_count=0;unsigned long long fx469_write_data1;   //64 bitsunsigned long long fx469_write_data2;   //64 bitsunsigned long long fx469_read_data1;   //64 bitsunsigned long long fx469_read_data2;   //64 bitsvoid init_fx469(void);static int	read_fx469(struct file *files,char *buf,size_t count,loff_t *f_pos);static int	write_fx469(struct file *files,const char *buf,size_t count,loff_t *f_pos);static int 	open_fx469(struct inode *node,struct file *files);static	int	release_fx469(struct inode *node,struct file *files);void	fx469_write_service(int irq,void *dev_id,struct pt_regs *regs);void	fx469_read_service(int irq,void *dev_id,struct pt_regs *regs);  struct file_operations  fx469_files={NULL,NULL,read_fx469,write_fx469,NULL,NULL,NULL,NULL,open_fx469,NULL,release_fx469,NULL,NULL,};/*struct file_operations  myfiles={open_mydev1,open_mydev2,open_mydev3,open_mydev4,open_mydev5,open_mydev6,open_mydev7,open_mydev8,open_mydev9,open_mydev10,open_mydev11,open_mydev12,open_mydev13,};*/

⌨️ 快捷键说明

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