Changeset 4b44099d in mainline for kernel/genarch/src/kbd/i8042.c
- Timestamp:
- 2009-02-19T19:54:02Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7d60cf5
- Parents:
- c852b948
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/kbd/i8042.c
rc852b948 r4b44099d 42 42 #include <genarch/kbd/scanc.h> 43 43 #include <genarch/kbd/scanc_pc.h> 44 #include <arch/drivers/i8042.h>45 44 #include <cpu.h> 46 45 #include <arch/asm.h> … … 51 50 #include <sysinfo/sysinfo.h> 52 51 #include <ipc/irq.h> 52 53 #define i8042_DATA 0x60 54 #define i8042_STATUS 0x64 53 55 54 56 /* Keyboard commands. */ … … 137 139 uint8_t status; 138 140 139 while (((status = i8042_status_read()) & i8042_BUFFER_FULL_MASK)) { 140 data = i8042_data_read(); 141 while (((status = pio_read_8(i8042_STATUS)) & 142 i8042_BUFFER_FULL_MASK)) { 143 data = pio_read_8(i8042_DATA); 141 144 142 145 if ((status & i8042_MOUSE_DATA)) … … 152 155 153 156 /** Initialize i8042. */ 154 void i8042_init(devno_t kbd_devno, inr_t kbd_inr, devno_t mouse_devno, inr_t mouse_inr) 157 void 158 i8042_init(devno_t kbd_devno, inr_t kbd_inr, devno_t mouse_devno, 159 inr_t mouse_inr) 155 160 { 156 161 chardev_initialize("i8042_kbd", &kbrd, &ops); … … 179 184 */ 180 185 int i; 181 for (i = 0; (i8042_status_read() & i8042_BUFFER_FULL_MASK) && i < 100; i++) { 182 i8042_data_read(); 186 for (i = 0; (pio_read_8(i8042_STATUS) & i8042_BUFFER_FULL_MASK) && 187 i < 100; i++) { 188 (void) pio_read_8(i8042_DATA); 183 189 } 184 190 … … 213 219 uint8_t x; 214 220 215 while (!(i8042_status_read() & i8042_BUFFER_FULL_MASK)); 221 while (!(pio_read_8(i8042_STATUS) & i8042_BUFFER_FULL_MASK)) 222 ; 216 223 217 x = i8042_data_read();224 x = pio_read_8(i8042_STATUS); 218 225 if (x & KEY_RELEASE) 219 226 key_released(x ^ KEY_RELEASE);
Note:
See TracChangeset
for help on using the changeset viewer.