TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeEmuSerialPortLib.c
Go to the documentation of this file.
1
11#include <PiDxe.h>
13#include <Library/EmuThunkLib.h>
14
26RETURN_STATUS
27EFIAPI
29 VOID
30 )
31{
32 return gEmuThunk->ConfigStdIn ();
33}
34
53EFIAPI
55 IN UINT8 *Buffer,
56 IN UINTN NumberOfBytes
57 )
58{
59 return gEmuThunk->WriteStdOut (Buffer, NumberOfBytes);
60}
61
79EFIAPI
81 OUT UINT8 *Buffer,
82 IN UINTN NumberOfBytes
83 )
84{
85 return gEmuThunk->ReadStdIn (Buffer, NumberOfBytes);
86}
87
99BOOLEAN
100EFIAPI
102 VOID
103 )
104{
105 return gEmuThunk->PollStdIn ();
106}
107
118RETURN_STATUS
119EFIAPI
121 IN UINT32 Control
122 )
123{
124 return RETURN_UNSUPPORTED;
125}
126
137RETURN_STATUS
138EFIAPI
140 OUT UINT32 *Control
141 )
142{
143 *Control = 0;
144 if (!SerialPortPoll ()) {
145 *Control = EFI_SERIAL_INPUT_BUFFER_EMPTY;
146 }
147
148 return RETURN_SUCCESS;
149}
150
184RETURN_STATUS
185EFIAPI
187 IN OUT UINT64 *BaudRate,
188 IN OUT UINT32 *ReceiveFifoDepth,
189 IN OUT UINT32 *Timeout,
190 IN OUT EFI_PARITY_TYPE *Parity,
191 IN OUT UINT8 *DataBits,
192 IN OUT EFI_STOP_BITS_TYPE *StopBits
193 )
194{
195 return RETURN_UNSUPPORTED;
196}
UINT64 UINTN
BOOLEAN EFIAPI SerialPortPoll(VOID)
RETURN_STATUS EFIAPI SerialPortSetAttributes(IN OUT UINT64 *BaudRate, IN OUT UINT32 *ReceiveFifoDepth, IN OUT UINT32 *Timeout, IN OUT EFI_PARITY_TYPE *Parity, IN OUT UINT8 *DataBits, IN OUT EFI_STOP_BITS_TYPE *StopBits)
UINTN EFIAPI SerialPortRead(OUT UINT8 *Buffer, IN UINTN NumberOfBytes)
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
RETURN_STATUS EFIAPI SerialPortSetControl(IN UINT32 Control)
RETURN_STATUS EFIAPI SerialPortGetControl(OUT UINT32 *Control)
UINTN EFIAPI SerialPortWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
#define RETURN_UNSUPPORTED
Definition: Base.h:1081
#define RETURN_SUCCESS
Definition: Base.h:1066
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STOP_BITS_TYPE
Definition: SerialIo.h:53
EFI_PARITY_TYPE
Definition: SerialIo.h:41