2020-08-25 19:23:38 +00:00
|
|
|
/*
|
2023-02-23 20:57:56 +00:00
|
|
|
* Copyright (c) 2020-2023 ndeadly
|
2020-08-25 19:23:38 +00:00
|
|
|
*
|
2020-08-26 22:50:34 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
2020-08-25 19:23:38 +00:00
|
|
|
*
|
2020-08-26 22:50:34 +00:00
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
2020-08-25 19:23:38 +00:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-06-02 21:24:40 +00:00
|
|
|
#pragma once
|
2021-06-20 20:39:28 +00:00
|
|
|
#include "switch_analog_stick.hpp"
|
2021-02-03 22:52:39 +00:00
|
|
|
#include "../bluetooth_mitm/bluetooth/bluetooth_types.hpp"
|
|
|
|
#include "../bluetooth_mitm/bluetooth/bluetooth_hid_report.hpp"
|
2022-03-30 08:27:24 +00:00
|
|
|
#include "../async/future_response.hpp"
|
2022-04-26 11:47:35 +00:00
|
|
|
#include <queue>
|
2022-03-30 08:27:24 +00:00
|
|
|
|
2020-07-11 11:43:21 +00:00
|
|
|
namespace ams::controller {
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2023-02-22 21:25:51 +00:00
|
|
|
using HidResponse = FutureResponse<bluetooth::HidEventType, bluetooth::HidReportEventInfo, u8>;
|
2022-03-30 08:27:24 +00:00
|
|
|
|
2020-08-26 18:52:47 +00:00
|
|
|
constexpr auto BATTERY_MAX = 8;
|
2020-07-11 18:26:55 +00:00
|
|
|
|
2023-02-22 21:25:51 +00:00
|
|
|
enum SwitchPlayerNumber : u8 {
|
2020-10-18 21:38:00 +00:00
|
|
|
SwitchPlayerNumber_One,
|
|
|
|
SwitchPlayerNumber_Two,
|
|
|
|
SwitchPlayerNumber_Three,
|
|
|
|
SwitchPlayerNumber_Four,
|
|
|
|
SwitchPlayerNumber_Five,
|
|
|
|
SwitchPlayerNumber_Six,
|
|
|
|
SwitchPlayerNumber_Seven,
|
|
|
|
SwitchPlayerNumber_Eight,
|
|
|
|
SwitchPlayerNumber_Unknown = 0xf
|
|
|
|
};
|
|
|
|
|
2020-07-11 18:26:55 +00:00
|
|
|
struct HardwareID {
|
2023-02-22 21:25:51 +00:00
|
|
|
u16 vid;
|
|
|
|
u16 pid;
|
2020-07-11 18:26:55 +00:00
|
|
|
};
|
2020-10-04 15:16:07 +00:00
|
|
|
|
|
|
|
struct RGBColour {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 r;
|
|
|
|
u8 g;
|
|
|
|
u8 b;
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2020-10-04 15:16:07 +00:00
|
|
|
|
|
|
|
struct ProControllerColours {
|
|
|
|
RGBColour body;
|
|
|
|
RGBColour buttons;
|
|
|
|
RGBColour left_grip;
|
|
|
|
RGBColour right_grip;
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2022-09-13 22:07:59 +00:00
|
|
|
|
2020-06-09 20:39:30 +00:00
|
|
|
struct SwitchButtonData {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 Y : 1;
|
|
|
|
u8 X : 1;
|
|
|
|
u8 B : 1;
|
|
|
|
u8 A : 1;
|
|
|
|
u8 : 2; // SR, SL (Right Joy)
|
|
|
|
u8 R : 1;
|
|
|
|
u8 ZR : 1;
|
|
|
|
|
|
|
|
u8 minus : 1;
|
|
|
|
u8 plus : 1;
|
|
|
|
u8 rstick_press : 1;
|
|
|
|
u8 lstick_press : 1;
|
|
|
|
u8 home : 1;
|
|
|
|
u8 capture : 1;
|
|
|
|
u8 : 0;
|
|
|
|
|
|
|
|
u8 dpad_down : 1;
|
|
|
|
u8 dpad_up : 1;
|
|
|
|
u8 dpad_right : 1;
|
|
|
|
u8 dpad_left : 1;
|
|
|
|
u8 : 2; // SR, SL (Left Joy)
|
|
|
|
u8 L : 1;
|
|
|
|
u8 ZL : 1;
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2020-06-09 20:39:30 +00:00
|
|
|
|
|
|
|
struct Switch6AxisData {
|
2023-02-22 21:25:51 +00:00
|
|
|
s16 accel_x;
|
|
|
|
s16 accel_y;
|
|
|
|
s16 accel_z;
|
|
|
|
s16 gyro_1;
|
|
|
|
s16 gyro_2;
|
|
|
|
s16 gyro_3;
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2020-06-09 20:39:30 +00:00
|
|
|
|
2021-09-14 22:44:19 +00:00
|
|
|
struct Switch6AxisCalibrationData {
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
s16 x;
|
|
|
|
s16 y;
|
|
|
|
s16 z;
|
2021-09-14 22:44:19 +00:00
|
|
|
} acc_bias;
|
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
s16 x;
|
|
|
|
s16 y;
|
|
|
|
s16 z;
|
2021-09-14 22:44:19 +00:00
|
|
|
} acc_sensitivity;
|
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
s16 roll;
|
|
|
|
s16 pitch;
|
|
|
|
s16 yaw;
|
2021-09-14 22:44:19 +00:00
|
|
|
} gyro_bias;
|
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
s16 roll;
|
|
|
|
s16 pitch;
|
|
|
|
s16 yaw;
|
2021-09-14 22:44:19 +00:00
|
|
|
} gyro_sensitivity;
|
2023-02-22 21:25:51 +00:00
|
|
|
} PACKED;
|
2021-09-14 22:44:19 +00:00
|
|
|
|
2022-03-31 22:12:44 +00:00
|
|
|
struct Switch6AxisHorizontalOffset {
|
2023-02-22 21:25:51 +00:00
|
|
|
s16 x;
|
|
|
|
s16 y;
|
|
|
|
s16 z;
|
|
|
|
} PACKED;
|
2022-03-31 22:12:44 +00:00
|
|
|
|
2022-09-08 21:22:34 +00:00
|
|
|
struct SwitchRumbleDataEncoded {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 left_motor[4];
|
|
|
|
u8 right_motor[4];
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2022-09-08 21:22:34 +00:00
|
|
|
|
2020-09-30 21:07:23 +00:00
|
|
|
struct SwitchRumbleData {
|
2020-12-20 16:27:58 +00:00
|
|
|
float high_band_freq;
|
|
|
|
float high_band_amp;
|
|
|
|
float low_band_freq;
|
|
|
|
float low_band_amp;
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2020-09-30 21:07:23 +00:00
|
|
|
|
2023-02-22 21:25:51 +00:00
|
|
|
enum HidCommandType : u8 {
|
2022-09-12 22:06:07 +00:00
|
|
|
HidCommand_PairingOut = 0x01,
|
|
|
|
HidCommand_GetDeviceInfo = 0x02,
|
|
|
|
HidCommand_SetDataFormat = 0x03,
|
|
|
|
HidCommand_LRButtonDetection = 0x04,
|
|
|
|
HidCommand_Page = 0x05,
|
|
|
|
HidCommand_Reset = 0x06,
|
|
|
|
HidCommand_ClearPairingInfo = 0x07,
|
|
|
|
HidCommand_Shipment = 0x08,
|
|
|
|
HidCommand_SerialFlashRead = 0x10,
|
|
|
|
HidCommand_SerialFlashWrite = 0x11,
|
|
|
|
HidCommand_SerialFlashSectorErase = 0x12,
|
|
|
|
HidCommand_McuReset = 0x20,
|
|
|
|
HidCommand_McuWrite = 0x21,
|
|
|
|
HidCommand_McuResume = 0x22,
|
|
|
|
HidCommand_McuPollingEnable = 0x24,
|
|
|
|
HidCommand_McuPollingDisable = 0x25,
|
|
|
|
HidCommand_AttachmentWrite = 0x28,
|
|
|
|
HidCommand_AttachmentRead = 0x29,
|
|
|
|
HidCommand_AttachmentEnable = 0x2a,
|
|
|
|
HidCommand_SetIndicatorLed = 0x30,
|
|
|
|
HidCommand_GetIndicatorLed = 0x31,
|
|
|
|
HidCommand_SetNotificationLed = 0x38,
|
|
|
|
HidCommand_SensorSleep = 0x40,
|
|
|
|
HidCommand_SensorConfig = 0x41,
|
|
|
|
HidCommand_SensorWrite = 0x42,
|
|
|
|
HidCommand_SensorRead = 0x43,
|
|
|
|
HidCommand_MotorEnable = 0x48,
|
|
|
|
HidCommand_GetBatteryVoltage = 0x50,
|
|
|
|
HidCommand_WriteChargeSetting = 0x51,
|
|
|
|
HidCommand_ReadChargeSetting = 0x52,
|
2020-09-11 20:03:41 +00:00
|
|
|
};
|
|
|
|
|
2022-09-12 22:06:07 +00:00
|
|
|
struct SwitchHidCommand {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 id;
|
2021-02-26 19:46:49 +00:00
|
|
|
union {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 data[0x26];
|
2021-02-26 19:46:49 +00:00
|
|
|
|
2022-09-08 21:22:34 +00:00
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 id;
|
2022-09-12 22:06:07 +00:00
|
|
|
} set_data_format;
|
2022-09-08 21:22:34 +00:00
|
|
|
|
2021-02-26 19:46:49 +00:00
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u32 address;
|
|
|
|
u8 size;
|
2022-09-12 22:06:07 +00:00
|
|
|
} serial_flash_read;
|
2021-08-09 20:57:16 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u32 address;
|
|
|
|
u8 size;
|
|
|
|
u8 data[];
|
2022-09-12 22:06:07 +00:00
|
|
|
} serial_flash_write;
|
2021-08-09 20:57:16 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u32 address;
|
2022-09-12 22:06:07 +00:00
|
|
|
} serial_flash_sector_erase;
|
2021-11-01 00:23:57 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 leds;
|
2021-11-01 00:23:57 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 leds_flash : 4;
|
|
|
|
u8 leds_on : 4;
|
2021-11-01 00:23:57 +00:00
|
|
|
};
|
|
|
|
};
|
2022-09-12 22:06:07 +00:00
|
|
|
} set_indicator_led;
|
2021-11-01 10:42:19 +00:00
|
|
|
|
|
|
|
struct {
|
2022-09-12 22:06:07 +00:00
|
|
|
bool disabled;
|
|
|
|
} sensor_sleep;
|
2022-01-23 12:06:37 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 gyro_sensitivity;
|
|
|
|
u8 acc_sensitivity;
|
|
|
|
u8 gyro_perf_rate;
|
|
|
|
u8 acc_aa_bandwidth;
|
2022-09-12 22:06:07 +00:00
|
|
|
} sensor_config;
|
2022-01-23 12:06:37 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
bool enabled;
|
2022-09-12 22:06:07 +00:00
|
|
|
} motor_enable;
|
2021-02-26 19:46:49 +00:00
|
|
|
};
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2021-02-26 19:46:49 +00:00
|
|
|
|
2022-09-12 22:06:07 +00:00
|
|
|
struct SwitchHidCommandResponse {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 ack;
|
|
|
|
u8 id;
|
2021-02-26 19:46:49 +00:00
|
|
|
union {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 raw[0x23];
|
2021-02-26 19:46:49 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 major;
|
|
|
|
u8 minor;
|
2021-02-26 19:46:49 +00:00
|
|
|
} fw_ver;
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 type;
|
|
|
|
u8 _unk0; // Always 0x02
|
2021-02-26 19:46:49 +00:00
|
|
|
bluetooth::Address address;
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 _unk1; // Always 0x01
|
|
|
|
u8 _unk2; // If 01, colors in SPI are used. Otherwise default ones
|
2022-09-12 22:06:07 +00:00
|
|
|
} __attribute__ ((__packed__)) get_device_info;
|
2021-02-26 19:46:49 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
bool enabled;
|
2022-09-12 22:06:07 +00:00
|
|
|
} shipment;
|
2021-02-26 19:46:49 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u32 address;
|
|
|
|
u8 size;
|
|
|
|
u8 data[];
|
2022-09-12 22:06:07 +00:00
|
|
|
} serial_flash_read;
|
2021-02-26 19:46:49 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 status;
|
2022-09-12 22:06:07 +00:00
|
|
|
} serial_flash_write;
|
2021-02-26 19:46:49 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 status;
|
2022-09-12 22:06:07 +00:00
|
|
|
} serial_flash_sector_erase;
|
2021-11-01 11:56:41 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 leds;
|
2021-11-01 11:56:41 +00:00
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 leds_flash : 4;
|
|
|
|
u8 leds_on : 4;
|
2021-11-01 11:56:41 +00:00
|
|
|
};
|
|
|
|
};
|
2022-09-12 22:06:07 +00:00
|
|
|
} get_indicator_led;
|
2022-01-11 03:36:50 +00:00
|
|
|
} data;
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2021-02-26 19:46:49 +00:00
|
|
|
|
2022-09-14 20:48:03 +00:00
|
|
|
struct SwitchNfcIrResponse {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 data[0x138];
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2022-09-14 20:48:03 +00:00
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
struct SwitchInputReport {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 id;
|
|
|
|
u8 timer;
|
|
|
|
u8 conn_info : 4;
|
|
|
|
u8 battery : 4;
|
2022-09-13 22:07:59 +00:00
|
|
|
SwitchButtonData buttons;
|
2021-09-15 12:00:51 +00:00
|
|
|
SwitchAnalogStick left_stick;
|
|
|
|
SwitchAnalogStick right_stick;
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 vibrator;
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
SwitchHidCommandResponse hid_command_response;
|
|
|
|
} type0x21;
|
2022-09-08 21:22:34 +00:00
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 mcu_fw_data[37];
|
2022-09-13 22:07:59 +00:00
|
|
|
} type0x23;
|
2022-09-08 21:22:34 +00:00
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
struct {
|
|
|
|
Switch6AxisData motion_data[3]; // IMU samples at 0, 5 and 10ms
|
|
|
|
} type0x30;
|
2022-09-08 21:22:34 +00:00
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
struct {
|
|
|
|
Switch6AxisData motion_data[3]; // IMU samples at 0, 5 and 10ms
|
2022-09-14 20:48:03 +00:00
|
|
|
SwitchNfcIrResponse nfc_ir_response;
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 crc;
|
2022-09-13 22:07:59 +00:00
|
|
|
} type0x31;
|
|
|
|
};
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
struct SwitchOutputReport {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 id;
|
|
|
|
u8 counter;
|
2022-09-13 22:07:59 +00:00
|
|
|
SwitchRumbleDataEncoded rumble_data;
|
|
|
|
|
2020-07-11 11:43:21 +00:00
|
|
|
union {
|
2022-09-13 22:07:59 +00:00
|
|
|
struct{
|
|
|
|
SwitchHidCommand hid_command;
|
|
|
|
} type0x01;
|
|
|
|
|
|
|
|
struct {
|
2023-02-22 21:25:51 +00:00
|
|
|
u8 nfc_ir_data[0x16];
|
2022-09-13 22:07:59 +00:00
|
|
|
} type0x11;
|
2020-07-11 11:43:21 +00:00
|
|
|
};
|
2023-03-12 21:53:23 +00:00
|
|
|
} PACKED;
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2023-02-22 21:25:51 +00:00
|
|
|
Result LedsMaskToPlayerNumber(u8 led_mask, u8 *player_number);
|
2021-11-01 11:56:41 +00:00
|
|
|
|
2021-10-31 22:57:44 +00:00
|
|
|
std::string GetControllerDirectory(const bluetooth::Address *address);
|
2020-10-18 21:38:00 +00:00
|
|
|
|
2020-07-11 18:26:55 +00:00
|
|
|
class SwitchController {
|
|
|
|
|
2022-09-13 22:07:59 +00:00
|
|
|
public:
|
|
|
|
static constexpr const HardwareID hardware_ids[] = {
|
2020-08-26 18:52:47 +00:00
|
|
|
{0x057e, 0x2006}, // Official Joycon(L) Controller
|
2020-12-06 14:54:55 +00:00
|
|
|
{0x057e, 0x2007}, // Official Joycon(R) Controller/NES Online Controller
|
2020-09-17 10:11:50 +00:00
|
|
|
{0x057e, 0x2009}, // Official Switch Pro Controller
|
2021-10-29 13:58:50 +00:00
|
|
|
{0x057e, 0x2017}, // Official SNES Online Controller
|
|
|
|
{0x057e, 0x2019}, // Official N64 Online Controller
|
|
|
|
{0x057e, 0x201a} // Official Genesis/Megadrive Online Controller
|
2020-08-26 18:52:47 +00:00
|
|
|
};
|
2020-07-11 18:26:55 +00:00
|
|
|
|
2021-07-28 19:30:47 +00:00
|
|
|
SwitchController(const bluetooth::Address *address, HardwareID id)
|
|
|
|
: m_address(*address)
|
2021-10-27 22:22:55 +00:00
|
|
|
, m_id(id)
|
2022-09-07 21:27:06 +00:00
|
|
|
, m_input_mutex(false)
|
|
|
|
, m_output_mutex(false) { }
|
2020-07-11 18:26:55 +00:00
|
|
|
|
2021-08-19 23:00:57 +00:00
|
|
|
virtual ~SwitchController() { };
|
|
|
|
|
2022-04-08 15:12:59 +00:00
|
|
|
const bluetooth::Address& Address() const { return m_address; }
|
2020-07-11 18:26:55 +00:00
|
|
|
|
2022-04-08 15:12:59 +00:00
|
|
|
virtual bool IsOfficialController() { return true; }
|
2021-02-09 21:16:20 +00:00
|
|
|
|
2022-04-08 15:12:59 +00:00
|
|
|
virtual Result Initialize();
|
2020-08-26 18:52:47 +00:00
|
|
|
|
2022-03-30 08:27:24 +00:00
|
|
|
virtual Result HandleDataReportEvent(const bluetooth::HidReportEventInfo *event_info);
|
|
|
|
virtual Result HandleSetReportEvent(const bluetooth::HidReportEventInfo *event_info);
|
|
|
|
virtual Result HandleGetReportEvent(const bluetooth::HidReportEventInfo *event_info);
|
|
|
|
virtual Result HandleOutputDataReport(const bluetooth::HidReport *report);
|
2021-10-27 22:22:55 +00:00
|
|
|
|
2020-08-26 18:52:47 +00:00
|
|
|
protected:
|
2022-03-30 08:27:24 +00:00
|
|
|
Result WriteDataReport(const bluetooth::HidReport *report);
|
2023-02-22 21:25:51 +00:00
|
|
|
Result WriteDataReport(const bluetooth::HidReport *report, u8 response_id, bluetooth::HidReport *out_report);
|
2023-04-11 13:56:48 +00:00
|
|
|
Result SetReport(BtdrvBluetoothHhReportType type, const bluetooth::HidReport *report);
|
|
|
|
Result GetReport(u8 id, BtdrvBluetoothHhReportType type, bluetooth::HidReport *out_report);
|
2022-03-30 08:27:24 +00:00
|
|
|
|
|
|
|
virtual void UpdateControllerState(const bluetooth::HidReport *report);
|
2021-03-14 13:24:34 +00:00
|
|
|
virtual void ApplyButtonCombos(SwitchButtonData *buttons);
|
2021-02-26 00:08:15 +00:00
|
|
|
|
2020-07-11 18:26:55 +00:00
|
|
|
bluetooth::Address m_address;
|
2021-07-28 19:30:47 +00:00
|
|
|
HardwareID m_id;
|
2021-02-25 23:57:05 +00:00
|
|
|
|
2022-09-07 21:27:06 +00:00
|
|
|
os::Mutex m_input_mutex;
|
2021-11-01 19:26:46 +00:00
|
|
|
bluetooth::HidReport m_input_report;
|
2022-09-07 21:27:06 +00:00
|
|
|
|
|
|
|
os::Mutex m_output_mutex;
|
2021-11-01 19:26:46 +00:00
|
|
|
bluetooth::HidReport m_output_report;
|
2022-03-30 08:27:24 +00:00
|
|
|
|
|
|
|
std::queue<std::shared_ptr<HidResponse>> m_future_responses;
|
2020-07-11 18:26:55 +00:00
|
|
|
};
|
|
|
|
|
2020-06-02 21:24:40 +00:00
|
|
|
}
|