// uart.h
UART_INITIALIZE_PORT UartInitializePort;
BOOLEAN UartInitializePort(
PCHAR LoadOptions,
[_Inout_] PCPPORT Port,
BOOLEAN MemoryMapped,
UCHAR AccessSize,
UCHAR BitWidth
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Initializes or resets the UART hardware. This callback function is called before calling any other driver functions.
LoadOptions[_In_opt_Optional _Null_terminated_] A null-terminated load option string.
Port [_Inout_]A pointer to a _CPPORT structure that is filled with information about port initialization.
MemoryMappedA boolean value that indicates whether the UART hardware is accessed through memory-mapped registers or legacy port I/O.
AccessSizeAn ACPI Generic Access Size value that indicates the type of bus access that should be performed when accessing the UART hardware.
BitWidthA number that indicates the width of the UART registers.
Returns TRUE if the port has been successfully initialized, FALSE otherwise.
//Declaration
UART_INITIALIZE_PORT UartInitializePort;
// Definition
BOOLEAN UartInitializePort
(
PCHAR LoadOptions
PCPPORT Port
BOOLEAN MemoryMapped
UCHAR AccessSize
UCHAR BitWidth
)
{...}
Register your implementation of this callback function by setting the appropriate member of UART_HARDWARE_DRIVER.