-
Notifications
You must be signed in to change notification settings - Fork 1.7k
IBM PC Mouse
hasu@tmk edited this page Jun 21, 2021
·
30 revisions
Set mouse sample rate in Hz.
Param: {10d, 20d, 40d, 60d, 80d, 100d, 200d}
This command is followed by a byte indicating the resolution (0, 1, 2, 3: 1, 2, 4, 8 units per mm, respectively).
Param: {00, 01, 02, 03}
Responds with 3-byte status report.
Byte1:
Bit | Description |
---|---|
Bit 7 | 0 = Always (Reserved for future use) |
Bit 6 | 0 = Stream mode / 1 = Remote mode |
Bit 5 | 0 = Disable / 1 = Enable |
Bit 4 | 0 = Scaling 1:1 / 1 = Scaling 2:1 |
Bit 3 | 0 = Always (Reserved for future use) |
Bit 2 | 1 = Left button depressed (TrackPoint system or external device) |
Bit 1 | 1 = Middle button depressed (TrackPoint system or external device) |
Bit 0 | 1 = Right button depressed (TrackPoint system or external device) |
Byte 2: Current resolution setting (Same format as second byte of ”E8” command)
Byte 3: Current sampling rate (Same format as second byte of ”F3” command)
/* PS/2 Mouse Synopsis
* http://www.computer-engineering.org/ps2mouse/
*
* Command:
* 0xFF: Reset
* 0xF6: Set Defaults Sampling; rate=100, resolution=4cnt/mm, scaling=1:1, reporting=disabled
* 0xF5: Disable Data Reporting
* 0xF4: Enable Data Reporting
* 0xF3: Set Sample Rate
* 0xF2: Get Device ID
* 0xF0: Set Remote Mode
* 0xEB: Read Data
* 0xEA: Set Stream Mode
* 0xE9: Status Request
* 0xE8: Set Resolution
* 0xE7: Set Scaling 2:1
* 0xE6: Set Scaling 1:1
*
* Mode:
* Stream Mode: devices sends the data when it changs its state
* Remote Mode: host polls the data periodically
*
* This code uses Remote Mode and polls the data with Read Data(0xEB).
*
* Data format:
* byte|7 6 5 4 3 2 1 0
* ----+--------------------------------------------------------------
* 0|Yovflw Xovflw Ysign Xsign 1 Middle Right Left
* 1| X movement
* 2| Y movement
*/
https://www.win.tue.nl/~aeb/linux/kbd/scancodes-13.html
https://en.wikipedia.org/wiki/IntelliMouse
Logitech PS/2++ protocol