mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
Kernel: Re-organize the abstractions around i8042, PS2 and HID concepts
The HIDController class is removed and instead adding SerialIOController class. The HIDController class was a mistake - there's no such thing in real hardware as host controller only for human interface devices (VirtIO PCI input controller being the exception here, but it could be technically treated as serial IO controller too). Instead, we simply add a new abstraction layer - the SerialIO "bus", which will hold all the code that is related to serial communications with other devices. A PS2 controller is simply a serial IO controller, and the Intel 8042 Controller is simply a specific implementation of a PS2 controller.
This commit is contained in:
parent
a14dc9b569
commit
d276cac82c
5 changed files with 37 additions and 34 deletions
32
Kernel/Bus/SerialIO/Controller.h
Normal file
32
Kernel/Bus/SerialIO/Controller.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/AtomicRefCounted.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/IntrusiveList.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class HIDManagement;
|
||||
class SerialIOController : public AtomicRefCounted<SerialIOController> {
|
||||
friend class HIDManagement;
|
||||
|
||||
public:
|
||||
virtual ~SerialIOController() = default;
|
||||
|
||||
protected:
|
||||
SerialIOController() = default;
|
||||
|
||||
private:
|
||||
IntrusiveListNode<SerialIOController, NonnullRefPtr<SerialIOController>> m_list_node;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue