1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

Kernel: Convert i8042 code to use the ErrorOr pattern more broadly

Not only does it makes the code more robust and correct as it allows
error propagation, it allows us to enforce timeouts on waiting loops so
we don't hang forever, by waiting for the i8042 controller to respond to
us.

Therefore, it makes the i8042 more resilient against faulty hardware and
bad behaving chipsets out there.
This commit is contained in:
Liav A 2022-02-10 10:50:37 +02:00 committed by Idan Horowitz
parent dc41a0b830
commit 41dae9b3c7
4 changed files with 117 additions and 81 deletions

View file

@ -37,7 +37,7 @@ public:
static void initialize();
static HIDManagement& the();
void enumerate();
ErrorOr<void> enumerate();
StringView keymap_name() const { return m_character_map_name->view(); }
Keyboard::CharacterMapData const& character_map() const { return m_character_map; }