AX10445 Module Series User's Manual
static char
comm_para=0xe3;
static int
Is_RS485=0;
/ * prototpye delcarations */
void interrupt far CH1_ISR();
void interrupt far CH2_ISR();
/* routine : initial UART, 8259, PC */
void COM_INIT(intch)
{
unsigned pa;
unsigned mask;
unsigned intno;
if (ch= =1) {
pa = CH1_PA;
mask = CH1_MASK;
intno = CH1_INTNO;
}
else if (ch= =2) {
pa = CH2_PA;
mask = CH2_MASK;
intno = CH2_INTNO;
}
disable();
/* disable interrupt,RTS and DTR */
outportb(pa+MCR,0);
/* disable Interrupt Enable Register */
outportb(pa+IER,0);
/* see library function call */
bioscom(0,comm_para,ch-1);
/* clear intr flag */
inportb(pa+IIR);
inportb(pa);
/* redirect interrupt vector */
if (ch= =1)
{
oldch1 = getvect(intno);
setvect(intno,CH1_ISR);
28
/* 9600,N,8,1 */
Application
Need help?
Do you have a question about the AX10445 Series and is the answer not in the manual?
Questions and answers