?? int0_driver.h
字號:
/*
* int0_driver.h - header file of int0 driver
*
* Author: li ming <admin@lumit.org>
* Date: 2005-6-12
* Copyleft: http://www.lumit.org
*/
#ifndef SYSCFG
#define SYSCFG 0x03FF0000
#endif
#ifndef IOPMOD
#define IOPMOD (*((volatile unsigned *)(SYSCFG+0x5000)))
#endif
#ifndef IOPCON
#define IOPCON (*((volatile unsigned *)(SYSCFG+0x5004)))
#endif
#ifndef IOPDATA
#define IOPDATA (*((volatile unsigned *)(SYSCFG+0x5008)))
#endif
// interrupt register
#ifndef INTPND
#define INTPND (*((volatile unsigned *)(SYSCFG+0x4004)))
#endif
#ifndef INTMSK
#define INTMSK (*((volatile unsigned *)(SYSCFG+0x4008)))
#endif
// INT0 mask
#define INT0_MASK (1 << 0)
typedef enum
{
INT0_ENABLE_INTERRUPT,
INT0_CLEAR_INTERRUPT,
INT0_RISING_EDGE_INTERRUPT,
INT0_FALLING_EDGE_INTERRUPT,
INT0_BOTH_EDGE_INTERRUPT,
INT0_ACTIVE_HIGH
} INT0_IOCTL_CMD ;
#define INT0_IO_ENABLE (1<<4)
#define INT0_IO_ACTIVE_HIGH (1<<3)
#define INT0_IO_RISING_EDGE (0x01)
#define INT0_IO_FALLING_EDGE (0x02)
#define INT0_IO_BOTH_EDGE (0x03)
int int0_open( void );
int int0_read( char * buf, int count );
int int0_write( char * buf, int count );
int int0_ioctl( unsigned int cmd, unsigned long arg );
int int0_release( void );
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -