当前位置: 技术问答>linux和unix
parse erro before for
来源: 互联网 发布时间:2016-05-31
本文导语: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ROW_IRQ1 IRQ_EINT0 #define ROW_IRQ2 IRQ_EINT2 #define ROW_IRQ3 IRQ_EINT11 #define R...
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ROW_IRQ1 IRQ_EINT0
#define ROW_IRQ2 IRQ_EINT2
#define ROW_IRQ3 IRQ_EINT11
#define ROW_IRQ4 IRQ_EINT19
#define rGPECON (*(volatile unsigned *)0x56000040)
#define rGPEDAT (*(volatile unsigned *)0x56000044)
#define rGPFCON (*(volatile unsigned *)0x56000050)
#define rGPFDAT (*(volatile unsigned *)0x56000054)
#define rGPGCON (*(volatile unsigned *)0x56000060)
#define rGPGDAT (*(volatile unsigned *)0x56000064)
#define DEVICE_NAME "button"
#define BUTTONMINOR 0
#define MAX_BUTTON_BUF 16
#define BUTTONSTATUS_UP 0
#define BUTTONSTATUS_DOWNX 1
#define BUTTONSTATUS_DOWN 2
//#define KEY_NUM 16;
static int buttonMajor=0;
static unsigned char buttonRead(void);
static int flag=0;
typedef struct {
unsigned int keystatus[16]; //按键状态
unsigned int keyvalue[16];
unsigned char buf[MAX_BUTTON_BUF]; //按键缓冲区
unsigned int head,tail; //按键缓冲区头和尾
wait_queue_head_t wq; //等待队列
} KEY_DEV;
static KEY_DEV keydev;
for(int i=0;i
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ROW_IRQ1 IRQ_EINT0
#define ROW_IRQ2 IRQ_EINT2
#define ROW_IRQ3 IRQ_EINT11
#define ROW_IRQ4 IRQ_EINT19
#define rGPECON (*(volatile unsigned *)0x56000040)
#define rGPEDAT (*(volatile unsigned *)0x56000044)
#define rGPFCON (*(volatile unsigned *)0x56000050)
#define rGPFDAT (*(volatile unsigned *)0x56000054)
#define rGPGCON (*(volatile unsigned *)0x56000060)
#define rGPGDAT (*(volatile unsigned *)0x56000064)
#define DEVICE_NAME "button"
#define BUTTONMINOR 0
#define MAX_BUTTON_BUF 16
#define BUTTONSTATUS_UP 0
#define BUTTONSTATUS_DOWNX 1
#define BUTTONSTATUS_DOWN 2
//#define KEY_NUM 16;
static int buttonMajor=0;
static unsigned char buttonRead(void);
static int flag=0;
typedef struct {
unsigned int keystatus[16]; //按键状态
unsigned int keyvalue[16];
unsigned char buf[MAX_BUTTON_BUF]; //按键缓冲区
unsigned int head,tail; //按键缓冲区头和尾
wait_queue_head_t wq; //等待队列
} KEY_DEV;
static KEY_DEV keydev;
for(int i=0;i