[Voyageurs] Add a basic ps/2 keyboard driver.

This commit is contained in:
Drew Galbraith 2023-11-25 13:08:30 -08:00
parent 7151a509ee
commit 8365d47cbe
18 changed files with 532 additions and 0 deletions

View file

@ -0,0 +1,27 @@
#include <mammoth/util/debug.h>
#include <mammoth/util/init.h>
#include "keyboard/keyboard_driver.h"
#include "voyageurs_server.h"
uint64_t main(uint64_t init_port) {
ParseInitPort(init_port);
dbgln("Initializing PS/2 Driver.");
KeyboardDriver driver;
dbgln("Starting PS/2 Thread.");
Thread keyboard_thread = driver.StartInterruptLoop();
dbgln("Starting voyaguers server.");
ASSIGN_OR_RETURN(glcr::UniquePtr<VoyageursServer> server,
VoyageursServer::Create(driver));
Thread server_thread = server->RunServer();
check(server_thread.Join());
check(keyboard_thread.Join());
return glcr::OK;
}