-/* STATIC FUNCTIONS *********************************************************/
-
-static BOOLEAN Rs232DoesComPortExist(PUCHAR BaseAddress)
-{
- BOOLEAN found;
- UCHAR mcr;
- UCHAR msr;
-
- found = FALSE;
-
- /* save Modem Control Register (MCR) */
- mcr = READ_PORT_UCHAR (SER_MCR(BaseAddress));
-
- /* enable loop mode (set Bit 4 of the MCR) */
- WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
-
- /* clear all modem output bits */
- WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
-
- /* read the Modem Status Register */
- msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
-
- /*
- * the upper nibble of the MSR (modem output bits) must be
- * equal to the lower nibble of the MCR (modem input bits)
- */
- if ((msr & 0xF0) == 0x00)
- {
- /* set all modem output bits */
- WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x1F);
-
- /* read the Modem Status Register */
- msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
-
- /*
- * the upper nibble of the MSR (modem output bits) must be
- * equal to the lower nibble of the MCR (modem input bits)
- */
- if ((msr & 0xF0) == 0xF0)
- found = TRUE;
- }
-
- /* restore MCR */
- WRITE_PORT_UCHAR (SER_MCR(BaseAddress), mcr);
-
- return (found);
-}