Merge pull request #8035 from jordan-woyak/si-enum-constexpr

SI: Replace some unnamed enums with constexpr.
This commit is contained in:
Mat M 2019-04-27 08:40:41 -04:00 committed by GitHub
commit 687907e44d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,29 +12,20 @@ class PointerWrap;
namespace SerialInterface namespace SerialInterface
{ {
// Devices can reply with these // Devices can reply with these
enum constexpr u32 SI_ERROR_NO_RESPONSE = 0x0008; // Nothing is attached
{ constexpr u32 SI_ERROR_UNKNOWN = 0x0040; // Unknown device is attached
SI_ERROR_NO_RESPONSE = 0x0008, // Nothing is attached constexpr u32 SI_ERROR_BUSY = 0x0080; // Still detecting
SI_ERROR_UNKNOWN = 0x0040, // Unknown device is attached
SI_ERROR_BUSY = 0x0080 // Still detecting
};
// Device types // Device types
enum constexpr u32 SI_TYPE_MASK = 0x18000000; // ???
{ constexpr u32 SI_TYPE_GC = 0x08000000;
SI_TYPE_MASK = 0x18000000, // ???
SI_TYPE_GC = 0x08000000
};
// GC Controller types // GC Controller types
enum constexpr u32 SI_GC_NOMOTOR = 0x20000000; // No rumble motor
{ constexpr u32 SI_GC_STANDARD = 0x01000000;
SI_GC_NOMOTOR = 0x20000000, // No rumble motor
SI_GC_STANDARD = 0x01000000
};
// SI Device IDs for emulator use // SI Device IDs for emulator use
enum TSIDevices enum TSIDevices : u32
{ {
SI_NONE = SI_ERROR_NO_RESPONSE, SI_NONE = SI_ERROR_NO_RESPONSE,
SI_N64_MIC = 0x00010000, SI_N64_MIC = 0x00010000,