Serial_io.read() – Intel Extensible Firmware Interface User Manual

Page 359

Advertising
background image

Protocols

— Console Support

Version 1.10

12/01/02

10-65

SERIAL_IO.Read()

Summary

Reads data from a serial device.

Prototype

EFI_STATUS

(EFIAPI *EFI_SERIAL_READ) (

IN

SERIAL_IO_INTERFACE

*This,

IN OUT UINTN

*BufferSize,

OUT

VOID

*Buffer

);

Parameters

This

A pointer to the

SERIAL_IO_INTERFACE

instance. Type

SERIAL_IO_INTERFACE

is defined in Section 10.12.

BufferSize

On input, the size of the

Buffer

. On output, the amount of

data returned in

Buffer

.

Buffer

The buffer to return the data into.

Description

The

Read()

function reads a specified number of bytes from a serial device. If a time out error or

an overrun error is detected while data is being read from the serial device, then no more characters
will be read, and an error will be returned. In all cases the number of bytes actually read is returned
in

BufferSize

.

Status Codes Returned

EFI_SUCCESS

The data was read.

EFI_DEVICE_ERROR

The serial device reported an error.

EFI_TIMEOUT

The operation was stopped due to a timeout or overrun.

Advertising