X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FSerialIo.h;h=1263dc4fe9731b285fab0a60683742290f2491ff;hp=5c69f8996e273a0c0dfe007c92def65e53b95d70;hb=344d057a2b539cf34420e2afad2351b45c65178e;hpb=ed66e1bc0d2be0a185fc47adab4930c3b7e2767f diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 5c69f8996e..1263dc4fe9 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -4,8 +4,8 @@ Abstraction of a basic serial device. Targeted at 16550 UART, but could be much more generic. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -37,7 +37,8 @@ typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL; typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE; /// -/// Serial IO Data structures +/// Parity type that is computed or checked as each character is transmitted or received. If the +/// device does not support parity, the value is the default parity value. /// typedef enum { DefaultParity, @@ -48,6 +49,9 @@ typedef enum { SpaceParity } EFI_PARITY_TYPE; +/// +/// Stop bits type +/// typedef enum { DefaultStopBits, OneStopBit, @@ -101,14 +105,14 @@ EFI_STATUS /** Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, - data buts, and stop bits on a serial device. + data bits, and stop bits on a serial device. @param This Protocol instance pointer. - @param BaudRate The requested baud rate. A BaudRate value of 0 will use the the + @param BaudRate The requested baud rate. A BaudRate value of 0 will use the device's default interface speed. @param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the serial interface. A ReceiveFifoDepth value of 0 will use - the device's dfault FIFO depth. + the device's default FIFO depth. @param Timeout The requested time out for a single character in microseconds. This timeout applies to both the transmit and receive side of the interface. A Timeout value of 0 will use the device's default time @@ -121,8 +125,9 @@ EFI_STATUS value of DefaultStopBits will use the device's default number of stop bits. - @retval EFI_SUCCESS The device was reset. - @retval EFI_DEVICE_ERROR The serial device could not be reset. + @retval EFI_SUCCESS The device was reset. + @retval EFI_INVALID_PARAMETER One or more attributes has an unsupported value. + @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. **/ typedef @@ -220,7 +225,7 @@ EFI_STATUS that produces the SERIAL_IO_PROTOCOL member functions. @param ControlMask - A mask fo the Control bits that the device supports. The device + A mask for the Control bits that the device supports. The device must always support the Input Buffer Empty control bit. @param TimeOut @@ -266,44 +271,17 @@ typedef struct { #define EFI_SERIAL_IO_PROTOCOL_REVISION 0x00010000 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION -/** - @par Protocol Description: - The Serial I/O protocol is used to communicate with UART-style serial devices. - These can be standard UART serial ports in PC-AT systems, serial ports attached - to a USB interface, or potentially any character-based I/O device. - - @param Revision - The revision to which the EFI_SERIAL_IO_PROTOCOL adheres. All future revisions - must be backwards compatible. If a future version is not back wards compatible, - it is not the same GUID. - - @param Reset - Resets the hardware device. - - @param SetAttributes - Sets communication parameters for a serial device. These include - the baud rate, receive FIFO depth, transmit/receive time out, parity, data bits, - and stop bit attributes. - - @param SetControl - Sets the control bits on a serial device. These include Request to - Send and Data Terminal Ready. - - @param GetControl - Reads the status of the control bits on a serial device. These include - Clear to Send, Data Set Ready, Ring Indicator, and Carrier Detect. - - @param Write - Sends a buffer of characters to a serial device. - - @param Read - Receives a buffer of characters from a serial device. - - @param Mode - Pointer to SERIAL_IO_MODE data. - -**/ +/// +/// The Serial I/O protocol is used to communicate with UART-style serial devices. +/// These can be standard UART serial ports in PC-AT systems, serial ports attached +/// to a USB interface, or potentially any character-based I/O device. +/// struct _EFI_SERIAL_IO_PROTOCOL { + /// + /// The revision to which the EFI_SERIAL_IO_PROTOCOL adheres. All future revisions + /// must be backwards compatible. If a future version is not backwards compatible, + /// it is not the same GUID. + /// UINT32 Revision; EFI_SERIAL_RESET Reset; EFI_SERIAL_SET_ATTRIBUTES SetAttributes; @@ -311,7 +289,9 @@ struct _EFI_SERIAL_IO_PROTOCOL { EFI_SERIAL_GET_CONTROL_BITS GetControl; EFI_SERIAL_WRITE Write; EFI_SERIAL_READ Read; - + /// + /// Pointer to SERIAL_IO_MODE data. + /// EFI_SERIAL_IO_MODE *Mode; };