class InputReceiver
Defined at line 26 of file ../../src/firmware/gigaboot/cpp/input.h
Wrapper class around console and serial input operations.
Restores configurable attributes, e.g. serial poll frequency, cursor position,
on destruction.
Public Methods
void InputReceiver (efi_system_table * sys)
Defined at line 28 of file ../../src/firmware/gigaboot/cpp/input.h
efi_system_table * system_table ()
Defined at line 42 of file ../../src/firmware/gigaboot/cpp/input.h
std::optional<char> GetKeyPrompt (std::string_view valid_keys, zx::duration timeout, std::string_view prompt)
Given a collection of valid characters, a timeout, and an optional prompt string,
return the first valid key pressed before the timeout expired,
or std::nullopt if no valid key was pressed before the end of the timeout.
If the prompt string is not empty, it is printed once every second with a countdown
of the remaining timeout in seconds.
Defined at line 160 of file ../../src/firmware/gigaboot/cpp/input.cc
std::optional<char> GetKeyPrompt (std::string_view valid_keys, zx::duration timeout, std::string_view prompt)
Given a collection of valid characters, a timeout, and an optional prompt string,
return the first valid key pressed before the timeout expired,
or std::nullopt if no valid key was pressed before the end of the timeout.
If the prompt string is not empty, it is printed once every second with a countdown
of the remaining timeout in seconds.
Defined at line 160 of file ../../src/firmware/gigaboot/cpp/input.cc
fit::result<efi_status, char> GetKey (zx::duration timeout)
Get the next key pressed within the timeout period, or an error.
Defined at line 129 of file ../../src/firmware/gigaboot/cpp/input.cc
Friends
class InputReceiverTest