UART_HARDWARE_DRIVER structure (uart.h)

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.

Syntax

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;

Members

InitializePort

A 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.

SetBaud

A pointer to a UART_SET_BAUD callback function that sets the baud rate of the UART hardware to the specified value.

GetByte

A pointer to a UART_GET_BYTE callback function that reads a byte from the UART device.

PutByte

A pointer to a UART_PUT_BYTE callback function that writes a byte to the UART device.

RxReady

A pointer to a UART_RX_READY callback function that determines whether there is data pending in the UART hardware.

SetPowerD0

For information about Windows power states, see Device Power States

SetPowerD3

For information about Windows power states, see Device Power States

Requirements

Requirement Value
Minimum supported client Windows 10, version 1803
Header uart.h

See also

uart.h