mirror of
https://github.com/cathery/sys-con.git
synced 2025-01-28 14:54:13 +00:00
Add enum types
This commit is contained in:
parent
e33b5c06ab
commit
1f8a8bc500
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
enum ControllerButton
|
||||
enum ControllerButton : int8_t
|
||||
{
|
||||
NOT_SET = -1,
|
||||
FACE_UP,
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
enum ControllerType
|
||||
enum ControllerType : uint8_t
|
||||
{
|
||||
CONTROLLER_UNDEFINED,
|
||||
CONTROLLER_XBOX360,
|
||||
@ -11,13 +11,13 @@ enum ControllerType
|
||||
CONTROLLER_DUALSHOCK4,
|
||||
};
|
||||
|
||||
enum VendorIDs
|
||||
enum VendorIDs : uint16_t
|
||||
{
|
||||
VENDOR_MICROSOFT = 0x45e,
|
||||
VENDOR_SONY = 0x54c,
|
||||
};
|
||||
|
||||
enum ProductIDs
|
||||
enum ProductIDs : uint16_t
|
||||
{
|
||||
PRODUCT_XBOX360 = 0x28e,
|
||||
/*
|
||||
@ -40,7 +40,7 @@ enum ProductIDs
|
||||
PRODUCT_DUALSHOCK4_2X = 0x9cc,
|
||||
};
|
||||
|
||||
enum ControllerSupport
|
||||
enum ControllerSupport : uint8_t
|
||||
{
|
||||
SUPPORTS_RUMBLE,
|
||||
SUPPORTS_BLUETOOTH,
|
||||
|
@ -5,7 +5,7 @@
|
||||
//References used:
|
||||
//https://cs.chromium.org/chromium/src/device/gamepad/dualshock4_controller.cc
|
||||
|
||||
enum Dualshock3FeatureValue
|
||||
enum Dualshock3FeatureValue : uint16_t
|
||||
{
|
||||
Ds3FeatureUnknown1 = 0x0201,
|
||||
Ds3FeatureUnknown2 = 0x0301,
|
||||
@ -17,7 +17,7 @@ enum Dualshock3FeatureValue
|
||||
Ds3FeatureUnknown5 = 0x03F8,
|
||||
};
|
||||
|
||||
enum Dualshock3InputPacketType
|
||||
enum Dualshock3InputPacketType : uint8_t
|
||||
{
|
||||
Ds3InputPacket_Button = 0x01,
|
||||
};
|
||||
@ -103,7 +103,7 @@ struct Dualshock3ButtonData
|
||||
#define PS_MOVE_NAVI_PRODUCT_ID 0x042F
|
||||
*/
|
||||
|
||||
enum Dualshock3LEDValue
|
||||
enum Dualshock3LEDValue : uint8_t
|
||||
{
|
||||
DS3LED_1 = 0x01,
|
||||
DS3LED_2 = 0x02,
|
||||
|
@ -126,7 +126,7 @@ struct Dualshock4USBButtonData
|
||||
uint8_t touchpad_finger2_prev[4];
|
||||
};
|
||||
|
||||
enum Dualshock4Dpad
|
||||
enum Dualshock4Dpad : uint8_t
|
||||
{
|
||||
DS4_UP,
|
||||
DS4_UPRIGHT,
|
||||
|
@ -53,14 +53,14 @@ struct Xbox360RumbleData
|
||||
uint8_t dummy2[3];
|
||||
};
|
||||
|
||||
enum Xbox360InputPacketType
|
||||
enum Xbox360InputPacketType : uint8_t
|
||||
{
|
||||
XBOX360INPUT_BUTTON = 0,
|
||||
XBOX360INPUT_LED = 1,
|
||||
XBOX360INPUT_RUMBLE = 3,
|
||||
};
|
||||
|
||||
enum Xbox360LEDValue
|
||||
enum Xbox360LEDValue : uint8_t
|
||||
{
|
||||
XBOX360LED_OFF,
|
||||
XBOX360LED_ALLBLINK,
|
||||
|
@ -7,7 +7,7 @@
|
||||
//https://github.com/quantus/xbox-one-controller-protocol
|
||||
//https://cs.chromium.org/chromium/src/device/gamepad/xbox_controller_mac.mm
|
||||
|
||||
enum VendorRequest
|
||||
enum VendorRequest : uint8_t
|
||||
{
|
||||
MT_VEND_DEV_MODE = 0x1,
|
||||
MT_VEND_WRITE = 0x2,
|
||||
|
@ -64,7 +64,7 @@ struct XboxOneRumbleData
|
||||
uint8_t extra;
|
||||
};
|
||||
|
||||
enum XboxOneInputPacketType
|
||||
enum XboxOneInputPacketType : uint8_t
|
||||
{
|
||||
XBONEINPUT_BUTTON = 0x20,
|
||||
XBONEINPUT_HEARTBEAT = 0x03,
|
||||
|
@ -5,7 +5,7 @@
|
||||
class IUSBEndpoint
|
||||
{
|
||||
public:
|
||||
enum Direction
|
||||
enum Direction : uint8_t
|
||||
{
|
||||
USB_ENDPOINT_IN = 0x80,
|
||||
USB_ENDPOINT_OUT = 0x00,
|
||||
|
Loading…
x
Reference in New Issue
Block a user