Intel 386 User Manual
Page 560
C-11
EXAMPLE CODE HEADER FILES
#define P1_IN
0x2
#define P2_IN
0x4
#define P3_IN
0x8
#define P4_IN
0x10
#define P5_IN
0x20
#define P6_IN
0x40
#define P7_IN
0x80
#define Px_OUT
0
/* Pin configuration defines */
#define RTS1
0x1
#define SSIOTX
0
#define DTR1
0x2
#define SRXCLK
0
#define TXD1
0x4
#define DACK1
0
#define CTS1
0x8
#define EOP
0
#define CS5
0x10
#define DACK0
0
#define TIMER2
0x20
#define COPROC
0
#define REFRESH
0x40
#define CS6
0
/* Port I/O Function Definitions */
extern void Init_IOPorts
(BYTE Port1, BYTE Port2, BYTE Port3, BYTE PortDir1,
BYTE PortDir2, BYTE PortDir3, BYTE PortLtc1,
BYTE PortLtc2, BYTE PortLtc3);
/**************** Timer configuration defines ****************/
#define TMR_0
0
#define TMR_1
1
#define TMR_2
2
#define TMR0_IRQ
0 /* IRQ # Master IRQ0 */
#define TMR1_IRQ
10 /* IRQ # Slave IRQ2 */
#define TMR2_IRQ
11 /* IRQ # Slave IRQ3 */
/* Timer Modes */
#define TMR_TERMCNT
0
#define TMR_1SHOT
(1<<1)
#define TMR_RATEGEN
(2<<1)
#define TMR_SQWAVE
(3<<1)
#define TMR_SW_TRIGGER
(4<<1)
#define TMR_HW_TRIGGER
(5<<1)
/* Count Type */
#define TMR_CLK_BCD
1
#define TMR_CLK_BIN
0
/* Timer Pin Configuration */
#define TMR_CLK_INTRN
0
#define TMR_CLK_EXTRN
0x1
#define TMR_GATE_VCC
0