forked from lemmingDev/ESP32-BLE-Gamepad
-
Notifications
You must be signed in to change notification settings - Fork 3
/
XboxGamepadConfiguration.h
34 lines (27 loc) · 1.29 KB
/
XboxGamepadConfiguration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef XBOX_GAMEPAD_CONFIGURATION_H
#define XBOX_GAMEPAD_CONFIGURATION_H
#include "XboxDescriptors.h"
#include "BaseCompositeDevice.h"
class XboxGamepadDeviceConfiguration : public BaseCompositeDeviceConfiguration {
public:
XboxGamepadDeviceConfiguration(uint8_t reportId = XBOX_INPUT_REPORT_ID);
virtual uint8_t getDeviceReportSize() const override { return 0; }
virtual size_t makeDeviceReport(uint8_t* buffer, size_t bufferSize) const override {
return -1;
}
};
class XboxOneSControllerDeviceConfiguration : public XboxGamepadDeviceConfiguration {
public:
virtual const char* getDeviceName() const { return "XboxOneS"; }
virtual BLEHostConfiguration getIdealHostConfiguration() const override;
virtual uint8_t getDeviceReportSize() const override;
virtual size_t makeDeviceReport(uint8_t* buffer, size_t bufferSize) const override;
};
class XboxSeriesXControllerDeviceConfiguration : public XboxGamepadDeviceConfiguration {
public:
virtual const char* getDeviceName() const { return "XboxSeriesX"; }
virtual BLEHostConfiguration getIdealHostConfiguration() const override;
virtual uint8_t getDeviceReportSize() const override;
virtual size_t makeDeviceReport(uint8_t* buffer, size_t bufferSize) const override;
};
#endif // XBOX_GAMEPAD_CONFIGURATION_H