mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37: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:
parent
dc41a0b830
commit
41dae9b3c7
4 changed files with 117 additions and 81 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue