Olaf "El Blanco"
2006-01-13 11:55:16 UTC
void confrs(unsigned long Velocidad, int Paridad, int LongPalabra, int
BitsStop){
unsigned long Divisor, BAL, BAH, LCR, IER;
outportb(base+1, 0); Divisor=115200 / Velocidad ;
BAL = Divisor % 256;
BAH = Divisor / 256;
LongPalabra = (LongPalabra-5) & 3;
BitsStop = ((BitsStop-1) & 1)*4;
Paridad = (Paridad & 3)*8;
LCR = Paridad+BitsStop+LongPalabra;
IER = 3;outportb(base+3, 128);
outportb(base+0, BAL);
outportb(base+1, BAH);
outportb(base+3, (LCR & 0x7f));
outportb(base+4, 0xb);
outportb(base+1, IER);
}
BitsStop){
unsigned long Divisor, BAL, BAH, LCR, IER;
outportb(base+1, 0); Divisor=115200 / Velocidad ;
BAL = Divisor % 256;
BAH = Divisor / 256;
LongPalabra = (LongPalabra-5) & 3;
BitsStop = ((BitsStop-1) & 1)*4;
Paridad = (Paridad & 3)*8;
LCR = Paridad+BitsStop+LongPalabra;
IER = 3;outportb(base+3, 128);
outportb(base+0, BAL);
outportb(base+1, BAH);
outportb(base+3, (LCR & 0x7f));
outportb(base+4, 0xb);
outportb(base+1, IER);
}