Esempio n. 1
0
inline void send(char *serport, char c) {
	/* Wait for Clear to Send */
    while( !(GetPhysByte((paddr_t)serport+LSR) & 0x20) ) sync();

    SetPhysByte((paddr_t)serport+THR, c);
    sync();
}
Esempio n. 2
0
VOID NTAPI
READ_PORT_BUFFER_UCHAR (PUCHAR Port,
                        PUCHAR Buffer,
                        ULONG Count)
{
    while(Count--) { *Buffer++ = GetPhysByte((ULONG)Port); }
}
Esempio n. 3
0
inline char recv(char *serport) {
    char c;

    while( !chr(serport) ) sync();

    c = GetPhysByte((paddr_t)serport+RCV);
    sync();

    return c;
}
Esempio n. 4
0
void IntEnable()
{
    SetPhysByte((paddr_t)serport+IER, GetPhysByte((paddr_t)serport+IER) | 1);
}
Esempio n. 5
0
inline int chr(char *serport)
{
    sync();
    return GetPhysByte((paddr_t)serport+LSR) & 1;
}
Esempio n. 6
0
inline int rdy(char *serport)
{
    sync();
    return (GetPhysByte((paddr_t)serport+LSR) & 0x20);
}