[Voyageurs] Add a basic ps/2 keyboard driver.
This commit is contained in:
parent
7151a509ee
commit
8365d47cbe
18 changed files with 532 additions and 0 deletions
|
|
@ -15,4 +15,8 @@ glcr::ErrorCode PortClient::WriteString(glcr::String str, z_cap_t cap) {
|
|||
ZPortSend(port_cap_, str.length() + 1, str.cstr(), 1, &cap));
|
||||
}
|
||||
|
||||
glcr::ErrorCode PortClient::WriteByte(uint8_t byte) {
|
||||
return static_cast<glcr::ErrorCode>(
|
||||
ZPortSend(port_cap_, 1, &byte, 0, nullptr));
|
||||
}
|
||||
} // namespace mmth
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ class PortClient {
|
|||
|
||||
glcr::ErrorCode WriteString(glcr::String str, z_cap_t cap);
|
||||
|
||||
glcr::ErrorCode WriteByte(uint8_t byte);
|
||||
|
||||
z_cap_t cap() { return port_cap_; }
|
||||
|
||||
bool empty() { return port_cap_ == 0; }
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ namespace mmth {
|
|||
|
||||
class PortServer {
|
||||
public:
|
||||
PortServer() {}
|
||||
static glcr::ErrorOr<PortServer> Create();
|
||||
static PortServer AdoptCap(z_cap_t cap);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue