// uart.h
typedef struct _UART_HARDWARE_DRIVER {
UART_INITIALIZE_PORT InitializePort;
UART_SET_BAUD SetBaud;
UART_GET_BYTE GetByte;
UART_PUT_BYTE PutByte;
UART_RX_READY RxReady;
UART_SET_POWER_D0 SetPowerD0;
UART_SET_POWER_D3 SetPowerD3;
} UART_HARDWARE_DRIVER, *PUART_HARDWARE_DRIVER;
View the official Windows Driver Kit DDI referenceNo description available.
Contains function pointers for interacting with a specific type of UART hardware. Generally, there should be one instance of this structure for each supported hardware device. The function pointers are not expected to change at runtime.
InitializePortA pointer to a UART_INITIALIZE_PORT callback function to initialize/reset the UART hardware. This function must be called before calling any other driver functions.
SetBaudA pointer to a UART_SET_BAUD callback function that sets the baud rate of the UART hardware to the specified value.
GetByteA pointer to a UART_GET_BYTE callback function that reads a byte from the UART device.
PutByteA pointer to a UART_PUT_BYTE callback function that writes a byte to the UART device.
RxReadyA pointer to a UART_RX_READY callback function that determines whether there is data pending in the UART hardware.
SetPowerD0For information about Windows power states, see Device Power States
SetPowerD3For information about Windows power states, see Device Power States