mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
Kernel: Apply changes to use LibBareMetal definitions
This commit is contained in:
parent
7c507c27bf
commit
e559af2008
Notes:
sideshowbarker
2024-07-19 09:30:34 +09:00
Author: https://github.com/supercomputer7
Commit: e559af2008
Pull-request: https://github.com/SerenityOS/serenity/pull/1194
43 changed files with 84 additions and 892 deletions
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <Kernel/Devices/SerialDevice.h>
|
||||
#include <Kernel/IO.h>
|
||||
#include <LibBareMetal/IO.h>
|
||||
|
||||
SerialDevice::SerialDevice(int base_addr, unsigned minor)
|
||||
: CharacterDevice(4, minor)
|
||||
|
@ -95,8 +95,8 @@ void SerialDevice::set_baud(Baud baud)
|
|||
m_baud = baud;
|
||||
|
||||
IO::out8(m_base_addr + 3, IO::in8(m_base_addr + 3) | 0x80); // turn on DLAB
|
||||
IO::out8(m_base_addr + 0, ((char)(baud)) >> 2); // lower half of divisor
|
||||
IO::out8(m_base_addr + 1, ((char)(baud)) & 0xff); // upper half of divisor
|
||||
IO::out8(m_base_addr + 0, ((char)(baud)) >> 2); // lower half of divisor
|
||||
IO::out8(m_base_addr + 1, ((char)(baud)) & 0xff); // upper half of divisor
|
||||
IO::out8(m_base_addr + 3, IO::in8(m_base_addr + 3) & 0x7f); // turn off DLAB
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue