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(); }
VOID NTAPI READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Buffer, ULONG Count) { while(Count--) { *Buffer++ = GetPhysByte((ULONG)Port); } }
inline char recv(char *serport) { char c; while( !chr(serport) ) sync(); c = GetPhysByte((paddr_t)serport+RCV); sync(); return c; }
void IntEnable() { SetPhysByte((paddr_t)serport+IER, GetPhysByte((paddr_t)serport+IER) | 1); }
inline int chr(char *serport) { sync(); return GetPhysByte((paddr_t)serport+LSR) & 1; }
inline int rdy(char *serport) { sync(); return (GetPhysByte((paddr_t)serport+LSR) & 0x20); }