📄 extint.h
字号:
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <asm-armnommu/uaccess.h>
#include <asm-armnommu/arch-S3C44B0/hardware.h>
#include <asm-armnommu/arch-S3C44B0/irq.h>
#include <asm-armnommu/arch-S3C44B0/irqs.h>
#ifdef MODULE
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#define VPint *(volatile unsigned int *)
#define outl(data,addr)(VPint(addr)=(data))
#define inl(addr)(VPint(addr))
//#define IopCon (VPint(IOPCON)) 0605lb
//#define SET_EXTINT(n) IopCon |=(16<<(5*n)) //filter disable 0605lb
#define EXTINT_NAME "extint"
#define EXTINT_MAJOR 240
#define EXTINT_IRQ INT_EINT1 // INT_EINT4567 0611md
void extint_init(void);
static int extint_read(struct file *filp,char *buf,size_t count,loff_t *f_pos);
static int extint_write(struct file *filp,char *buf,size_t count,loff_t *f_pos);
static int extint_ioctl(struct inode *inode,struct file *filp,unsigned int cmd,unsigned long arg);
static int extint_open(struct inode *inode,struct file *filp);
static int extint_release(struct inode *inode,struct file *filp);
void extint_handle(int irq,void *dev_id,struct pt_regs *regs);
int key_read(void);
struct file_operations extint_fops={
read:extint_read,
write: extint_write,
ioctl: extint_ioctl,
open: extint_open,
release: extint_release,
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -