Browse Source

Fix delay of PS/2 mouse init

core
tmk 10 years ago
parent
commit
8e8d2cc53d
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      protocol/ps2_mouse.c

+ 1
- 3
protocol/ps2_mouse.c View File



ps2_host_init(); ps2_host_init();


// Not reliable: sometime fail to initialize mouse
_delay_ms(1000); // wait for powering up


// send Reset // send Reset
_delay_ms(1000); // wait for powering up
rcv = ps2_host_send(0xFF); rcv = ps2_host_send(0xFF);
print("ps2_mouse_init: send Reset: "); print("ps2_mouse_init: send Reset: ");
phex(rcv); phex(ps2_error); print("\n"); phex(rcv); phex(ps2_error); print("\n");


// read completion code of BAT // read completion code of BAT
//_delay_ms(1000); // wait for Basic Assurance Test
rcv = ps2_host_recv(); rcv = ps2_host_recv();
print("ps2_mouse_init: read BAT: "); print("ps2_mouse_init: read BAT: ");
phex(rcv); phex(ps2_error); print("\n"); phex(rcv); phex(ps2_error); print("\n");