Hello,
Is there a way to get a string representation for the Constants and enums defined in IOKit?
I making a forage into IOKit and trying to console log out some parameter which USB devices return. But I'm ending up with lists of numbers. Is there another way to list what these mean?
For example in IOHIDKeys.h
enum IOHIDElementType {
kIOHIDElementTypeInput_Misc = 1,
kIOHIDElementTypeInput_Button = 2,
kIOHIDElementTypeInput_Axis = 3,
kIOHIDElementTypeInput_ScanCodes = 4,
kIOHIDElementTypeOutput = 129,
kIOHIDElementTypeFeature = 257,
kIOHIDElementTypeCollection = 513
};
typedef enum IOHIDElementType IOHIDElementType;
or even worse (for me) in IOHIDUsageTables.h i'm having to look up the hex value and find it in the header... e.g.:
kHIDUsage_GD_Joystick = 0x04, /* Application Collection */
kHIDUsage_GD_GamePad = 0x05, /* Application Collection */
kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */
kHIDUsage_GD_Keypad = 0x07, /* Application Collection */