ps2: Unify constant names
Move ps2.hh to dev/ps2/types.hh and update the device models to consistently use well-known constants from this header. Change-Id: Iadfdc774495957beb82f3d341107b1e9232ffd4c Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/9770 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -50,7 +50,6 @@ Source('intel_8254_timer.cc')
|
||||
Source('mc146818.cc')
|
||||
Source('pixelpump.cc')
|
||||
Source('platform.cc')
|
||||
Source('ps2.cc')
|
||||
|
||||
DebugFlag('Intel8254Timer')
|
||||
DebugFlag('MC146818')
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "base/vnc/vncinput.hh"
|
||||
#include "debug/Pl050.hh"
|
||||
#include "dev/arm/amba_device.hh"
|
||||
#include "dev/ps2.hh"
|
||||
#include "dev/ps2/device.hh"
|
||||
#include "mem/packet.hh"
|
||||
#include "mem/packet_access.hh"
|
||||
|
||||
@@ -47,5 +47,6 @@ Source('device.cc')
|
||||
Source('keyboard.cc')
|
||||
Source('mouse.cc')
|
||||
Source('touchkit.cc')
|
||||
Source('types.cc')
|
||||
|
||||
DebugFlag('PS2')
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "base/logging.hh"
|
||||
#include "debug/PS2.hh"
|
||||
#include "dev/ps2.hh"
|
||||
#include "dev/ps2/types.hh"
|
||||
#include "params/PS2Device.hh"
|
||||
|
||||
PS2Device::PS2Device(const PS2DeviceParams *p)
|
||||
|
||||
@@ -45,11 +45,9 @@
|
||||
|
||||
#include "base/logging.hh"
|
||||
#include "debug/PS2.hh"
|
||||
#include "dev/ps2.hh"
|
||||
#include "dev/ps2/types.hh"
|
||||
#include "params/PS2Keyboard.hh"
|
||||
|
||||
const uint8_t PS2Keyboard::ID[] = {0xab, 0x83};
|
||||
|
||||
PS2Keyboard::PS2Keyboard(const PS2KeyboardParams *p)
|
||||
: PS2Device(p),
|
||||
shiftDown(false),
|
||||
@@ -79,7 +77,36 @@ bool
|
||||
PS2Keyboard::recv(const std::vector<uint8_t> &data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case LEDWrite:
|
||||
case Ps2::ReadID:
|
||||
DPRINTF(PS2, "Got keyboard read ID command.\n");
|
||||
sendAck();
|
||||
send(Ps2::Keyboard::ID);
|
||||
return true;
|
||||
case Ps2::Enable:
|
||||
DPRINTF(PS2, "Enabling the keyboard.\n");
|
||||
enabled = true;
|
||||
sendAck();
|
||||
return true;
|
||||
case Ps2::Disable:
|
||||
DPRINTF(PS2, "Disabling the keyboard.\n");
|
||||
enabled = false;
|
||||
sendAck();
|
||||
return true;
|
||||
case Ps2::DefaultsAndDisable:
|
||||
DPRINTF(PS2, "Disabling and resetting the keyboard.\n");
|
||||
enabled = false;
|
||||
sendAck();
|
||||
return true;
|
||||
case Ps2::Reset:
|
||||
DPRINTF(PS2, "Resetting keyboard.\n");
|
||||
enabled = true;
|
||||
sendAck();
|
||||
send(Ps2::SelfTestPass);
|
||||
return true;
|
||||
case Ps2::Resend:
|
||||
panic("Keyboard resend unimplemented.\n");
|
||||
|
||||
case Ps2::Keyboard::LEDWrite:
|
||||
if (data.size() == 1) {
|
||||
DPRINTF(PS2, "Got LED write command.\n");
|
||||
sendAck();
|
||||
@@ -93,16 +120,11 @@ PS2Keyboard::recv(const std::vector<uint8_t> &data)
|
||||
sendAck();
|
||||
return true;
|
||||
}
|
||||
case DiagnosticEcho:
|
||||
case Ps2::Keyboard::DiagnosticEcho:
|
||||
panic("Keyboard diagnostic echo unimplemented.\n");
|
||||
case AlternateScanCodes:
|
||||
case Ps2::Keyboard::AlternateScanCodes:
|
||||
panic("Accessing alternate scan codes unimplemented.\n");
|
||||
case ReadID:
|
||||
DPRINTF(PS2, "Got keyboard read ID command.\n");
|
||||
sendAck();
|
||||
send((uint8_t *)&ID, sizeof(ID));
|
||||
return true;
|
||||
case TypematicInfo:
|
||||
case Ps2::Keyboard::TypematicInfo:
|
||||
if (data.size() == 1) {
|
||||
DPRINTF(PS2, "Setting typematic info.\n");
|
||||
sendAck();
|
||||
@@ -112,44 +134,21 @@ PS2Keyboard::recv(const std::vector<uint8_t> &data)
|
||||
sendAck();
|
||||
return true;
|
||||
}
|
||||
case Enable:
|
||||
DPRINTF(PS2, "Enabling the keyboard.\n");
|
||||
enabled = true;
|
||||
sendAck();
|
||||
return true;
|
||||
case Disable:
|
||||
DPRINTF(PS2, "Disabling the keyboard.\n");
|
||||
enabled = false;
|
||||
sendAck();
|
||||
return true;
|
||||
case DefaultsAndDisable:
|
||||
DPRINTF(PS2, "Disabling and resetting the keyboard.\n");
|
||||
enabled = false;
|
||||
sendAck();
|
||||
return true;
|
||||
case Reset:
|
||||
DPRINTF(PS2, "Resetting keyboard.\n");
|
||||
sendAck();
|
||||
enabled = true;
|
||||
send(Ps2::SelfTestPass);
|
||||
return true;
|
||||
case AllKeysToTypematic:
|
||||
case Ps2::Keyboard::AllKeysToTypematic:
|
||||
panic("Setting all keys to typemantic unimplemented.\n");
|
||||
case AllKeysToMakeRelease:
|
||||
case Ps2::Keyboard::AllKeysToMakeRelease:
|
||||
panic("Setting all keys to make/release unimplemented.\n");
|
||||
case AllKeysToMake:
|
||||
case Ps2::Keyboard::AllKeysToMake:
|
||||
panic("Setting all keys to make unimplemented.\n");
|
||||
case AllKeysToTypematicMakeRelease:
|
||||
case Ps2::Keyboard::AllKeysToTypematicMakeRelease:
|
||||
panic("Setting all keys to "
|
||||
"typematic/make/release unimplemented.\n");
|
||||
case KeyToTypematic:
|
||||
case Ps2::Keyboard::KeyToTypematic:
|
||||
panic("Setting a key to typematic unimplemented.\n");
|
||||
case KeyToMakeRelease:
|
||||
case Ps2::Keyboard::KeyToMakeRelease:
|
||||
panic("Setting a key to make/release unimplemented.\n");
|
||||
case KeyToMakeOnly:
|
||||
case Ps2::Keyboard::KeyToMakeOnly:
|
||||
panic("Setting key to make only unimplemented.\n");
|
||||
case Resend:
|
||||
panic("Keyboard resend unimplemented.\n");
|
||||
default:
|
||||
panic("Unknown keyboard command %#02x.\n", data[0]);
|
||||
}
|
||||
|
||||
@@ -52,30 +52,6 @@ struct PS2KeyboardParams;
|
||||
class PS2Keyboard : public PS2Device, VncKeyboard
|
||||
{
|
||||
protected:
|
||||
static const uint8_t ID[];
|
||||
|
||||
enum Command
|
||||
{
|
||||
LEDWrite = 0xED,
|
||||
DiagnosticEcho = 0xEE,
|
||||
AlternateScanCodes = 0xF0,
|
||||
ReadID = 0xF2,
|
||||
TypematicInfo = 0xF3,
|
||||
Enable = 0xF4,
|
||||
Disable = 0xF5,
|
||||
DefaultsAndDisable = 0xF6,
|
||||
AllKeysToTypematic = 0xF7,
|
||||
AllKeysToMakeRelease = 0xF8,
|
||||
AllKeysToMake = 0xF9,
|
||||
AllKeysToTypematicMakeRelease = 0xFA,
|
||||
KeyToTypematic = 0xFB,
|
||||
KeyToMakeRelease = 0xFC,
|
||||
KeyToMakeOnly = 0xFD,
|
||||
Resend = 0xFE,
|
||||
Reset = 0xFF
|
||||
};
|
||||
|
||||
|
||||
/** is the shift key currently down */
|
||||
bool shiftDown;
|
||||
|
||||
|
||||
@@ -45,11 +45,9 @@
|
||||
|
||||
#include "base/logging.hh"
|
||||
#include "debug/PS2.hh"
|
||||
#include "dev/ps2/types.hh"
|
||||
#include "params/PS2Mouse.hh"
|
||||
|
||||
const uint8_t PS2Mouse::ID[] = {0x00};
|
||||
const uint8_t BatSuccessful = 0xaa;
|
||||
|
||||
PS2Mouse::PS2Mouse(const PS2MouseParams *p)
|
||||
: PS2Device(p),
|
||||
status(0), resolution(4), sampleRate(100)
|
||||
@@ -60,17 +58,45 @@ bool
|
||||
PS2Mouse::recv(const std::vector<uint8_t> &data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case Scale1to1:
|
||||
case Ps2::ReadID:
|
||||
DPRINTF(PS2, "Mouse ID requested.\n");
|
||||
sendAck();
|
||||
send(Ps2::Mouse::ID);
|
||||
return true;
|
||||
case Ps2::Disable:
|
||||
DPRINTF(PS2, "Disabling data reporting.\n");
|
||||
status.enabled = 0;
|
||||
sendAck();
|
||||
return true;
|
||||
case Ps2::Enable:
|
||||
DPRINTF(PS2, "Enabling data reporting.\n");
|
||||
status.enabled = 1;
|
||||
sendAck();
|
||||
return true;
|
||||
case Ps2::Resend:
|
||||
panic("Mouse resend unimplemented.\n");
|
||||
case Ps2::Reset:
|
||||
DPRINTF(PS2, "Resetting the mouse.\n");
|
||||
sampleRate = 100;
|
||||
resolution = 4;
|
||||
status.twoToOne = 0;
|
||||
status.enabled = 0;
|
||||
sendAck();
|
||||
send(Ps2::SelfTestPass);
|
||||
send(Ps2::Mouse::ID);
|
||||
return true;
|
||||
|
||||
case Ps2::Mouse::Scale1to1:
|
||||
DPRINTF(PS2, "Setting mouse scale to 1:1.\n");
|
||||
status.twoToOne = 0;
|
||||
sendAck();
|
||||
return true;
|
||||
case Scale2to1:
|
||||
case Ps2::Mouse::Scale2to1:
|
||||
DPRINTF(PS2, "Setting mouse scale to 2:1.\n");
|
||||
status.twoToOne = 1;
|
||||
sendAck();
|
||||
return true;
|
||||
case SetResolution:
|
||||
case Ps2::Mouse::SetResolution:
|
||||
if (data.size() == 1) {
|
||||
DPRINTF(PS2, "Setting mouse resolution.\n");
|
||||
sendAck();
|
||||
@@ -81,27 +107,22 @@ PS2Mouse::recv(const std::vector<uint8_t> &data)
|
||||
sendAck();
|
||||
return true;
|
||||
}
|
||||
case GetStatus:
|
||||
case Ps2::Mouse::GetStatus:
|
||||
DPRINTF(PS2, "Getting mouse status.\n");
|
||||
sendAck();
|
||||
send((uint8_t *)&(status), 1);
|
||||
send(&resolution, sizeof(resolution));
|
||||
send(&sampleRate, sizeof(sampleRate));
|
||||
return true;
|
||||
case ReadData:
|
||||
case Ps2::Mouse::ReadData:
|
||||
panic("Reading mouse data unimplemented.\n");
|
||||
case ResetWrapMode:
|
||||
case Ps2::Mouse::ResetWrapMode:
|
||||
panic("Resetting mouse wrap mode unimplemented.\n");
|
||||
case WrapMode:
|
||||
case Ps2::Mouse::WrapMode:
|
||||
panic("Setting mouse wrap mode unimplemented.\n");
|
||||
case RemoteMode:
|
||||
case Ps2::Mouse::RemoteMode:
|
||||
panic("Setting mouse remote mode unimplemented.\n");
|
||||
case ReadID:
|
||||
DPRINTF(PS2, "Mouse ID requested.\n");
|
||||
sendAck();
|
||||
send(ID, sizeof(ID));
|
||||
return true;
|
||||
case SampleRate:
|
||||
case Ps2::Mouse::SampleRate:
|
||||
if (data.size() == 1) {
|
||||
DPRINTF(PS2, "Setting mouse sample rate.\n");
|
||||
sendAck();
|
||||
@@ -113,17 +134,7 @@ PS2Mouse::recv(const std::vector<uint8_t> &data)
|
||||
sendAck();
|
||||
return true;
|
||||
}
|
||||
case DisableReporting:
|
||||
DPRINTF(PS2, "Disabling data reporting.\n");
|
||||
status.enabled = 0;
|
||||
sendAck();
|
||||
return true;
|
||||
case EnableReporting:
|
||||
DPRINTF(PS2, "Enabling data reporting.\n");
|
||||
status.enabled = 1;
|
||||
sendAck();
|
||||
return true;
|
||||
case DefaultsAndDisable:
|
||||
case Ps2::DefaultsAndDisable:
|
||||
DPRINTF(PS2, "Disabling and resetting mouse.\n");
|
||||
sampleRate = 100;
|
||||
resolution = 4;
|
||||
@@ -131,21 +142,9 @@ PS2Mouse::recv(const std::vector<uint8_t> &data)
|
||||
status.enabled = 0;
|
||||
sendAck();
|
||||
return true;
|
||||
case Resend:
|
||||
panic("Mouse resend unimplemented.\n");
|
||||
case Reset:
|
||||
DPRINTF(PS2, "Resetting the mouse.\n");
|
||||
sampleRate = 100;
|
||||
resolution = 4;
|
||||
status.twoToOne = 0;
|
||||
status.enabled = 0;
|
||||
sendAck();
|
||||
send(&BatSuccessful, sizeof(BatSuccessful));
|
||||
send(ID, sizeof(ID));
|
||||
return true;
|
||||
default:
|
||||
warn("Unknown mouse command %#02x.\n", data[0]);
|
||||
send(Resend);
|
||||
send(Ps2::Resend);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,27 +51,6 @@ struct PS2MouseParams;
|
||||
class PS2Mouse : public PS2Device
|
||||
{
|
||||
protected:
|
||||
static const uint8_t ID[];
|
||||
|
||||
enum Command
|
||||
{
|
||||
Scale1to1 = 0xE6,
|
||||
Scale2to1 = 0xE7,
|
||||
SetResolution = 0xE8,
|
||||
GetStatus = 0xE9,
|
||||
ReadData = 0xEB,
|
||||
ResetWrapMode = 0xEC,
|
||||
WrapMode = 0xEE,
|
||||
RemoteMode = 0xF0,
|
||||
ReadID = 0xF2,
|
||||
SampleRate = 0xF3,
|
||||
EnableReporting = 0xF4,
|
||||
DisableReporting = 0xF5,
|
||||
DefaultsAndDisable = 0xF6,
|
||||
Resend = 0xFE,
|
||||
Reset = 0xFF
|
||||
};
|
||||
|
||||
BitUnion8(Status)
|
||||
Bitfield<6> remote;
|
||||
Bitfield<5> enabled;
|
||||
|
||||
@@ -46,11 +46,9 @@
|
||||
|
||||
#include "base/logging.hh"
|
||||
#include "debug/PS2.hh"
|
||||
#include "dev/ps2.hh"
|
||||
#include "dev/ps2/types.hh"
|
||||
#include "params/PS2TouchKit.hh"
|
||||
|
||||
const uint8_t PS2TouchKit::ID[] = {0x00};
|
||||
|
||||
PS2TouchKit::PS2TouchKit(const PS2TouchKitParams *p)
|
||||
: PS2Device(p),
|
||||
vnc(p->vnc),
|
||||
@@ -82,7 +80,7 @@ bool
|
||||
PS2TouchKit::recv(const std::vector<uint8_t> &data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case Ps2::Ps2Reset:
|
||||
case Ps2::Reset:
|
||||
DPRINTF(PS2, "Resetting device.\n");
|
||||
enabled = false;
|
||||
touchKitEnabled = false;
|
||||
@@ -90,29 +88,9 @@ PS2TouchKit::recv(const std::vector<uint8_t> &data)
|
||||
send(Ps2::SelfTestPass);
|
||||
return true;
|
||||
|
||||
case Ps2::SetResolution:
|
||||
case Ps2::SetRate:
|
||||
case Ps2::SetStatusLed:
|
||||
sendAck();
|
||||
return data.size() == 2;
|
||||
|
||||
case Ps2::ReadId:
|
||||
sendAck();
|
||||
send((const uint8_t *)&ID, sizeof(ID));
|
||||
return true;
|
||||
|
||||
case Ps2::TpReadId:
|
||||
// We're not a trackpoint device, this should make the probe
|
||||
// go away
|
||||
sendAck();
|
||||
send(0);
|
||||
send(0);
|
||||
sendAck();
|
||||
return true;
|
||||
|
||||
case Ps2::SetScaling1_1:
|
||||
case Ps2::SetScaling1_2:
|
||||
case Ps2::ReadID:
|
||||
sendAck();
|
||||
send(Ps2::Mouse::ID);
|
||||
return true;
|
||||
|
||||
case Ps2::Disable:
|
||||
@@ -127,20 +105,39 @@ PS2TouchKit::recv(const std::vector<uint8_t> &data)
|
||||
sendAck();
|
||||
return true;
|
||||
|
||||
case Ps2::SetDefaults:
|
||||
case Ps2::DefaultsAndDisable:
|
||||
DPRINTF(PS2, "Setting defaults and disabling device.\n");
|
||||
enabled = false;
|
||||
sendAck();
|
||||
return true;
|
||||
|
||||
case Ps2::StatusRequest:
|
||||
case Ps2::Mouse::Scale1to1:
|
||||
case Ps2::Mouse::Scale2to1:
|
||||
sendAck();
|
||||
return true;
|
||||
|
||||
case Ps2::Mouse::SetResolution:
|
||||
case Ps2::Mouse::SampleRate:
|
||||
sendAck();
|
||||
return data.size() == 2;
|
||||
|
||||
case Ps2::Mouse::GetStatus:
|
||||
sendAck();
|
||||
send(0);
|
||||
send(2); // default resolution
|
||||
send(100); // default sample rate
|
||||
return true;
|
||||
|
||||
case Ps2::TouchKitId:
|
||||
case TpReadId:
|
||||
// We're not a trackpoint device, this should make the probe
|
||||
// go away
|
||||
sendAck();
|
||||
send(0);
|
||||
send(0);
|
||||
sendAck();
|
||||
return true;
|
||||
|
||||
case TouchKitDiag:
|
||||
return recvTouchKit(data);
|
||||
|
||||
default:
|
||||
@@ -155,7 +152,7 @@ PS2TouchKit::recvTouchKit(const std::vector<uint8_t> &data)
|
||||
sendAck();
|
||||
|
||||
// Packet format is: 0x0A SIZE CMD DATA
|
||||
assert(data[0] == Ps2::TouchKitId);
|
||||
assert(data[0] == TouchKitDiag);
|
||||
if (data.size() < 3 || data.size() - 2 < data[1])
|
||||
return false;
|
||||
|
||||
@@ -181,7 +178,7 @@ PS2TouchKit::recvTouchKit(const std::vector<uint8_t> &data)
|
||||
void
|
||||
PS2TouchKit::sendTouchKit(const uint8_t *data, size_t size)
|
||||
{
|
||||
send(Ps2::TouchKitId);
|
||||
send(TouchKitDiag);
|
||||
send(size);
|
||||
for (int i = 0; i < size; ++i)
|
||||
send(data[i]);
|
||||
|
||||
@@ -48,7 +48,10 @@ struct PS2TouchKitParams;
|
||||
class PS2TouchKit : public PS2Device, public VncMouse
|
||||
{
|
||||
protected:
|
||||
static const uint8_t ID[];
|
||||
enum PS2Commands {
|
||||
TpReadId = 0xE1,
|
||||
TouchKitDiag = 0x0A,
|
||||
};
|
||||
|
||||
enum TKCommands {
|
||||
TouchKitActive = 'A',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 ARM Limited
|
||||
* Copyright (c) 2011, 2018 ARM Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
@@ -37,13 +37,16 @@
|
||||
* Authors: Ali Saidi
|
||||
*/
|
||||
|
||||
#include "dev/ps2.hh"
|
||||
#include "dev/ps2/types.hh"
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "base/logging.hh"
|
||||
#include "x11keysym/keysym.h"
|
||||
|
||||
const std::vector<uint8_t> Ps2::Keyboard::ID{0xAB, 0x83};
|
||||
const std::vector<uint8_t> Ps2::Mouse::ID{0x00};
|
||||
|
||||
namespace Ps2 {
|
||||
|
||||
/** Table to convert simple key symbols (0x00XX) into ps2 bytes. Lower byte
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 ARM Limited
|
||||
* Copyright (c) 2011, 2018 ARM Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
@@ -41,34 +41,66 @@
|
||||
#define __DEV_PS2_HH__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include "base/bitunion.hh"
|
||||
|
||||
/** @file misc functions and constants required to interface with or emulate ps2
|
||||
* devices
|
||||
/** @file misc functions and constants required to interface with or
|
||||
* emulate ps2 devices
|
||||
*/
|
||||
|
||||
namespace Ps2 {
|
||||
|
||||
enum {
|
||||
Ps2Reset = 0xff,
|
||||
SelfTestPass = 0xAA,
|
||||
SetStatusLed = 0xed,
|
||||
SetResolution = 0xe8,
|
||||
StatusRequest = 0xe9,
|
||||
SetScaling1_2 = 0xe7,
|
||||
SetScaling1_1 = 0xe6,
|
||||
ReadId = 0xf2,
|
||||
TpReadId = 0xe1,
|
||||
Ack = 0xfa,
|
||||
Resend = 0xfe,
|
||||
SetRate = 0xf3,
|
||||
Enable = 0xf4,
|
||||
Disable = 0xf5,
|
||||
SetDefaults = 0xf6,
|
||||
KeyboardId = 0xab,
|
||||
TouchKitId = 0x0a,
|
||||
MouseId = 0x00,
|
||||
SelfTestPass = 0xAA,
|
||||
ReadID = 0xF2,
|
||||
Enable = 0xF4,
|
||||
Disable = 0xF5,
|
||||
DefaultsAndDisable = 0xF6,
|
||||
SelfTestFail = 0xFC,
|
||||
Ack = 0xFA,
|
||||
Resend = 0xFE,
|
||||
Reset = 0xFF,
|
||||
};
|
||||
|
||||
namespace Keyboard {
|
||||
|
||||
enum {
|
||||
LEDWrite = 0xED,
|
||||
DiagnosticEcho = 0xEE,
|
||||
AlternateScanCodes = 0xF0,
|
||||
TypematicInfo = 0xF3,
|
||||
AllKeysToTypematic = 0xF7,
|
||||
AllKeysToMakeRelease = 0xF8,
|
||||
AllKeysToMake = 0xF9,
|
||||
AllKeysToTypematicMakeRelease = 0xFA,
|
||||
KeyToTypematic = 0xFB,
|
||||
KeyToMakeRelease = 0xFC,
|
||||
KeyToMakeOnly = 0xFD,
|
||||
};
|
||||
|
||||
extern const std::vector<uint8_t> ID;
|
||||
|
||||
};
|
||||
|
||||
namespace Mouse {
|
||||
|
||||
enum {
|
||||
Scale1to1 = 0xE6,
|
||||
Scale2to1 = 0xE7,
|
||||
SetResolution = 0xE8,
|
||||
GetStatus = 0xE9,
|
||||
ReadData = 0xEB,
|
||||
ResetWrapMode = 0xEC,
|
||||
WrapMode = 0xEE,
|
||||
RemoteMode = 0xF0,
|
||||
SampleRate = 0xF3,
|
||||
};
|
||||
|
||||
extern const std::vector<uint8_t> ID;
|
||||
|
||||
};
|
||||
|
||||
/** A bitfield that represents the first byte of a mouse movement packet
|
||||
Reference in New Issue
Block a user