|
| 1 | +-------------------------------- |
| 2 | +PS/2 Mouse |
| 3 | +-------------------------------- |
| 4 | + |
| 5 | +This is a collection of PS/2 mice communication examples. |
| 6 | + |
| 7 | +For details see: |
| 8 | +http://www-ug.eecg.utoronto.ca/desl/nios_devices_SoC/datasheets/PS2%20Protocol.htm |
| 9 | +http://www-ug.eecg.utoronto.ca/desl/nios_devices_SoC/datasheets/PS2%20Mouse%20Protocol.htm |
| 10 | + |
| 11 | + |
| 12 | +ps2_mouse_host_setup_and_movement.sr |
| 13 | +------------------------------ |
| 14 | + |
| 15 | +This file contains a portion of setup from a QNX host to a trackball PS2 mouse. |
| 16 | +The mouse packets are 3 bytes long (standard mouse, no scrollwheel) |
| 17 | +The sample includes x movement, y movement, and a click. |
| 18 | + |
| 19 | + |
| 20 | +ps2_microsoft_mouse_initialize_and_move.sr |
| 21 | +------------------------------ |
| 22 | + |
| 23 | +This file contains setup and communication between a Windows host and a microsoft mouse. |
| 24 | +The host releases the clock simultaneous to pulling the data low, which makes it challenging to |
| 25 | +distinguish between "request-to-send" and a regular start-bit. |
| 26 | + |
| 27 | +Initialize a ps2 mouse, configure it; the mouse then reports movement data. |
| 28 | + |
| 29 | +- host resets device, waits for reset to complete |
| 30 | +- host sets sample rate to 200, 100, 80 - this activates reporting scroll wheel data is available |
| 31 | +- host sets device to maximum sample rate: 200; resolution=1: 2 count/mm; 1:1 scaling, stream mode |
| 32 | +- host gets device id, enable data reporting |
| 33 | +- after a delay, the mouse is moved, and reports it's changing location, in sequences of 4 bytes: |
| 34 | + - flags, x movement, y movement, z (scroll wheel) movement. |
| 35 | + - the sample data does not include any button presses or scroll wheel movement |
| 36 | + |
0 commit comments