6 Copyright (c) 1998 Intel Corporation
24 #define SERIAL_IO_PROTOCOL \
25 { 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD} }
27 INTERFACE_DECL(_SERIAL_IO_INTERFACE
);
40 OneStopBit
, // 1 stop bit
41 OneFiveStopBits
, // 1.5 stop bits
42 TwoStopBits
// 2 stop bits
45 #define EFI_SERIAL_CLEAR_TO_SEND 0x0010 // RO
46 #define EFI_SERIAL_DATA_SET_READY 0x0020 // RO
47 #define EFI_SERIAL_RING_INDICATE 0x0040 // RO
48 #define EFI_SERIAL_CARRIER_DETECT 0x0080 // RO
49 #define EFI_SERIAL_REQUEST_TO_SEND 0x0002 // WO
50 #define EFI_SERIAL_DATA_TERMINAL_READY 0x0001 // WO
51 #define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x0100 // RO
52 #define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x0200 // RO
53 #define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x1000 // RW
54 #define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x2000 // RW
55 #define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x4000 // RW
59 (EFIAPI
*EFI_SERIAL_RESET
) (
60 IN
struct _SERIAL_IO_INTERFACE
*This
65 (EFIAPI
*EFI_SERIAL_SET_ATTRIBUTES
) (
66 IN
struct _SERIAL_IO_INTERFACE
*This
,
68 IN UINT32 ReceiveFifoDepth
,
70 IN EFI_PARITY_TYPE Parity
,
72 IN EFI_STOP_BITS_TYPE StopBits
77 (EFIAPI
*EFI_SERIAL_SET_CONTROL_BITS
) (
78 IN
struct _SERIAL_IO_INTERFACE
*This
,
84 (EFIAPI
*EFI_SERIAL_GET_CONTROL_BITS
) (
85 IN
struct _SERIAL_IO_INTERFACE
*This
,
91 (EFIAPI
*EFI_SERIAL_WRITE
) (
92 IN
struct _SERIAL_IO_INTERFACE
*This
,
93 IN OUT UINTN
*BufferSize
,
99 (EFIAPI
*EFI_SERIAL_READ
) (
100 IN
struct _SERIAL_IO_INTERFACE
*This
,
101 IN OUT UINTN
*BufferSize
,
108 // current Attributes
111 UINT32 ReceiveFifoDepth
;
117 #define SERIAL_IO_INTERFACE_REVISION 0x00010000
119 typedef struct _SERIAL_IO_INTERFACE
{
121 EFI_SERIAL_RESET Reset
;
122 EFI_SERIAL_SET_ATTRIBUTES SetAttributes
;
123 EFI_SERIAL_SET_CONTROL_BITS SetControl
;
124 EFI_SERIAL_GET_CONTROL_BITS GetControl
;
125 EFI_SERIAL_WRITE Write
;
126 EFI_SERIAL_READ Read
;
128 SERIAL_IO_MODE
*Mode
;
129 } SERIAL_IO_INTERFACE
;