mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
62f69cc50f
commit
ba9b3dc656
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user