Skip to content

Commit 8b4595f

Browse files
committed
ps2: moved ps2 microsoft mouse example
- moved example of host-to-mouse configuration and mouse-to-host movement packets for a 4-byte Microsft Mouse communicating with a Windows host into ps2/mouse directory - Added README for the ps2/mouse directory, explaining the two examples
1 parent 47a477a commit 8b4595f

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

ps2/mouse/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
File renamed without changes.

0 commit comments

Comments
 (0)