diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-25 09:07:21 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-25 09:07:21 +0200 |
| commit | 94141dbd7c1450d079f695d0e8d73e93795161f2 (patch) | |
| tree | d538ee3515bfa93bfcd5c3eaaf59a6164538f806 /dev/ZKA/Modules/PS2 | |
| parent | fa6cc3970bc61e8061a279e8573a61bd4e947f2f (diff) | |
[CG/FUI] CG's FlatUI library, made for pre-boot/pre-user environements.
- FlatUI is used to install ZKA for example.
- Or to indicate an error (using the ke_stop call).
- Or to show a popup saying that system couldn't boot.
The FlatUI's style will be replicated in user space as well, for
consistency.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/Modules/PS2')
| -rw-r--r-- | dev/ZKA/Modules/PS2/PS2MouseInterface.hxx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/dev/ZKA/Modules/PS2/PS2MouseInterface.hxx b/dev/ZKA/Modules/PS2/PS2MouseInterface.hxx index 1cba256e..ec57b134 100644 --- a/dev/ZKA/Modules/PS2/PS2MouseInterface.hxx +++ b/dev/ZKA/Modules/PS2/PS2MouseInterface.hxx @@ -33,29 +33,32 @@ namespace Kernel /// @return Void Init() noexcept { - HAL::rt_cli(); - HAL::Out8(0x64, 0xA8); // enabling the auxiliary device - mouse this->Wait(); + HAL::Out8(0x64, 0x20); // tells the keyboard controller that we want to send a command to the mouse - this->WaitInput(); + + this->Wait(); UInt8 status = HAL::In8(0x60); - status |= 0b10; + status |= 0x02; - this->Wait(); HAL::Out8(0x64, 0x60); - this->Wait(); HAL::Out8(0x60, status); // setting the correct bit is the "compaq" status byte - this->Write(0xF6); - this->Read(); + HAL::Out8(0x64, 0xD4); + HAL::Out8(0x60, 0xFA); // setting the correct bit is the "compaq" status byte - this->Write(0xF4); this->Read(); - HAL::rt_sti(); + // Unmask mouse IRQ. + + // get slave PIC. + UInt8 old_pic = HAL::In8(0x21); + + // enable mosue interrupts + HAL::Out8(0x21, old_pic & (~0b00000100)); } public: |
