improve 8042 status defines

This commit is contained in:
pantonshire committed 2024-07-22 09:37:08 +01:00
1 parent 575ab46109
commit 8e5761f610
2 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -645,7 +645,7 @@ intel_8042_wait_write:
; Read the 8042 status register.
in al, INTEL_8042_IN_STATUS
; Input buffer status flag set means the input buffer is full, so loop in this case.
test al, (1 << INTEL_8042_STATUS_IBUF)
test al, INTEL_8042_STATUS_MASK_IBUF
jnz .loop
ret
@@ -659,7 +659,7 @@ intel_8042_wait_read:
; Read the 8042 status register.
in al, INTEL_8042_IN_STATUS
; Output buffer status flag unset means output buffer is empty, so loop in this case.
test al, (1 << INTEL_8042_STATUS_OBUF)
test al, INTEL_8042_STATUS_MASK_OBUF
jz .loop
ret
+4 -2
View File
@@ -15,8 +15,10 @@
%define INTEL_8042_IN_STATUS 0x64
%define INTEL_8042_OUT_CMD 0x64
%define INTEL_8042_STATUS_OBUF 0
%define INTEL_8042_STATUS_IBUF 1
%define INTEL_8042_STATUS_BIT_OBUF 0
%define INTEL_8042_STATUS_BIT_IBUF 1
%define INTEL_8042_STATUS_MASK_OBUF (1 << INTEL_8042_STATUS_BIT_OBUF)
%define INTEL_8042_STATUS_MASK_IBUF (1 << INTEL_8042_STATUS_BIT_IBUF)
%define INTEL_8042_CMD_PS2_1_DISABLE 0xad
%define INTEL_8042_CMD_PS2_1_ENABLE 0xae