mouse.hh (12653:4f6b6c1a8e2f) | mouse.hh (12656:335489e574f3) |
---|---|
1/* 2 * Copyright (c) 2017-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 57 unchanged lines hidden (view full) --- 66 ReadID = 0xF2, 67 SampleRate = 0xF3, 68 EnableReporting = 0xF4, 69 DisableReporting = 0xF5, 70 DefaultsAndDisable = 0xF6, 71 Resend = 0xFE, 72 Reset = 0xFF 73 }; | 1/* 2 * Copyright (c) 2017-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 57 unchanged lines hidden (view full) --- 66 ReadID = 0xF2, 67 SampleRate = 0xF3, 68 EnableReporting = 0xF4, 69 DisableReporting = 0xF5, 70 DefaultsAndDisable = 0xF6, 71 Resend = 0xFE, 72 Reset = 0xFF 73 }; |
74 static const uint16_t NoCommand = (uint16_t)(-1); | |
75 76 BitUnion8(Status) 77 Bitfield<6> remote; 78 Bitfield<5> enabled; 79 Bitfield<4> twoToOne; 80 Bitfield<2> leftButton; 81 Bitfield<0> rightButton; 82 EndBitUnion(Status) 83 | 74 75 BitUnion8(Status) 76 Bitfield<6> remote; 77 Bitfield<5> enabled; 78 Bitfield<4> twoToOne; 79 Bitfield<2> leftButton; 80 Bitfield<0> rightButton; 81 EndBitUnion(Status) 82 |
84 uint16_t lastCommand; 85 | |
86 Status status; 87 uint8_t resolution; 88 uint8_t sampleRate; 89 90 public: 91 PS2Mouse(const PS2MouseParams *p); 92 93 void serialize(CheckpointOut &cp) const override; 94 void unserialize(CheckpointIn &cp) override; 95 96 protected: // PS2Device | 83 Status status; 84 uint8_t resolution; 85 uint8_t sampleRate; 86 87 public: 88 PS2Mouse(const PS2MouseParams *p); 89 90 void serialize(CheckpointOut &cp) const override; 91 void unserialize(CheckpointIn &cp) override; 92 93 protected: // PS2Device |
97 void recv(uint8_t data) override; | 94 bool recv(const std::vector<uint8_t> &data) override; |
98}; 99 100#endif // __DEV_PS2_MOUSE_hH__ 101 | 95}; 96 97#endif // __DEV_PS2_MOUSE_hH__ 98 |