Added HidDeviceTypeBits and HidDeviceType. Updated docs.

This commit is contained in:
yellows8 2019-09-14 11:03:43 -04:00
parent c10e70df3a
commit 042c756d72
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43

View File

@ -243,6 +243,7 @@ typedef enum
COLORS_NONEXISTENT = BIT(1), COLORS_NONEXISTENT = BIT(1),
} HidControllerColorDescription; } HidControllerColorDescription;
/// HidControllerKeys
typedef enum typedef enum
{ {
KEY_A = BIT(0), ///< A KEY_A = BIT(0), ///< A
@ -330,6 +331,43 @@ typedef enum
HidJoyHoldType_Horizontal = 1, ///< Joy-Con held horizontally with HID state orientation adjustment, see \ref HidControllerLayoutType. HidJoyHoldType_Horizontal = 1, ///< Joy-Con held horizontally with HID state orientation adjustment, see \ref HidControllerLayoutType.
} HidJoyHoldType; } HidJoyHoldType;
/// DeviceType
typedef enum {
HidDeviceTypeBits_FullKey = BIT(0), ///< Pro Controller and Gc controller.
HidDeviceTypeBits_Unknown1 = BIT(1), ///< Unknown.
HidDeviceTypeBits_HandheldLeft = BIT(2), ///< Joy-Con/Famicom/NES left controller in handheld mode.
HidDeviceTypeBits_HandheldRight = BIT(3), ///< Joy-Con/Famicom/NES right controller in handheld mode.
HidDeviceTypeBits_JoyLeft = BIT(4), ///< Joy-Con left controller.
HidDeviceTypeBits_JoyRight = BIT(5), ///< Joy-Con right controller.
HidDeviceTypeBits_Palma = BIT(6), ///< Poké Ball Plus controller.
HidDeviceTypeBits_LarkLeftHVC = BIT(7), ///< Famicom left controller.
HidDeviceTypeBits_LarkRightHVC = BIT(8), ///< Famicom right controller (with microphone).
HidDeviceTypeBits_LarkLeftNES = BIT(9), ///< NES left controller.
HidDeviceTypeBits_LarkRightNES = BIT(10), ///< NES right controller.
HidDeviceTypeBits_SystemExt = BIT(15), ///< Generic external controller.
HidDeviceTypeBits_System = BIT(31), ///< Generic controller.
} HidDeviceTypeBits;
/// Internal DeviceType for [9.0.0+]. Converted to/from the pre-9.0.0 version of this by the hiddbg funcs.
typedef enum {
HidDeviceType_JoyRight1 = 1, ///< ::HidDeviceTypeBits_JoyRight
HidDeviceType_JoyLeft2 = 2, ///< ::HidDeviceTypeBits_JoyLeft
HidDeviceType_FullKey3 = 3, ///< ::HidDeviceTypeBits_FullKey
HidDeviceType_JoyLeft4 = 4, ///< ::HidDeviceTypeBits_JoyLeft
HidDeviceType_JoyRight5 = 5, ///< ::HidDeviceTypeBits_JoyRight
HidDeviceType_FullKey6 = 6, ///< ::HidDeviceTypeBits_FullKey
HidDeviceType_LarkLeftHVC = 7, ///< ::HidDeviceTypeBits_LarkLeftHVC
HidDeviceType_LarkRightHVC = 8, ///< ::HidDeviceTypeBits_LarkRightHVC
HidDeviceType_LarkLeftNES = 9, ///< ::HidDeviceTypeBits_LarkLeftNES
HidDeviceType_LarkRightNES = 10, ///< ::HidDeviceTypeBits_LarkRightNES
HidDeviceType_Palma = 12, ///< [9.0.0+] ::HidDeviceTypeBits_Palma
HidDeviceType_FullKey13 = 13, ///< ::HidDeviceTypeBits_FullKey
HidDeviceType_FullKey15 = 15, ///< ::HidDeviceTypeBits_FullKey
HidDeviceType_System19 = 19, ///< ::HidDeviceTypeBits_System with HidControllerType |= TYPE_PROCONTROLLER.
HidDeviceType_System20 = 20, ///< ::HidDeviceTypeBits_System with HidControllerType |= TYPE_JOYCON_PAIR.
HidDeviceType_System21 = 21, ///< ::HidDeviceTypeBits_System with HidControllerType |= TYPE_JOYCON_PAIR.
} HidDeviceType;
/// NpadInterfaceType /// NpadInterfaceType
typedef enum typedef enum
{ {
@ -678,7 +716,7 @@ HidControllerType hidGetControllerType(HidControllerID id);
void hidGetControllerColors(HidControllerID id, HidControllerColors *colors); void hidGetControllerColors(HidControllerID id, HidControllerColors *colors);
bool hidIsControllerConnected(HidControllerID id); bool hidIsControllerConnected(HidControllerID id);
/// Gets the DeviceType for the specified controller. /// Gets the \ref HidDeviceTypeBits for the specified controller.
u32 hidGetControllerDeviceType(HidControllerID id); u32 hidGetControllerDeviceType(HidControllerID id);
/// Gets the flags for the specified controller. /// Gets the flags for the specified controller.