mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel: Implement a PCI Serial Device driver
This simple driver simply finds a device in a device definitions list and then sets up a SerialDevice instance based on the definition. The driver currently only supports "WCH CH382 2S" pci serial boards, as that is the only device available for me to test with, but most other pci serial devices should be as easily addable as adding a board_definitions entry.
This commit is contained in:
parent
62f69cc50f
commit
ba9b3dc656
7 changed files with 99 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <AK/PrintfImplementation.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/ConsoleDevice.h>
|
||||
#include <Kernel/Devices/PCISerialDevice.h>
|
||||
#include <Kernel/Graphics/Console/Console.h>
|
||||
#include <Kernel/Graphics/GraphicsManagement.h>
|
||||
#include <Kernel/IO.h>
|
||||
|
@ -34,6 +35,9 @@ int get_serial_debug()
|
|||
|
||||
static void serial_putch(char ch)
|
||||
{
|
||||
if (PCISerialDevice::is_available())
|
||||
return PCISerialDevice::the().put_char(ch);
|
||||
|
||||
static bool serial_ready = false;
|
||||
static bool was_cr = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue