mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[CPORTLIB]
Code formatting only. svn path=/trunk/; revision=57759
This commit is contained in:
parent
1279ab0e12
commit
c5166c1a2d
3 changed files with 120 additions and 112 deletions
|
@ -11,8 +11,8 @@
|
|||
#pragma once
|
||||
|
||||
/* Note: These definitions are the internal definitions used by Microsoft serial
|
||||
driver (see src/kernel/serial/serial.h in WDK source code). Linux uses its own, as
|
||||
do most other OS.
|
||||
driver (see src/kernel/serial/serial.h in WDK source code). Linux uses its own,
|
||||
as do most other OS.
|
||||
*/
|
||||
|
||||
#if !defined(SERIAL_REGISTER_STRIDE)
|
||||
|
|
|
@ -72,3 +72,5 @@ CpPutByte(
|
|||
IN PCPPORT Port,
|
||||
IN UCHAR Byte
|
||||
);
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -72,12 +72,11 @@ BOOLEAN
|
|||
NTAPI
|
||||
CpDoesPortExist(IN PUCHAR Address)
|
||||
{
|
||||
UCHAR Old;
|
||||
/*
|
||||
* See "Building Hardware and Firmware to Complement Microsoft Windows Headless Operation"
|
||||
* Out-of-Band Management Port Device Requirements:
|
||||
* The device must act as a 16550 or 16450 UART.
|
||||
* Windows Server 2003 will test this device using the following process.
|
||||
* Windows Server 2003 will test this device using the following process:
|
||||
* 1. Save off the current modem status register.
|
||||
* 2. Place the UART into diagnostic mode (The UART is placed into loopback mode
|
||||
* by writing SERIAL_MCR_LOOP to the modem control register).
|
||||
|
@ -91,9 +90,12 @@ CpDoesPortExist(IN PUCHAR Address)
|
|||
* This means SERIAL_MSR_RI should be set.
|
||||
* 6. Restore original modem status register.
|
||||
*/
|
||||
Old = READ_PORT_UCHAR(Address + MODEM_CONTROL_REGISTER);
|
||||
|
||||
UCHAR Old = READ_PORT_UCHAR(Address + MODEM_CONTROL_REGISTER);
|
||||
|
||||
WRITE_PORT_UCHAR(Address + MODEM_CONTROL_REGISTER, SERIAL_MCR_LOOP);
|
||||
WRITE_PORT_UCHAR(Address + MODEM_CONTROL_REGISTER, SERIAL_MCR_LOOP);
|
||||
|
||||
if (!(READ_PORT_UCHAR(Address + MODEM_STATUS_REGISTER) &
|
||||
(SERIAL_MSR_CTS | SERIAL_MSR_DSR | SERIAL_MSR_RI | SERIAL_MSR_DCD)))
|
||||
{
|
||||
|
@ -105,7 +107,9 @@ CpDoesPortExist(IN PUCHAR Address)
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_PORT_UCHAR(Address + MODEM_CONTROL_REGISTER, Old);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -225,3 +229,5 @@ CpPutByte(IN PCPPORT Port,
|
|||
/* Send the byte */
|
||||
WRITE_PORT_UCHAR(Port->Address + RECEIVE_BUFFER_REGISTER, Byte);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue