📄 iop.h
字号:
/***********************************************************************/
/* */
/* MODULE: BDTest/iop.h */
/* DATE: 98/04/03 */
/* PURPOSE: I/O port input, output and share function test Header */
/* */
/*---------------------------------------------------------------------*/
/* Copyright (C) 1997 Samsung Electronics. */
/* */
/***********************************************************************/
#ifndef _IOP_H
#define _IOP_H
#define IOPMOD_MASK 0x3ffff
#define nPORT8 8 //xIRQ0
#define nPORT9 9 //xIRQ1
#define nPORT10 10 //xIRQ2
#define nPORT11 11 //xIRQ3
#define nPORT12 12 //DREQ0
#define nPORT13 13 //DREQ1
#define nPORT14 14 //DACK0
#define nPORT15 15 //DACK1
#define nPORT16 16 //TOEN0
#define nPORT17 17 //TOEN1
/* I/O Port Control register */
#define xIRQ0_CON 0x0000000f
#define xIRQ0_ON 0x00000010
#define xIRQ0(i) ((i) & (xIRQ0_CON|xIRQ0_ON))
#define xIRQ1_CON 0x000001e0
#define xIRQ1_ON 0x00000200
#define xIRQ1(i) ((i<<5) & (xIRQ1_CON|xIRQ1_ON))
#define xIRQ2_CON 0x00003c00
#define xIRQ2_ON 0x00004000
#define xIRQ2(i) ((i<<10) & (xIRQ2_CON|xIRQ2_ON))
#define xIRQ3_CON 0x00078000
#define xIRQ3_ON 0x00080000
#define xIRQ3(i) ((i<<15) & (xIRQ3_CON|xIRQ3_ON))
#define DREQ0_CON 0x00300000
#define DREQ0_ON 0x00400000
#define DREQ1_CON 0x01800000
#define DREQ1_ON 0x02000000
#define DACK0_CON 0x04000000
#define DACK0_ON 0x08000000
#define DACK1_CON 0x10000000
#define DACK1_ON 0x20000000
#define TOEN0_ON 0x40000000
#define TOEN1_ON 0x80000000
// I/O Port Interrupt Control
#define ACT_HIGH 0x10
#define FILTER_ON 0x04
#define EDGE_RISE 0x01
#define EDGE_FALL 0x02
#define EDGE_BOTH 0x03
/* I/O port on board */
#define INVALID_KEY 0xf
#define EINT0 0xe
#define EINT1 0xd
#define EINT2 0xb
#define EINT3 0x7
#define LED_PORT 0xff
#define KEY_567 0xe0
#define KEY_PAD 0xf00
#define KEY_IN 0xe0 /* for SNDS ver1.2 key input */
#define KEY_TIME_OUT 0x10000
extern void ioptest(void);
/*
* I/O Function Test Main module
*/
extern void IoPortRw(void);
extern void IopStatus(void);
/*
* I/O port status
*/
extern void PortTestItems(void);
/*
* Port test items select menu
*/
extern void SetupIoport(void);
/*
* I/O port function test
*/
extern void ext0isr(void);
extern void ext1isr(void);
extern void ext2isr(void);
extern void ext3isr(void);
/*
* External interrupt service routine
*/
extern void ExtIntReq(int /*channel*/);
extern void SetExtIntMode(int /*channel*/);
extern void ExtIntEnable(int /*channel*/);
extern void ExtIntDisable(int /*channel*/);
extern void ExtIntAllEnable(void);
extern void ExtIntAllDisable(void);
extern void ExtIntStress(int /*channel*/);
extern int keyscan(void);
#endif /* End of _IOP_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -