File tree Expand file tree Collapse file tree 6 files changed +14
-17
lines changed
components/hid-rp/include Expand file tree Collapse file tree 6 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
174174 // TODO: for report id 0x31, there are aditional 313 bytes of NFC/IR data input
175175 // after this.
176176 } __attribute__((packed)); // data union
177- } __attribute__ ((packed)); // input report data struct
177+ } __attribute__ ((packed)); // input report data struct
178178 // this will ensure we always have enough space for the largest report
179179 // without having padding bytes defined anywhere.
180180 uint8_t raw_report[63 ];
@@ -203,15 +203,11 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
203203 constexpr void set_counter (uint8_t value) { counter = value; }
204204
205205 // / Increment the counter
206- constexpr void increment_counter () {
207- counter = (counter + 1 );
208- }
206+ constexpr void increment_counter () { counter = (counter + 1 ); }
209207
210208 // / Get the counter value
211209 // / @return The counter value
212- constexpr uint8_t get_counter () const {
213- return counter;
214- }
210+ constexpr uint8_t get_counter () const { return counter; }
215211
216212 // / Set the subcommand ACK
217213 // / @param ack The subcommand ACK to set
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ namespace hid::page {
77class button ;
88template <> struct info <button> {
99 constexpr static page_id_t page_id = 0x0009 ;
10- constexpr static usage_id_t max_usage_id = 0x00ff ;
10+ constexpr static usage_id_t max_usage_id = 0xffff ;
1111 constexpr static const char *name = " Button" ;
1212};
1313class button {
1414public:
1515 constexpr operator usage_id_t () const { return id; }
16- explicit constexpr button (std::uint8_t value)
16+ explicit constexpr button (std::uint16_t value)
1717 : id(value) {}
18- std::uint8_t id{};
18+ std::uint16_t id{};
1919};
2020} // namespace hid::page
2121
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ enum class generic_desktop : std::uint8_t {
9595 SYSTEM_SPEAKER_MUTE = 0x00a7 ,
9696 SYSTEM_HIBERNATE = 0x00a8 ,
9797 SYSTEM_MICROPHONE_MUTE = 0x00a9 ,
98+ SYSTEM_ACCESSIBILITY_BINDING = 0x00aa ,
9899 SYSTEM_DISPLAY_INVERT = 0x00b0 ,
99100 SYSTEM_DISPLAY_INTERNAL = 0x00b1 ,
100101 SYSTEM_DISPLAY_EXTERNAL = 0x00b2 ,
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ namespace hid::page {
77class monitor_enumerated ;
88template <> struct info <monitor_enumerated> {
99 constexpr static page_id_t page_id = 0x0081 ;
10- constexpr static usage_id_t max_usage_id = 0x00ff ;
10+ constexpr static usage_id_t max_usage_id = 0xffff ;
1111 constexpr static const char *name = " Monitor Enumerated" ;
1212};
1313class monitor_enumerated {
1414public:
1515 constexpr operator usage_id_t () const { return id; }
16- constexpr monitor_enumerated (std::uint8_t value)
16+ explicit constexpr monitor_enumerated (std::uint16_t value)
1717 : id(value) {}
18- std::uint8_t id{};
18+ std::uint16_t id{};
1919};
2020} // namespace hid::page
2121
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ namespace hid::page {
77class ordinal ;
88template <> struct info <ordinal> {
99 constexpr static page_id_t page_id = 0x000a ;
10- constexpr static usage_id_t max_usage_id = 0x00ff ;
10+ constexpr static usage_id_t max_usage_id = 0xffff ;
1111 constexpr static const char *name = " Ordinal" ;
1212};
1313class ordinal {
1414public:
1515 constexpr operator usage_id_t () const { return id; }
16- constexpr ordinal (std::uint8_t value)
16+ explicit constexpr ordinal (std::uint16_t value)
1717 : id(value) {}
18- std::uint8_t id{};
18+ std::uint16_t id{};
1919};
2020} // namespace hid::page
2121
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ template <> struct info<unicode> {
1313class unicode {
1414public:
1515 constexpr operator usage_id_t () const { return id; }
16- constexpr unicode (std::uint8_t value)
16+ explicit constexpr unicode (std::uint8_t value)
1717 : id(value) {}
1818 std::uint8_t id{};
1919};
You can’t perform that action at this time.
0 commit comments