diff --git a/gp2040ce_bintools/__init__.py b/gp2040ce_bintools/__init__.py index e6d7203..7d91af7 100644 --- a/gp2040ce_bintools/__init__.py +++ b/gp2040ce_bintools/__init__.py @@ -51,9 +51,18 @@ else: def get_config_pb2(): """Retrieve prebuilt _pb2 file or attempt to compile it live.""" + # try to just import a precompiled module if we have been given it in our path + # (perhaps someone already compiled it for us for whatever reason) try: return importlib.import_module('config_pb2') except ModuleNotFoundError: - # compile the proto files in realtime, leave them in this package - logger.info("Invoking gRPC tool to compile config.proto...") - return grpc.protos('config.proto') + # no found precompiled config, try to compile the proto files in realtime + # because it's possible someone put them on the path + try: + logger.info("Invoking gRPC tool to compile config.proto...") + return grpc.protos('config.proto') + except (ModuleNotFoundError, TypeError): + # (TypeError could be the windows bug https://github.com/protocolbuffers/protobuf/issues/14345) + # that failed, import a precompiled snapshot (may be lagging what's in GP2040-CE) + sys.path.append(os.path.join(pathlib.Path(__file__).parent.resolve(), 'proto_snapshot')) + return importlib.import_module('config_pb2') diff --git a/gp2040ce_bintools/proto_snapshot/__init__.py b/gp2040ce_bintools/proto_snapshot/__init__.py new file mode 100644 index 0000000..9a1fb1b --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/__init__.py @@ -0,0 +1,9 @@ +"""COPIED OUTPUT OF `protoc foo.proto --python_out .`. + +The .proto files here have been copied from https://github.com/OpenStickCommunity/GP2040-CE and +are a point in time import of the GP2040-CE firmware's configuration structure. THEY MAY BE OUT +OF DATE. If you are a developer, you should really use the `-P` flags to import your local copy +of the .proto files. +""" + +GP2040CE_SNAPSHOT_VERSION = 'v0.7.7' diff --git a/gp2040ce_bintools/proto_snapshot/config.proto b/gp2040ce_bintools/proto_snapshot/config.proto new file mode 100644 index 0000000..9c108db --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/config.proto @@ -0,0 +1,747 @@ +syntax = "proto2"; + +import "nanopb.proto"; +import "enums.proto"; + +message GamepadOptions +{ + optional InputMode inputMode = 1; + optional DpadMode dpadMode = 2; + optional SOCDMode socdMode = 3; + optional bool invertXAxis = 4; + optional bool invertYAxis = 5; + optional bool switchTpShareForDs4 = 6; + optional bool lockHotkeys = 7; + optional bool fourWayMode = 8; + optional uint32 profileNumber = 9; + optional PS4ControllerType ps4ControllerType = 10; + optional uint32 debounceDelay = 11; + optional int32 inputModeB1 = 12; + optional int32 inputModeB2 = 13; + optional int32 inputModeB3 = 14; + optional int32 inputModeB4 = 15; + optional int32 inputModeL1 = 16; + optional int32 inputModeL2 = 17; + optional int32 inputModeR1 = 18; + optional int32 inputModeR2 = 19; + optional bool ps4ReportHack = 20; +} + +message KeyboardMapping +{ + optional uint32 keyDpadUp = 1; + optional uint32 keyDpadDown = 2; + optional uint32 keyDpadLeft = 3; + optional uint32 keyDpadRight = 4; + optional uint32 keyButtonB1 = 5; + optional uint32 keyButtonB2 = 6; + optional uint32 keyButtonB3 = 7; + optional uint32 keyButtonB4 = 8; + optional uint32 keyButtonL1 = 9; + optional uint32 keyButtonR1 = 10; + optional uint32 keyButtonL2 = 11; + optional uint32 keyButtonR2 = 12; + optional uint32 keyButtonS1 = 13; + optional uint32 keyButtonS2 = 14; + optional uint32 keyButtonL3 = 15; + optional uint32 keyButtonR3 = 16; + optional uint32 keyButtonA1 = 17; + optional uint32 keyButtonA2 = 18; +} + +message HotkeyEntry +{ + optional uint32 dpadMask = 1; + optional GamepadHotkey action = 2; + optional uint32 buttonsMask = 3; + optional uint32 auxMask = 4; +} + +message HotkeyOptions +{ + optional HotkeyEntry hotkey01 = 1; + optional HotkeyEntry hotkey02 = 2; + optional HotkeyEntry hotkey03 = 3; + optional HotkeyEntry hotkey04 = 4; + optional HotkeyEntry hotkey05 = 5; + optional HotkeyEntry hotkey06 = 6; + optional HotkeyEntry hotkey07 = 7; + optional HotkeyEntry hotkey08 = 8; + optional HotkeyEntry hotkey09 = 9; + optional HotkeyEntry hotkey10 = 10; + optional HotkeyEntry hotkey11 = 11; + optional HotkeyEntry hotkey12 = 12; + optional HotkeyEntry hotkey13 = 13; + optional HotkeyEntry hotkey14 = 14; + optional HotkeyEntry hotkey15 = 15; + optional HotkeyEntry hotkey16 = 16; +} + +message PeripheralOptions +{ + message I2COptions { + optional bool enabled = 1; + optional int32 sda = 2; + optional int32 scl = 3; + optional uint32 speed = 4; + } + + message SPIOptions { + optional bool enabled = 1; + optional int32 rx = 2; + optional int32 cs = 3; + optional int32 sck = 4; + optional int32 tx = 5; + } + + message USBOptions { + optional bool enabled = 1; + optional int32 dp = 2; + optional int32 enable5v = 3; + optional uint32 order = 4; + } + + optional I2COptions blockI2C0 = 1; + optional I2COptions blockI2C1 = 2; + optional SPIOptions blockSPI0 = 3; + optional SPIOptions blockSPI1 = 4; + optional USBOptions blockUSB0 = 5; +} + +message ForcedSetupOptions +{ + optional ForcedSetupMode mode = 1; +}; + +message ButtonLayoutParamsCommon +{ + optional int32 startX = 1; + optional int32 startY = 2; + optional int32 buttonRadius = 3; + optional int32 buttonPadding = 4; +} + +message ButtonLayoutParamsLeft +{ + optional ButtonLayout layout = 1; + optional ButtonLayoutParamsCommon common = 2; +} + +message ButtonLayoutParamsRight +{ + optional ButtonLayoutRight layout = 1; + optional ButtonLayoutParamsCommon common = 2; +} + +message ButtonLayoutCustomOptions +{ + optional ButtonLayoutParamsLeft paramsLeft = 1; + optional ButtonLayoutParamsRight paramsRight = 2; +} + +message PinMappings +{ + optional int32 pinDpadUp = 1; + optional int32 pinDpadDown = 2; + optional int32 pinDpadLeft = 3; + optional int32 pinDpadRight = 4; + optional int32 pinButtonB1 = 5; + optional int32 pinButtonB2 = 6; + optional int32 pinButtonB3 = 7; + optional int32 pinButtonB4 = 8; + optional int32 pinButtonL1 = 9; + optional int32 pinButtonR1 = 10; + optional int32 pinButtonL2 = 11; + optional int32 pinButtonR2 = 12; + optional int32 pinButtonS1 = 13; + optional int32 pinButtonS2 = 14; + optional int32 pinButtonL3 = 15; + optional int32 pinButtonR3 = 16; + optional int32 pinButtonA1 = 17; + optional int32 pinButtonA2 = 18; + optional int32 pinButtonFn = 19; +} + +message GpioMappingInfo +{ + optional GpioAction action = 1; +} + +message GpioMappings +{ + repeated GpioMappingInfo pins = 1 [(nanopb).max_count = 30]; +} + + +message AlternativePinMappings +{ + optional int32 pinButtonB1 = 1; + optional int32 pinButtonB2 = 2; + optional int32 pinButtonB3 = 3; + optional int32 pinButtonB4 = 4; + optional int32 pinButtonL1 = 5; + optional int32 pinButtonR1 = 6; + optional int32 pinButtonL2 = 7; + optional int32 pinButtonR2 = 8; + optional int32 pinDpadUp = 9; + optional int32 pinDpadDown = 10; + optional int32 pinDpadLeft = 11; + optional int32 pinDpadRight = 12; +} + + +message ProfileOptions +{ + repeated AlternativePinMappings deprecatedAlternativePinMappings = 1 [(nanopb).max_count = 3, deprecated = true]; + repeated GpioMappings gpioMappingsSets = 2 [(nanopb).max_count = 3]; +} + +message DisplayOptions +{ + optional bool enabled = 1; + + optional int32 i2cBlock = 2; + optional int32 deprecatedI2cSDAPin = 3 [deprecated = true]; + optional int32 deprecatedI2cSCLPin = 4 [deprecated = true]; + optional int32 i2cAddress = 5; + optional int32 deprecatedI2cSpeed = 6 [deprecated = true]; + + optional ButtonLayout buttonLayout = 7; + optional ButtonLayoutRight buttonLayoutRight = 8; + optional ButtonLayoutCustomOptions buttonLayoutCustomOptions = 9; + + optional SplashMode splashMode = 10; + optional SplashChoice splashChoice = 11; + optional int32 splashDuration = 12; + optional bytes splashImage = 13 [(nanopb).max_size = 1024]; + + optional int32 size = 14; + optional int32 flip = 15; + optional bool invert = 16; + + optional int32 displaySaverTimeout = 17; + optional bool turnOffWhenSuspended = 18; +} + +message LEDOptions +{ + optional int32 dataPin = 1; + optional LEDFormat_Proto ledFormat = 2; + optional ButtonLayout ledLayout = 3; + optional uint32 ledsPerButton = 4; + optional uint32 brightnessMaximum = 5; + optional uint32 brightnessSteps = 6; + + optional int32 indexUp = 7; + optional int32 indexDown = 8; + optional int32 indexLeft = 9; + optional int32 indexRight = 10; + optional int32 indexB1 = 11; + optional int32 indexB2 = 12; + optional int32 indexB3 = 13; + optional int32 indexB4 = 14; + optional int32 indexL1 = 15; + optional int32 indexR1 = 16; + optional int32 indexL2 = 17; + optional int32 indexR2 = 18; + optional int32 indexS1 = 19; + optional int32 indexS2 = 20; + optional int32 indexL3 = 21; + optional int32 indexR3 = 22; + optional int32 indexA1 = 23; + optional int32 indexA2 = 24; + + optional PLEDType pledType = 25; + optional int32 pledPin1 = 26; + optional int32 pledPin2 = 27; + optional int32 pledPin3 = 28; + optional int32 pledPin4 = 29; + optional uint32 pledColor = 30; + + optional bool turnOffWhenSuspended = 31; + + optional int32 pledIndex1 = 32; + optional int32 pledIndex2 = 33; + optional int32 pledIndex3 = 34; + optional int32 pledIndex4 = 35; +}; + +// This has to be kept in sync with AnimationOptions in AnimationStation.hpp +message AnimationOptions_Proto +{ + optional uint32 baseAnimationIndex = 1; + optional uint32 brightness = 2; + optional uint32 staticColorIndex = 3; + optional uint32 buttonColorIndex = 4; + optional int32 chaseCycleTime = 5; + optional int32 rainbowCycleTime = 6; + optional uint32 themeIndex = 7; + + optional bool hasCustomTheme = 8; + optional uint32 customThemeUp = 9; + optional uint32 customThemeDown = 10; + optional uint32 customThemeLeft = 11; + optional uint32 customThemeRight = 12; + optional uint32 customThemeB1 = 13; + optional uint32 customThemeB2 = 14; + optional uint32 customThemeB3 = 15; + optional uint32 customThemeB4 = 16; + optional uint32 customThemeL1 = 17; + optional uint32 customThemeR1 = 18; + optional uint32 customThemeL2 = 19; + optional uint32 customThemeR2 = 20; + optional uint32 customThemeS1 = 21; + optional uint32 customThemeS2 = 22; + optional uint32 customThemeL3 = 23; + optional uint32 customThemeR3 = 24; + optional uint32 customThemeA1 = 25; + optional uint32 customThemeA2 = 26; + optional uint32 customThemeUpPressed = 27; + optional uint32 customThemeDownPressed = 28; + optional uint32 customThemeLeftPressed = 29; + optional uint32 customThemeRightPressed = 30; + optional uint32 customThemeB1Pressed = 31; + optional uint32 customThemeB2Pressed = 32; + optional uint32 customThemeB3Pressed = 33; + optional uint32 customThemeB4Pressed = 34; + optional uint32 customThemeL1Pressed = 35; + optional uint32 customThemeR1Pressed = 36; + optional uint32 customThemeL2Pressed = 37; + optional uint32 customThemeR2Pressed = 38; + optional uint32 customThemeS1Pressed = 39; + optional uint32 customThemeS2Pressed = 40; + optional uint32 customThemeL3Pressed = 41; + optional uint32 customThemeR3Pressed = 42; + optional uint32 customThemeA1Pressed = 43; + optional uint32 customThemeA2Pressed = 44; +} + +message BootselButtonOptions +{ + optional bool enabled = 1; + optional uint32 buttonMap = 2; +} + +message OnBoardLedOptions +{ + optional OnBoardLedMode mode = 1; + optional bool enabled = 2; +} + +message AnalogOptions +{ + optional bool enabled = 1; + + optional int32 analogAdc1PinX = 2; + optional int32 analogAdc1PinY = 3; + optional bool forced_circularity = 4; + optional uint32 analog_deadzone = 5; + optional int32 analogAdc2PinX = 6; + optional int32 analogAdc2PinY = 7; + optional DpadMode analogAdc1Mode = 8; + optional DpadMode analogAdc2Mode = 9; + optional InvertMode analogAdc1Invert = 10; + optional InvertMode analogAdc2Invert = 11; + optional bool auto_calibrate = 12; +} + +message TurboOptions +{ + optional bool enabled = 1; + + optional int32 buttonPin = 2; + optional int32 ledPin = 3; + optional uint32 shotCount = 4; + optional int32 shmupDialPin = 5; + + optional bool shmupModeEnabled = 6; + optional uint32 shmupAlwaysOn1 = 7; + optional uint32 shmupAlwaysOn2 = 8; + optional uint32 shmupAlwaysOn3 = 9; + optional uint32 shmupAlwaysOn4 = 10; + optional int32 shmupBtn1Pin = 11; + optional int32 shmupBtn2Pin = 12; + optional int32 shmupBtn3Pin = 13; + optional int32 shmupBtn4Pin = 14; + optional uint32 shmupBtnMask1 = 15; + optional uint32 shmupBtnMask2 = 16; + optional uint32 shmupBtnMask3 = 17; + optional uint32 shmupBtnMask4 = 18; + optional ShmupMixMode shmupMixMode = 19; +} + +message SliderOptions +{ + optional bool enabled = 1; + + optional int32 deprecatedPinSliderOne = 2 [deprecated = true]; + optional int32 deprecatedPinSliderTwo = 3 [deprecated = true]; + optional DpadMode deprecatedModeOne = 4 [deprecated = true]; + optional DpadMode deprecatedModeTwo = 5 [deprecated = true]; + optional DpadMode modeDefault = 6; +} + +message SOCDSliderOptions +{ + optional bool enabled = 1; + + optional int32 deprecatedPinOne = 2 [deprecated = true]; + optional int32 deprecatedPinTwo = 3 [deprecated = true]; + + optional SOCDMode modeDefault = 4; + optional SOCDMode deprecatedModeOne = 5 [deprecated = true]; + optional SOCDMode deprecatedModeTwo = 6 [deprecated = true]; +} + +message ReverseOptions +{ + optional bool enabled = 1; + + optional int32 buttonPin = 2; + optional int32 ledPin = 3; + + optional uint32 actionUp = 4; + optional uint32 actionDown = 5; + optional uint32 actionLeft = 6; + optional uint32 actionRight = 7; +} + +message AnalogADS1219Options +{ + optional bool enabled = 1; + + optional int32 i2cBlock = 2; + optional int32 deprecatedI2cSDAPin = 3 [deprecated = true]; + optional int32 deprecatedI2cSCLPin = 4 [deprecated = true]; + optional int32 i2cAddress = 5; + optional int32 deprecatedI2cSpeed = 6 [deprecated = true]; +} + +message DualDirectionalOptions +{ + optional bool enabled = 1; + + optional int32 deprecatedUpPin = 2 [deprecated = true]; + optional int32 deprecatedDownPin = 3 [deprecated = true]; + optional int32 deprecatedLeftPin = 4 [deprecated = true]; + optional int32 deprecatedRightPin = 5 [deprecated = true]; + + optional DpadMode dpadMode = 6; + optional uint32 combineMode = 7; + optional bool fourWayMode = 8; +} + +message TiltOptions +{ + optional bool enabled = 1; + + optional int32 tilt1Pin = 2; + optional int32 tilt2Pin = 3; + optional int32 deprecatedTiltFunctionPin = 4 [deprecated = true]; + optional int32 tiltLeftAnalogUpPin = 5; + optional int32 tiltLeftAnalogDownPin = 6; + optional int32 tiltLeftAnalogLeftPin = 7; + optional int32 tiltLeftAnalogRightPin = 8; + optional int32 tiltRightAnalogUpPin = 9; + optional int32 tiltRightAnalogDownPin = 10; + optional int32 tiltRightAnalogLeftPin = 11; + optional int32 tiltRightAnalogRightPin = 12; + + optional SOCDMode tiltSOCDMode = 13; + + optional int32 factorTilt1LeftX = 14; + optional int32 factorTilt1LeftY = 15; + optional int32 factorTilt1RightX = 16; + optional int32 factorTilt1RightY = 17; + optional int32 factorTilt2LeftX = 18; + optional int32 factorTilt2LeftY = 19; + optional int32 factorTilt2RightX = 20; + optional int32 factorTilt2RightY = 21; +} + +message BuzzerOptions +{ + optional bool enabled = 1; + + optional int32 pin = 2; + optional uint32 volume = 3; +} + +message ExtraButtonOptions +{ + optional bool enabled = 1; + + optional int32 pin = 2; + optional uint32 buttonMap = 3; +} + +message PlayerNumberOptions +{ + optional bool enabled = 1; + optional uint32 number = 2; +} + +message PS4Options +{ + optional bool enabled = 1; + optional bytes serial = 2 [(nanopb).max_size = 16]; + optional bytes signature = 3 [(nanopb).max_size = 256]; + optional bytes rsaN = 4 [(nanopb).max_size = 256]; + optional bytes rsaE = 5 [(nanopb).max_size = 4]; + optional bytes rsaD = 6 [(nanopb).max_size = 256]; + optional bytes rsaP = 7 [(nanopb).max_size = 128]; + optional bytes rsaQ = 8 [(nanopb).max_size = 128]; + optional bytes rsaDP = 9 [(nanopb).max_size = 128]; + optional bytes rsaDQ = 10 [(nanopb).max_size = 128]; + optional bytes rsaQP = 11 [(nanopb).max_size = 128]; + optional bytes rsaRN = 12 [(nanopb).max_size = 256]; +} + +message PSPassthroughOptions +{ + optional bool enabled = 1; + optional int32 deprecatedPinDplus = 2 [deprecated = true]; + optional int32 deprecatedPin5V = 3 [deprecated = true]; +} + +message XBOnePassthroughOptions +{ + optional bool enabled = 1; +} + +message WiiOptions +{ + message AnalogAxis + { + optional int32 axisType = 1; + optional int32 minRange = 2; + optional int32 maxRange = 3; + } + + message StickOptions + { + optional AnalogAxis x = 1; + optional AnalogAxis y = 2; + } + + message NunchukOptions + { + optional int32 buttonC = 1; + optional int32 buttonZ = 2; + optional StickOptions stick = 3; + } + + message ClassicOptions + { + optional int32 buttonA = 1; + optional int32 buttonB = 2; + optional int32 buttonX = 3; + optional int32 buttonY = 4; + optional int32 buttonL = 5; + optional int32 buttonZL = 6; + optional int32 buttonR = 7; + optional int32 buttonZR = 8; + optional int32 buttonMinus = 9; + optional int32 buttonPlus = 10; + optional int32 buttonHome = 11; + optional int32 buttonUp = 12; + optional int32 buttonDown = 13; + optional int32 buttonLeft = 14; + optional int32 buttonRight = 15; + optional StickOptions rightStick = 17; + optional StickOptions leftStick = 16; + optional AnalogAxis leftTrigger = 18; + optional AnalogAxis rightTrigger = 19; + } + + message TaikoOptions + { + optional int32 buttonKatLeft = 1; + optional int32 buttonKatRight = 2; + optional int32 buttonDonLeft = 3; + optional int32 buttonDonRight = 4; + } + + message GuitarOptions + { + optional int32 buttonRed = 1; + optional int32 buttonGreen = 2; + optional int32 buttonYellow = 3; + optional int32 buttonBlue = 4; + optional int32 buttonOrange = 5; + optional int32 buttonPedal = 6; + optional int32 buttonMinus = 7; + optional int32 buttonPlus = 8; + optional int32 strumUp = 9; + optional int32 strumDown = 10; + optional StickOptions stick = 11; + optional AnalogAxis whammyBar = 12; + } + + message DrumOptions + { + optional int32 buttonRed = 1; + optional int32 buttonGreen = 2; + optional int32 buttonYellow = 3; + optional int32 buttonBlue = 4; + optional int32 buttonOrange = 5; + optional int32 buttonPedal = 6; + optional int32 buttonMinus = 7; + optional int32 buttonPlus = 8; + optional StickOptions stick = 9; + } + + message TurntableOptions + { + optional int32 buttonLeftRed = 1; + optional int32 buttonLeftGreen = 2; + optional int32 buttonLeftBlue = 3; + optional int32 buttonRightRed = 4; + optional int32 buttonRightGreen = 5; + optional int32 buttonRightBlue = 6; + optional int32 buttonMinus = 7; + optional int32 buttonPlus = 8; + optional int32 buttonEuphoria = 9; + optional StickOptions stick = 10; + optional AnalogAxis leftTurntable = 11; + optional AnalogAxis rightTurntable = 12; + optional AnalogAxis effects = 13; + optional AnalogAxis fader = 14; + } + + message ControllerOptions + { + optional NunchukOptions nunchuk = 1; + optional ClassicOptions classic = 2; + optional TaikoOptions taiko = 3; + optional GuitarOptions guitar = 4; + optional DrumOptions drum = 5; + optional TurntableOptions turntable = 6; + } + + optional bool enabled = 1; + optional int32 i2cBlock = 2; + optional int32 deprecatedI2cSDAPin = 3 [deprecated = true]; + optional int32 deprecatedI2cSCLPin = 4 [deprecated = true]; + optional int32 deprecatedI2cSpeed = 5 [deprecated = true]; + + optional ControllerOptions controllers = 6; +} + +message SNESOptions +{ + optional bool enabled = 1; + optional int32 clockPin = 2; + optional int32 latchPin = 3; + optional int32 dataPin = 4; +} + +message KeyboardHostOptions +{ + optional bool enabled = 1; + optional int32 deprecatedPinDplus = 2 [deprecated = true]; + optional KeyboardMapping mapping = 3; + optional int32 deprecatedPin5V = 4 [deprecated = true]; +} + +message FocusModeOptions +{ + optional bool enabled = 1; + optional int32 pin = 2; + optional int32 buttonLockMask = 3; + optional bool oledLockEnabled = 4; + optional bool rgbLockEnabled = 5; + optional bool buttonLockEnabled = 6; + optional bool macroLockEnabled = 7; +} + +message MacroInput +{ + optional uint32 buttonMask = 1; + optional uint32 duration = 2; + optional uint32 waitDuration = 3 [default = 0]; +} + +message Macro +{ + optional MacroType macroType = 1; + optional string macroLabel = 2 [(nanopb).max_length = 64]; + repeated MacroInput macroInputs = 3 [(nanopb).max_count = 30]; + optional bool enabled = 4; + optional bool useMacroTriggerButton = 5; + optional int32 macroTriggerPin = 6 [default = -1]; + optional uint32 macroTriggerButton = 7; + optional bool exclusive = 8 [default = true]; + optional bool interruptible = 9 [default = true]; + optional bool showFrames = 10 [default = false]; +} + +message MacroOptions +{ + optional bool enabled = 1; + optional int32 pin = 2; + optional bool macroBoardLedEnabled = 4; + repeated Macro macroList = 3 [(nanopb).max_count = 6]; +} + +message InputHistoryOptions +{ + optional bool enabled = 1; + optional uint32 length = 2; + optional uint32 col = 3; + optional uint32 row = 4; +} + +message AddonOptions +{ + optional BootselButtonOptions bootselButtonOptions = 1; + optional OnBoardLedOptions onBoardLedOptions = 2; + optional AnalogOptions analogOptions = 3; + optional TurboOptions turboOptions = 4; + optional SliderOptions sliderOptions = 5; + optional ReverseOptions reverseOptions = 6; + optional AnalogADS1219Options analogADS1219Options = 7; + optional DualDirectionalOptions dualDirectionalOptions = 8; + optional BuzzerOptions buzzerOptions = 9; + optional ExtraButtonOptions deprecatedExtraButtonOptions = 10 [deprecated = true]; + optional PlayerNumberOptions playerNumberOptions = 11; + optional PS4Options ps4Options = 12 [(nanopb).disallow_export = true]; + optional WiiOptions wiiOptions = 13; + optional SOCDSliderOptions socdSliderOptions = 14; + optional SNESOptions snesOptions = 15; + optional FocusModeOptions focusModeOptions = 16; + optional KeyboardHostOptions keyboardHostOptions = 17; + optional TiltOptions tiltOptions = 18; + optional PSPassthroughOptions psPassthroughOptions = 19; + optional MacroOptions macroOptions = 20; + optional InputHistoryOptions inputHistoryOptions = 21; + optional XBOnePassthroughOptions xbonePassthroughOptions = 22; +} + +message MigrationHistory +{ + optional bool hotkeysMigrated = 1 [default = false]; + optional bool gpioMappingsMigrated = 2 [default = false]; + optional bool buttonProfilesMigrated = 3 [default = false]; +} + +message Config +{ + optional string boardVersion = 1 [(nanopb).max_length = 31]; + + optional GamepadOptions gamepadOptions = 2; + optional HotkeyOptions hotkeyOptions = 3; + optional PinMappings deprecatedPinMappings = 4 [deprecated = true]; + optional KeyboardMapping keyboardMapping = 5; + optional DisplayOptions displayOptions = 6; + optional LEDOptions ledOptions = 7; + optional AnimationOptions_Proto animationOptions = 8; + optional AddonOptions addonOptions = 9; + optional ForcedSetupOptions forcedSetupOptions = 10; + optional ProfileOptions profileOptions = 11; + + optional string boardConfig = 12 [(nanopb).max_length = 63]; + optional GpioMappings gpioMappings = 13; + optional MigrationHistory migrations = 14; + optional PeripheralOptions peripheralOptions = 15; +} diff --git a/gp2040ce_bintools/proto_snapshot/config_pb2.py b/gp2040ce_bintools/proto_snapshot/config_pb2.py new file mode 100644 index 0000000..98eed35 --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/config_pb2.py @@ -0,0 +1,237 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: config.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import nanopb_pb2 as nanopb__pb2 +import enums_pb2 as enums__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63onfig.proto\x1a\x0cnanopb.proto\x1a\x0b\x65nums.proto\"\xf6\x03\n\x0eGamepadOptions\x12\x1d\n\tinputMode\x18\x01 \x01(\x0e\x32\n.InputMode\x12\x1b\n\x08\x64padMode\x18\x02 \x01(\x0e\x32\t.DpadMode\x12\x1b\n\x08socdMode\x18\x03 \x01(\x0e\x32\t.SOCDMode\x12\x13\n\x0binvertXAxis\x18\x04 \x01(\x08\x12\x13\n\x0binvertYAxis\x18\x05 \x01(\x08\x12\x1b\n\x13switchTpShareForDs4\x18\x06 \x01(\x08\x12\x13\n\x0blockHotkeys\x18\x07 \x01(\x08\x12\x13\n\x0b\x66ourWayMode\x18\x08 \x01(\x08\x12\x15\n\rprofileNumber\x18\t \x01(\r\x12-\n\x11ps4ControllerType\x18\n \x01(\x0e\x32\x12.PS4ControllerType\x12\x15\n\rdebounceDelay\x18\x0b \x01(\r\x12\x13\n\x0binputModeB1\x18\x0c \x01(\x05\x12\x13\n\x0binputModeB2\x18\r \x01(\x05\x12\x13\n\x0binputModeB3\x18\x0e \x01(\x05\x12\x13\n\x0binputModeB4\x18\x0f \x01(\x05\x12\x13\n\x0binputModeL1\x18\x10 \x01(\x05\x12\x13\n\x0binputModeL2\x18\x11 \x01(\x05\x12\x13\n\x0binputModeR1\x18\x12 \x01(\x05\x12\x13\n\x0binputModeR2\x18\x13 \x01(\x05\x12\x15\n\rps4ReportHack\x18\x14 \x01(\x08\"\x8a\x03\n\x0fKeyboardMapping\x12\x11\n\tkeyDpadUp\x18\x01 \x01(\r\x12\x13\n\x0bkeyDpadDown\x18\x02 \x01(\r\x12\x13\n\x0bkeyDpadLeft\x18\x03 \x01(\r\x12\x14\n\x0ckeyDpadRight\x18\x04 \x01(\r\x12\x13\n\x0bkeyButtonB1\x18\x05 \x01(\r\x12\x13\n\x0bkeyButtonB2\x18\x06 \x01(\r\x12\x13\n\x0bkeyButtonB3\x18\x07 \x01(\r\x12\x13\n\x0bkeyButtonB4\x18\x08 \x01(\r\x12\x13\n\x0bkeyButtonL1\x18\t \x01(\r\x12\x13\n\x0bkeyButtonR1\x18\n \x01(\r\x12\x13\n\x0bkeyButtonL2\x18\x0b \x01(\r\x12\x13\n\x0bkeyButtonR2\x18\x0c \x01(\r\x12\x13\n\x0bkeyButtonS1\x18\r \x01(\r\x12\x13\n\x0bkeyButtonS2\x18\x0e \x01(\r\x12\x13\n\x0bkeyButtonL3\x18\x0f \x01(\r\x12\x13\n\x0bkeyButtonR3\x18\x10 \x01(\r\x12\x13\n\x0bkeyButtonA1\x18\x11 \x01(\r\x12\x13\n\x0bkeyButtonA2\x18\x12 \x01(\r\"e\n\x0bHotkeyEntry\x12\x10\n\x08\x64padMask\x18\x01 \x01(\r\x12\x1e\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x0e.GamepadHotkey\x12\x13\n\x0b\x62uttonsMask\x18\x03 \x01(\r\x12\x0f\n\x07\x61uxMask\x18\x04 \x01(\r\"\x8f\x04\n\rHotkeyOptions\x12\x1e\n\x08hotkey01\x18\x01 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey02\x18\x02 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey03\x18\x03 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey04\x18\x04 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey05\x18\x05 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey06\x18\x06 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey07\x18\x07 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey08\x18\x08 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey09\x18\t \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey10\x18\n \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey11\x18\x0b \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey12\x18\x0c \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey13\x18\r \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey14\x18\x0e \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey15\x18\x0f \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey16\x18\x10 \x01(\x0b\x32\x0c.HotkeyEntry\"\xf1\x03\n\x11PeripheralOptions\x12\x30\n\tblockI2C0\x18\x01 \x01(\x0b\x32\x1d.PeripheralOptions.I2COptions\x12\x30\n\tblockI2C1\x18\x02 \x01(\x0b\x32\x1d.PeripheralOptions.I2COptions\x12\x30\n\tblockSPI0\x18\x03 \x01(\x0b\x32\x1d.PeripheralOptions.SPIOptions\x12\x30\n\tblockSPI1\x18\x04 \x01(\x0b\x32\x1d.PeripheralOptions.SPIOptions\x12\x30\n\tblockUSB0\x18\x05 \x01(\x0b\x32\x1d.PeripheralOptions.USBOptions\x1a\x46\n\nI2COptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03sda\x18\x02 \x01(\x05\x12\x0b\n\x03scl\x18\x03 \x01(\x05\x12\r\n\x05speed\x18\x04 \x01(\r\x1aN\n\nSPIOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\n\n\x02rx\x18\x02 \x01(\x05\x12\n\n\x02\x63s\x18\x03 \x01(\x05\x12\x0b\n\x03sck\x18\x04 \x01(\x05\x12\n\n\x02tx\x18\x05 \x01(\x05\x1aJ\n\nUSBOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\n\n\x02\x64p\x18\x02 \x01(\x05\x12\x10\n\x08\x65nable5v\x18\x03 \x01(\x05\x12\r\n\x05order\x18\x04 \x01(\r\"4\n\x12\x46orcedSetupOptions\x12\x1e\n\x04mode\x18\x01 \x01(\x0e\x32\x10.ForcedSetupMode\"g\n\x18\x42uttonLayoutParamsCommon\x12\x0e\n\x06startX\x18\x01 \x01(\x05\x12\x0e\n\x06startY\x18\x02 \x01(\x05\x12\x14\n\x0c\x62uttonRadius\x18\x03 \x01(\x05\x12\x15\n\rbuttonPadding\x18\x04 \x01(\x05\"b\n\x16\x42uttonLayoutParamsLeft\x12\x1d\n\x06layout\x18\x01 \x01(\x0e\x32\r.ButtonLayout\x12)\n\x06\x63ommon\x18\x02 \x01(\x0b\x32\x19.ButtonLayoutParamsCommon\"h\n\x17\x42uttonLayoutParamsRight\x12\"\n\x06layout\x18\x01 \x01(\x0e\x32\x12.ButtonLayoutRight\x12)\n\x06\x63ommon\x18\x02 \x01(\x0b\x32\x19.ButtonLayoutParamsCommon\"w\n\x19\x42uttonLayoutCustomOptions\x12+\n\nparamsLeft\x18\x01 \x01(\x0b\x32\x17.ButtonLayoutParamsLeft\x12-\n\x0bparamsRight\x18\x02 \x01(\x0b\x32\x18.ButtonLayoutParamsRight\"\x9b\x03\n\x0bPinMappings\x12\x11\n\tpinDpadUp\x18\x01 \x01(\x05\x12\x13\n\x0bpinDpadDown\x18\x02 \x01(\x05\x12\x13\n\x0bpinDpadLeft\x18\x03 \x01(\x05\x12\x14\n\x0cpinDpadRight\x18\x04 \x01(\x05\x12\x13\n\x0bpinButtonB1\x18\x05 \x01(\x05\x12\x13\n\x0bpinButtonB2\x18\x06 \x01(\x05\x12\x13\n\x0bpinButtonB3\x18\x07 \x01(\x05\x12\x13\n\x0bpinButtonB4\x18\x08 \x01(\x05\x12\x13\n\x0bpinButtonL1\x18\t \x01(\x05\x12\x13\n\x0bpinButtonR1\x18\n \x01(\x05\x12\x13\n\x0bpinButtonL2\x18\x0b \x01(\x05\x12\x13\n\x0bpinButtonR2\x18\x0c \x01(\x05\x12\x13\n\x0bpinButtonS1\x18\r \x01(\x05\x12\x13\n\x0bpinButtonS2\x18\x0e \x01(\x05\x12\x13\n\x0bpinButtonL3\x18\x0f \x01(\x05\x12\x13\n\x0bpinButtonR3\x18\x10 \x01(\x05\x12\x13\n\x0bpinButtonA1\x18\x11 \x01(\x05\x12\x13\n\x0bpinButtonA2\x18\x12 \x01(\x05\x12\x13\n\x0bpinButtonFn\x18\x13 \x01(\x05\".\n\x0fGpioMappingInfo\x12\x1b\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x0b.GpioAction\"5\n\x0cGpioMappings\x12%\n\x04pins\x18\x01 \x03(\x0b\x32\x10.GpioMappingInfoB\x05\x92?\x02\x10\x1e\"\x93\x02\n\x16\x41lternativePinMappings\x12\x13\n\x0bpinButtonB1\x18\x01 \x01(\x05\x12\x13\n\x0bpinButtonB2\x18\x02 \x01(\x05\x12\x13\n\x0bpinButtonB3\x18\x03 \x01(\x05\x12\x13\n\x0bpinButtonB4\x18\x04 \x01(\x05\x12\x13\n\x0bpinButtonL1\x18\x05 \x01(\x05\x12\x13\n\x0bpinButtonR1\x18\x06 \x01(\x05\x12\x13\n\x0bpinButtonL2\x18\x07 \x01(\x05\x12\x13\n\x0bpinButtonR2\x18\x08 \x01(\x05\x12\x11\n\tpinDpadUp\x18\t \x01(\x05\x12\x13\n\x0bpinDpadDown\x18\n \x01(\x05\x12\x13\n\x0bpinDpadLeft\x18\x0b \x01(\x05\x12\x14\n\x0cpinDpadRight\x18\x0c \x01(\x05\"\x8c\x01\n\x0eProfileOptions\x12J\n deprecatedAlternativePinMappings\x18\x01 \x03(\x0b\x32\x17.AlternativePinMappingsB\x07\x18\x01\x92?\x02\x10\x03\x12.\n\x10gpioMappingsSets\x18\x02 \x03(\x0b\x32\r.GpioMappingsB\x05\x92?\x02\x10\x03\"\x9e\x04\n\x0e\x44isplayOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08i2cBlock\x18\x02 \x01(\x05\x12\x1f\n\x13\x64\x65precatedI2cSDAPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSCLPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x12\n\ni2cAddress\x18\x05 \x01(\x05\x12\x1e\n\x12\x64\x65precatedI2cSpeed\x18\x06 \x01(\x05\x42\x02\x18\x01\x12#\n\x0c\x62uttonLayout\x18\x07 \x01(\x0e\x32\r.ButtonLayout\x12-\n\x11\x62uttonLayoutRight\x18\x08 \x01(\x0e\x32\x12.ButtonLayoutRight\x12=\n\x19\x62uttonLayoutCustomOptions\x18\t \x01(\x0b\x32\x1a.ButtonLayoutCustomOptions\x12\x1f\n\nsplashMode\x18\n \x01(\x0e\x32\x0b.SplashMode\x12#\n\x0csplashChoice\x18\x0b \x01(\x0e\x32\r.SplashChoice\x12\x16\n\x0esplashDuration\x18\x0c \x01(\x05\x12\x1b\n\x0bsplashImage\x18\r \x01(\x0c\x42\x06\x92?\x03\x08\x80\x08\x12\x0c\n\x04size\x18\x0e \x01(\x05\x12\x0c\n\x04\x66lip\x18\x0f \x01(\x05\x12\x0e\n\x06invert\x18\x10 \x01(\x08\x12\x1b\n\x13\x64isplaySaverTimeout\x18\x11 \x01(\x05\x12\x1c\n\x14turnOffWhenSuspended\x18\x12 \x01(\x08\"\xce\x05\n\nLEDOptions\x12\x0f\n\x07\x64\x61taPin\x18\x01 \x01(\x05\x12#\n\tledFormat\x18\x02 \x01(\x0e\x32\x10.LEDFormat_Proto\x12 \n\tledLayout\x18\x03 \x01(\x0e\x32\r.ButtonLayout\x12\x15\n\rledsPerButton\x18\x04 \x01(\r\x12\x19\n\x11\x62rightnessMaximum\x18\x05 \x01(\r\x12\x17\n\x0f\x62rightnessSteps\x18\x06 \x01(\r\x12\x0f\n\x07indexUp\x18\x07 \x01(\x05\x12\x11\n\tindexDown\x18\x08 \x01(\x05\x12\x11\n\tindexLeft\x18\t \x01(\x05\x12\x12\n\nindexRight\x18\n \x01(\x05\x12\x0f\n\x07indexB1\x18\x0b \x01(\x05\x12\x0f\n\x07indexB2\x18\x0c \x01(\x05\x12\x0f\n\x07indexB3\x18\r \x01(\x05\x12\x0f\n\x07indexB4\x18\x0e \x01(\x05\x12\x0f\n\x07indexL1\x18\x0f \x01(\x05\x12\x0f\n\x07indexR1\x18\x10 \x01(\x05\x12\x0f\n\x07indexL2\x18\x11 \x01(\x05\x12\x0f\n\x07indexR2\x18\x12 \x01(\x05\x12\x0f\n\x07indexS1\x18\x13 \x01(\x05\x12\x0f\n\x07indexS2\x18\x14 \x01(\x05\x12\x0f\n\x07indexL3\x18\x15 \x01(\x05\x12\x0f\n\x07indexR3\x18\x16 \x01(\x05\x12\x0f\n\x07indexA1\x18\x17 \x01(\x05\x12\x0f\n\x07indexA2\x18\x18 \x01(\x05\x12\x1b\n\x08pledType\x18\x19 \x01(\x0e\x32\t.PLEDType\x12\x10\n\x08pledPin1\x18\x1a \x01(\x05\x12\x10\n\x08pledPin2\x18\x1b \x01(\x05\x12\x10\n\x08pledPin3\x18\x1c \x01(\x05\x12\x10\n\x08pledPin4\x18\x1d \x01(\x05\x12\x11\n\tpledColor\x18\x1e \x01(\r\x12\x1c\n\x14turnOffWhenSuspended\x18\x1f \x01(\x08\x12\x12\n\npledIndex1\x18 \x01(\x05\x12\x12\n\npledIndex2\x18! \x01(\x05\x12\x12\n\npledIndex3\x18\" \x01(\x05\x12\x12\n\npledIndex4\x18# \x01(\x05\"\xa2\t\n\x16\x41nimationOptions_Proto\x12\x1a\n\x12\x62\x61seAnimationIndex\x18\x01 \x01(\r\x12\x12\n\nbrightness\x18\x02 \x01(\r\x12\x18\n\x10staticColorIndex\x18\x03 \x01(\r\x12\x18\n\x10\x62uttonColorIndex\x18\x04 \x01(\r\x12\x16\n\x0e\x63haseCycleTime\x18\x05 \x01(\x05\x12\x18\n\x10rainbowCycleTime\x18\x06 \x01(\x05\x12\x12\n\nthemeIndex\x18\x07 \x01(\r\x12\x16\n\x0ehasCustomTheme\x18\x08 \x01(\x08\x12\x15\n\rcustomThemeUp\x18\t \x01(\r\x12\x17\n\x0f\x63ustomThemeDown\x18\n \x01(\r\x12\x17\n\x0f\x63ustomThemeLeft\x18\x0b \x01(\r\x12\x18\n\x10\x63ustomThemeRight\x18\x0c \x01(\r\x12\x15\n\rcustomThemeB1\x18\r \x01(\r\x12\x15\n\rcustomThemeB2\x18\x0e \x01(\r\x12\x15\n\rcustomThemeB3\x18\x0f \x01(\r\x12\x15\n\rcustomThemeB4\x18\x10 \x01(\r\x12\x15\n\rcustomThemeL1\x18\x11 \x01(\r\x12\x15\n\rcustomThemeR1\x18\x12 \x01(\r\x12\x15\n\rcustomThemeL2\x18\x13 \x01(\r\x12\x15\n\rcustomThemeR2\x18\x14 \x01(\r\x12\x15\n\rcustomThemeS1\x18\x15 \x01(\r\x12\x15\n\rcustomThemeS2\x18\x16 \x01(\r\x12\x15\n\rcustomThemeL3\x18\x17 \x01(\r\x12\x15\n\rcustomThemeR3\x18\x18 \x01(\r\x12\x15\n\rcustomThemeA1\x18\x19 \x01(\r\x12\x15\n\rcustomThemeA2\x18\x1a \x01(\r\x12\x1c\n\x14\x63ustomThemeUpPressed\x18\x1b \x01(\r\x12\x1e\n\x16\x63ustomThemeDownPressed\x18\x1c \x01(\r\x12\x1e\n\x16\x63ustomThemeLeftPressed\x18\x1d \x01(\r\x12\x1f\n\x17\x63ustomThemeRightPressed\x18\x1e \x01(\r\x12\x1c\n\x14\x63ustomThemeB1Pressed\x18\x1f \x01(\r\x12\x1c\n\x14\x63ustomThemeB2Pressed\x18 \x01(\r\x12\x1c\n\x14\x63ustomThemeB3Pressed\x18! \x01(\r\x12\x1c\n\x14\x63ustomThemeB4Pressed\x18\" \x01(\r\x12\x1c\n\x14\x63ustomThemeL1Pressed\x18# \x01(\r\x12\x1c\n\x14\x63ustomThemeR1Pressed\x18$ \x01(\r\x12\x1c\n\x14\x63ustomThemeL2Pressed\x18% \x01(\r\x12\x1c\n\x14\x63ustomThemeR2Pressed\x18& \x01(\r\x12\x1c\n\x14\x63ustomThemeS1Pressed\x18\' \x01(\r\x12\x1c\n\x14\x63ustomThemeS2Pressed\x18( \x01(\r\x12\x1c\n\x14\x63ustomThemeL3Pressed\x18) \x01(\r\x12\x1c\n\x14\x63ustomThemeR3Pressed\x18* \x01(\r\x12\x1c\n\x14\x63ustomThemeA1Pressed\x18+ \x01(\r\x12\x1c\n\x14\x63ustomThemeA2Pressed\x18, \x01(\r\":\n\x14\x42ootselButtonOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\tbuttonMap\x18\x02 \x01(\r\"C\n\x11OnBoardLedOptions\x12\x1d\n\x04mode\x18\x01 \x01(\x0e\x32\x0f.OnBoardLedMode\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"\xe1\x02\n\rAnalogOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0e\x61nalogAdc1PinX\x18\x02 \x01(\x05\x12\x16\n\x0e\x61nalogAdc1PinY\x18\x03 \x01(\x05\x12\x1a\n\x12\x66orced_circularity\x18\x04 \x01(\x08\x12\x17\n\x0f\x61nalog_deadzone\x18\x05 \x01(\r\x12\x16\n\x0e\x61nalogAdc2PinX\x18\x06 \x01(\x05\x12\x16\n\x0e\x61nalogAdc2PinY\x18\x07 \x01(\x05\x12!\n\x0e\x61nalogAdc1Mode\x18\x08 \x01(\x0e\x32\t.DpadMode\x12!\n\x0e\x61nalogAdc2Mode\x18\t \x01(\x0e\x32\t.DpadMode\x12%\n\x10\x61nalogAdc1Invert\x18\n \x01(\x0e\x32\x0b.InvertMode\x12%\n\x10\x61nalogAdc2Invert\x18\x0b \x01(\x0e\x32\x0b.InvertMode\x12\x16\n\x0e\x61uto_calibrate\x18\x0c \x01(\x08\"\xbe\x03\n\x0cTurboOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\tbuttonPin\x18\x02 \x01(\x05\x12\x0e\n\x06ledPin\x18\x03 \x01(\x05\x12\x11\n\tshotCount\x18\x04 \x01(\r\x12\x14\n\x0cshmupDialPin\x18\x05 \x01(\x05\x12\x18\n\x10shmupModeEnabled\x18\x06 \x01(\x08\x12\x16\n\x0eshmupAlwaysOn1\x18\x07 \x01(\r\x12\x16\n\x0eshmupAlwaysOn2\x18\x08 \x01(\r\x12\x16\n\x0eshmupAlwaysOn3\x18\t \x01(\r\x12\x16\n\x0eshmupAlwaysOn4\x18\n \x01(\r\x12\x14\n\x0cshmupBtn1Pin\x18\x0b \x01(\x05\x12\x14\n\x0cshmupBtn2Pin\x18\x0c \x01(\x05\x12\x14\n\x0cshmupBtn3Pin\x18\r \x01(\x05\x12\x14\n\x0cshmupBtn4Pin\x18\x0e \x01(\x05\x12\x15\n\rshmupBtnMask1\x18\x0f \x01(\r\x12\x15\n\rshmupBtnMask2\x18\x10 \x01(\r\x12\x15\n\rshmupBtnMask3\x18\x11 \x01(\r\x12\x15\n\rshmupBtnMask4\x18\x12 \x01(\r\x12#\n\x0cshmupMixMode\x18\x13 \x01(\x0e\x32\r.ShmupMixMode\"\xdc\x01\n\rSliderOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\"\n\x16\x64\x65precatedPinSliderOne\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\"\n\x16\x64\x65precatedPinSliderTwo\x18\x03 \x01(\x05\x42\x02\x18\x01\x12(\n\x11\x64\x65precatedModeOne\x18\x04 \x01(\x0e\x32\t.DpadModeB\x02\x18\x01\x12(\n\x11\x64\x65precatedModeTwo\x18\x05 \x01(\x0e\x32\t.DpadModeB\x02\x18\x01\x12\x1e\n\x0bmodeDefault\x18\x06 \x01(\x0e\x32\t.DpadMode\"\xd4\x01\n\x11SOCDSliderOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1c\n\x10\x64\x65precatedPinOne\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1c\n\x10\x64\x65precatedPinTwo\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x0bmodeDefault\x18\x04 \x01(\x0e\x32\t.SOCDMode\x12(\n\x11\x64\x65precatedModeOne\x18\x05 \x01(\x0e\x32\t.SOCDModeB\x02\x18\x01\x12(\n\x11\x64\x65precatedModeTwo\x18\x06 \x01(\x0e\x32\t.SOCDModeB\x02\x18\x01\"\x93\x01\n\x0eReverseOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\tbuttonPin\x18\x02 \x01(\x05\x12\x0e\n\x06ledPin\x18\x03 \x01(\x05\x12\x10\n\x08\x61\x63tionUp\x18\x04 \x01(\r\x12\x12\n\nactionDown\x18\x05 \x01(\r\x12\x12\n\nactionLeft\x18\x06 \x01(\r\x12\x13\n\x0b\x61\x63tionRight\x18\x07 \x01(\r\"\xaf\x01\n\x14\x41nalogADS1219Options\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08i2cBlock\x18\x02 \x01(\x05\x12\x1f\n\x13\x64\x65precatedI2cSDAPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSCLPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x12\n\ni2cAddress\x18\x05 \x01(\x05\x12\x1e\n\x12\x64\x65precatedI2cSpeed\x18\x06 \x01(\x05\x42\x02\x18\x01\"\xeb\x01\n\x16\x44ualDirectionalOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x0f\x64\x65precatedUpPin\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1d\n\x11\x64\x65precatedDownPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1d\n\x11\x64\x65precatedLeftPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedRightPin\x18\x05 \x01(\x05\x42\x02\x18\x01\x12\x1b\n\x08\x64padMode\x18\x06 \x01(\x0e\x32\t.DpadMode\x12\x13\n\x0b\x63ombineMode\x18\x07 \x01(\r\x12\x13\n\x0b\x66ourWayMode\x18\x08 \x01(\x08\"\xd8\x04\n\x0bTiltOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08tilt1Pin\x18\x02 \x01(\x05\x12\x10\n\x08tilt2Pin\x18\x03 \x01(\x05\x12%\n\x19\x64\x65precatedTiltFunctionPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x1b\n\x13tiltLeftAnalogUpPin\x18\x05 \x01(\x05\x12\x1d\n\x15tiltLeftAnalogDownPin\x18\x06 \x01(\x05\x12\x1d\n\x15tiltLeftAnalogLeftPin\x18\x07 \x01(\x05\x12\x1e\n\x16tiltLeftAnalogRightPin\x18\x08 \x01(\x05\x12\x1c\n\x14tiltRightAnalogUpPin\x18\t \x01(\x05\x12\x1e\n\x16tiltRightAnalogDownPin\x18\n \x01(\x05\x12\x1e\n\x16tiltRightAnalogLeftPin\x18\x0b \x01(\x05\x12\x1f\n\x17tiltRightAnalogRightPin\x18\x0c \x01(\x05\x12\x1f\n\x0ctiltSOCDMode\x18\r \x01(\x0e\x32\t.SOCDMode\x12\x18\n\x10\x66\x61\x63torTilt1LeftX\x18\x0e \x01(\x05\x12\x18\n\x10\x66\x61\x63torTilt1LeftY\x18\x0f \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt1RightX\x18\x10 \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt1RightY\x18\x11 \x01(\x05\x12\x18\n\x10\x66\x61\x63torTilt2LeftX\x18\x12 \x01(\x05\x12\x18\n\x10\x66\x61\x63torTilt2LeftY\x18\x13 \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt2RightX\x18\x14 \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt2RightY\x18\x15 \x01(\x05\"=\n\rBuzzerOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x0e\n\x06volume\x18\x03 \x01(\r\"E\n\x12\x45xtraButtonOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x11\n\tbuttonMap\x18\x03 \x01(\r\"6\n\x13PlayerNumberOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0e\n\x06number\x18\x02 \x01(\r\"\x98\x02\n\nPS4Options\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x15\n\x06serial\x18\x02 \x01(\x0c\x42\x05\x92?\x02\x08\x10\x12\x19\n\tsignature\x18\x03 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\x12\x14\n\x04rsaN\x18\x04 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\x12\x13\n\x04rsaE\x18\x05 \x01(\x0c\x42\x05\x92?\x02\x08\x04\x12\x14\n\x04rsaD\x18\x06 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\x12\x14\n\x04rsaP\x18\x07 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x14\n\x04rsaQ\x18\x08 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaDP\x18\t \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaDQ\x18\n \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaQP\x18\x0b \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaRN\x18\x0c \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\"d\n\x14PSPassthroughOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedPinDplus\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1b\n\x0f\x64\x65precatedPin5V\x18\x03 \x01(\x05\x42\x02\x18\x01\"*\n\x17XBOnePassthroughOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xf5\x11\n\nWiiOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08i2cBlock\x18\x02 \x01(\x05\x12\x1f\n\x13\x64\x65precatedI2cSDAPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSCLPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedI2cSpeed\x18\x05 \x01(\x05\x42\x02\x18\x01\x12\x32\n\x0b\x63ontrollers\x18\x06 \x01(\x0b\x32\x1d.WiiOptions.ControllerOptions\x1a\x42\n\nAnalogAxis\x12\x10\n\x08\x61xisType\x18\x01 \x01(\x05\x12\x10\n\x08minRange\x18\x02 \x01(\x05\x12\x10\n\x08maxRange\x18\x03 \x01(\x05\x1aT\n\x0cStickOptions\x12!\n\x01x\x18\x01 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12!\n\x01y\x18\x02 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1a[\n\x0eNunchukOptions\x12\x0f\n\x07\x62uttonC\x18\x01 \x01(\x05\x12\x0f\n\x07\x62uttonZ\x18\x02 \x01(\x05\x12\'\n\x05stick\x18\x03 \x01(\x0b\x32\x18.WiiOptions.StickOptions\x1a\xdc\x03\n\x0e\x43lassicOptions\x12\x0f\n\x07\x62uttonA\x18\x01 \x01(\x05\x12\x0f\n\x07\x62uttonB\x18\x02 \x01(\x05\x12\x0f\n\x07\x62uttonX\x18\x03 \x01(\x05\x12\x0f\n\x07\x62uttonY\x18\x04 \x01(\x05\x12\x0f\n\x07\x62uttonL\x18\x05 \x01(\x05\x12\x10\n\x08\x62uttonZL\x18\x06 \x01(\x05\x12\x0f\n\x07\x62uttonR\x18\x07 \x01(\x05\x12\x10\n\x08\x62uttonZR\x18\x08 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\t \x01(\x05\x12\x12\n\nbuttonPlus\x18\n \x01(\x05\x12\x12\n\nbuttonHome\x18\x0b \x01(\x05\x12\x10\n\x08\x62uttonUp\x18\x0c \x01(\x05\x12\x12\n\nbuttonDown\x18\r \x01(\x05\x12\x12\n\nbuttonLeft\x18\x0e \x01(\x05\x12\x13\n\x0b\x62uttonRight\x18\x0f \x01(\x05\x12,\n\nrightStick\x18\x11 \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12+\n\tleftStick\x18\x10 \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12+\n\x0bleftTrigger\x18\x12 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12,\n\x0crightTrigger\x18\x13 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1al\n\x0cTaikoOptions\x12\x15\n\rbuttonKatLeft\x18\x01 \x01(\x05\x12\x16\n\x0e\x62uttonKatRight\x18\x02 \x01(\x05\x12\x15\n\rbuttonDonLeft\x18\x03 \x01(\x05\x12\x16\n\x0e\x62uttonDonRight\x18\x04 \x01(\x05\x1a\xad\x02\n\rGuitarOptions\x12\x11\n\tbuttonRed\x18\x01 \x01(\x05\x12\x13\n\x0b\x62uttonGreen\x18\x02 \x01(\x05\x12\x14\n\x0c\x62uttonYellow\x18\x03 \x01(\x05\x12\x12\n\nbuttonBlue\x18\x04 \x01(\x05\x12\x14\n\x0c\x62uttonOrange\x18\x05 \x01(\x05\x12\x13\n\x0b\x62uttonPedal\x18\x06 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\x07 \x01(\x05\x12\x12\n\nbuttonPlus\x18\x08 \x01(\x05\x12\x0f\n\x07strumUp\x18\t \x01(\x05\x12\x11\n\tstrumDown\x18\n \x01(\x05\x12\'\n\x05stick\x18\x0b \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12)\n\twhammyBar\x18\x0c \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1a\xdc\x01\n\x0b\x44rumOptions\x12\x11\n\tbuttonRed\x18\x01 \x01(\x05\x12\x13\n\x0b\x62uttonGreen\x18\x02 \x01(\x05\x12\x14\n\x0c\x62uttonYellow\x18\x03 \x01(\x05\x12\x12\n\nbuttonBlue\x18\x04 \x01(\x05\x12\x14\n\x0c\x62uttonOrange\x18\x05 \x01(\x05\x12\x13\n\x0b\x62uttonPedal\x18\x06 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\x07 \x01(\x05\x12\x12\n\nbuttonPlus\x18\x08 \x01(\x05\x12\'\n\x05stick\x18\t \x01(\x0b\x32\x18.WiiOptions.StickOptions\x1a\xbe\x03\n\x10TurntableOptions\x12\x15\n\rbuttonLeftRed\x18\x01 \x01(\x05\x12\x17\n\x0f\x62uttonLeftGreen\x18\x02 \x01(\x05\x12\x16\n\x0e\x62uttonLeftBlue\x18\x03 \x01(\x05\x12\x16\n\x0e\x62uttonRightRed\x18\x04 \x01(\x05\x12\x18\n\x10\x62uttonRightGreen\x18\x05 \x01(\x05\x12\x17\n\x0f\x62uttonRightBlue\x18\x06 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\x07 \x01(\x05\x12\x12\n\nbuttonPlus\x18\x08 \x01(\x05\x12\x16\n\x0e\x62uttonEuphoria\x18\t \x01(\x05\x12\'\n\x05stick\x18\n \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12-\n\rleftTurntable\x18\x0b \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12.\n\x0erightTurntable\x18\x0c \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12\'\n\x07\x65\x66\x66\x65\x63ts\x18\r \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12%\n\x05\x66\x61\x64\x65r\x18\x0e \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1a\x99\x02\n\x11\x43ontrollerOptions\x12+\n\x07nunchuk\x18\x01 \x01(\x0b\x32\x1a.WiiOptions.NunchukOptions\x12+\n\x07\x63lassic\x18\x02 \x01(\x0b\x32\x1a.WiiOptions.ClassicOptions\x12\'\n\x05taiko\x18\x03 \x01(\x0b\x32\x18.WiiOptions.TaikoOptions\x12)\n\x06guitar\x18\x04 \x01(\x0b\x32\x19.WiiOptions.GuitarOptions\x12%\n\x04\x64rum\x18\x05 \x01(\x0b\x32\x17.WiiOptions.DrumOptions\x12/\n\tturntable\x18\x06 \x01(\x0b\x32\x1c.WiiOptions.TurntableOptions\"S\n\x0bSNESOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08\x63lockPin\x18\x02 \x01(\x05\x12\x10\n\x08latchPin\x18\x03 \x01(\x05\x12\x0f\n\x07\x64\x61taPin\x18\x04 \x01(\x05\"\x86\x01\n\x13KeyboardHostOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedPinDplus\x18\x02 \x01(\x05\x42\x02\x18\x01\x12!\n\x07mapping\x18\x03 \x01(\x0b\x32\x10.KeyboardMapping\x12\x1b\n\x0f\x64\x65precatedPin5V\x18\x04 \x01(\x05\x42\x02\x18\x01\"\xae\x01\n\x10\x46ocusModeOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x16\n\x0e\x62uttonLockMask\x18\x03 \x01(\x05\x12\x17\n\x0foledLockEnabled\x18\x04 \x01(\x08\x12\x16\n\x0ergbLockEnabled\x18\x05 \x01(\x08\x12\x19\n\x11\x62uttonLockEnabled\x18\x06 \x01(\x08\x12\x18\n\x10macroLockEnabled\x18\x07 \x01(\x08\"K\n\nMacroInput\x12\x12\n\nbuttonMask\x18\x01 \x01(\r\x12\x10\n\x08\x64uration\x18\x02 \x01(\r\x12\x17\n\x0cwaitDuration\x18\x03 \x01(\r:\x01\x30\"\xa4\x02\n\x05Macro\x12\x1d\n\tmacroType\x18\x01 \x01(\x0e\x32\n.MacroType\x12\x19\n\nmacroLabel\x18\x02 \x01(\tB\x05\x92?\x02p@\x12\'\n\x0bmacroInputs\x18\x03 \x03(\x0b\x32\x0b.MacroInputB\x05\x92?\x02\x10\x1e\x12\x0f\n\x07\x65nabled\x18\x04 \x01(\x08\x12\x1d\n\x15useMacroTriggerButton\x18\x05 \x01(\x08\x12\x1b\n\x0fmacroTriggerPin\x18\x06 \x01(\x05:\x02-1\x12\x1a\n\x12macroTriggerButton\x18\x07 \x01(\r\x12\x17\n\texclusive\x18\x08 \x01(\x08:\x04true\x12\x1b\n\rinterruptible\x18\t \x01(\x08:\x04true\x12\x19\n\nshowFrames\x18\n \x01(\x08:\x05\x66\x61lse\"l\n\x0cMacroOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x1c\n\x14macroBoardLedEnabled\x18\x04 \x01(\x08\x12 \n\tmacroList\x18\x03 \x03(\x0b\x32\x06.MacroB\x05\x92?\x02\x10\x06\"P\n\x13InputHistoryOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0e\n\x06length\x18\x02 \x01(\r\x12\x0b\n\x03\x63ol\x18\x03 \x01(\r\x12\x0b\n\x03row\x18\x04 \x01(\r\"\xfc\x07\n\x0c\x41\x64\x64onOptions\x12\x33\n\x14\x62ootselButtonOptions\x18\x01 \x01(\x0b\x32\x15.BootselButtonOptions\x12-\n\x11onBoardLedOptions\x18\x02 \x01(\x0b\x32\x12.OnBoardLedOptions\x12%\n\ranalogOptions\x18\x03 \x01(\x0b\x32\x0e.AnalogOptions\x12#\n\x0cturboOptions\x18\x04 \x01(\x0b\x32\r.TurboOptions\x12%\n\rsliderOptions\x18\x05 \x01(\x0b\x32\x0e.SliderOptions\x12\'\n\x0ereverseOptions\x18\x06 \x01(\x0b\x32\x0f.ReverseOptions\x12\x33\n\x14\x61nalogADS1219Options\x18\x07 \x01(\x0b\x32\x15.AnalogADS1219Options\x12\x37\n\x16\x64ualDirectionalOptions\x18\x08 \x01(\x0b\x32\x17.DualDirectionalOptions\x12%\n\rbuzzerOptions\x18\t \x01(\x0b\x32\x0e.BuzzerOptions\x12=\n\x1c\x64\x65precatedExtraButtonOptions\x18\n \x01(\x0b\x32\x13.ExtraButtonOptionsB\x02\x18\x01\x12\x31\n\x13playerNumberOptions\x18\x0b \x01(\x0b\x32\x14.PlayerNumberOptions\x12\'\n\nps4Options\x18\x0c \x01(\x0b\x32\x0b.PS4OptionsB\x06\x92?\x03\xf0\x01\x01\x12\x1f\n\nwiiOptions\x18\r \x01(\x0b\x32\x0b.WiiOptions\x12-\n\x11socdSliderOptions\x18\x0e \x01(\x0b\x32\x12.SOCDSliderOptions\x12!\n\x0bsnesOptions\x18\x0f \x01(\x0b\x32\x0c.SNESOptions\x12+\n\x10\x66ocusModeOptions\x18\x10 \x01(\x0b\x32\x11.FocusModeOptions\x12\x31\n\x13keyboardHostOptions\x18\x11 \x01(\x0b\x32\x14.KeyboardHostOptions\x12!\n\x0btiltOptions\x18\x12 \x01(\x0b\x32\x0c.TiltOptions\x12\x33\n\x14psPassthroughOptions\x18\x13 \x01(\x0b\x32\x15.PSPassthroughOptions\x12#\n\x0cmacroOptions\x18\x14 \x01(\x0b\x32\r.MacroOptions\x12\x31\n\x13inputHistoryOptions\x18\x15 \x01(\x0b\x32\x14.InputHistoryOptions\x12\x39\n\x17xbonePassthroughOptions\x18\x16 \x01(\x0b\x32\x18.XBOnePassthroughOptions\"~\n\x10MigrationHistory\x12\x1e\n\x0fhotkeysMigrated\x18\x01 \x01(\x08:\x05\x66\x61lse\x12#\n\x14gpioMappingsMigrated\x18\x02 \x01(\x08:\x05\x66\x61lse\x12%\n\x16\x62uttonProfilesMigrated\x18\x03 \x01(\x08:\x05\x66\x61lse\"\xe4\x04\n\x06\x43onfig\x12\x1b\n\x0c\x62oardVersion\x18\x01 \x01(\tB\x05\x92?\x02p\x1f\x12\'\n\x0egamepadOptions\x18\x02 \x01(\x0b\x32\x0f.GamepadOptions\x12%\n\rhotkeyOptions\x18\x03 \x01(\x0b\x32\x0e.HotkeyOptions\x12/\n\x15\x64\x65precatedPinMappings\x18\x04 \x01(\x0b\x32\x0c.PinMappingsB\x02\x18\x01\x12)\n\x0fkeyboardMapping\x18\x05 \x01(\x0b\x32\x10.KeyboardMapping\x12\'\n\x0e\x64isplayOptions\x18\x06 \x01(\x0b\x32\x0f.DisplayOptions\x12\x1f\n\nledOptions\x18\x07 \x01(\x0b\x32\x0b.LEDOptions\x12\x31\n\x10\x61nimationOptions\x18\x08 \x01(\x0b\x32\x17.AnimationOptions_Proto\x12#\n\x0c\x61\x64\x64onOptions\x18\t \x01(\x0b\x32\r.AddonOptions\x12/\n\x12\x66orcedSetupOptions\x18\n \x01(\x0b\x32\x13.ForcedSetupOptions\x12\'\n\x0eprofileOptions\x18\x0b \x01(\x0b\x32\x0f.ProfileOptions\x12\x1a\n\x0b\x62oardConfig\x18\x0c \x01(\tB\x05\x92?\x02p?\x12#\n\x0cgpioMappings\x18\r \x01(\x0b\x32\r.GpioMappings\x12%\n\nmigrations\x18\x0e \x01(\x0b\x32\x11.MigrationHistory\x12-\n\x11peripheralOptions\x18\x0f \x01(\x0b\x32\x12.PeripheralOptions') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'config_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _GPIOMAPPINGS.fields_by_name['pins']._options = None + _GPIOMAPPINGS.fields_by_name['pins']._serialized_options = b'\222?\002\020\036' + _PROFILEOPTIONS.fields_by_name['deprecatedAlternativePinMappings']._options = None + _PROFILEOPTIONS.fields_by_name['deprecatedAlternativePinMappings']._serialized_options = b'\030\001\222?\002\020\003' + _PROFILEOPTIONS.fields_by_name['gpioMappingsSets']._options = None + _PROFILEOPTIONS.fields_by_name['gpioMappingsSets']._serialized_options = b'\222?\002\020\003' + _DISPLAYOPTIONS.fields_by_name['deprecatedI2cSDAPin']._options = None + _DISPLAYOPTIONS.fields_by_name['deprecatedI2cSDAPin']._serialized_options = b'\030\001' + _DISPLAYOPTIONS.fields_by_name['deprecatedI2cSCLPin']._options = None + _DISPLAYOPTIONS.fields_by_name['deprecatedI2cSCLPin']._serialized_options = b'\030\001' + _DISPLAYOPTIONS.fields_by_name['deprecatedI2cSpeed']._options = None + _DISPLAYOPTIONS.fields_by_name['deprecatedI2cSpeed']._serialized_options = b'\030\001' + _DISPLAYOPTIONS.fields_by_name['splashImage']._options = None + _DISPLAYOPTIONS.fields_by_name['splashImage']._serialized_options = b'\222?\003\010\200\010' + _SLIDEROPTIONS.fields_by_name['deprecatedPinSliderOne']._options = None + _SLIDEROPTIONS.fields_by_name['deprecatedPinSliderOne']._serialized_options = b'\030\001' + _SLIDEROPTIONS.fields_by_name['deprecatedPinSliderTwo']._options = None + _SLIDEROPTIONS.fields_by_name['deprecatedPinSliderTwo']._serialized_options = b'\030\001' + _SLIDEROPTIONS.fields_by_name['deprecatedModeOne']._options = None + _SLIDEROPTIONS.fields_by_name['deprecatedModeOne']._serialized_options = b'\030\001' + _SLIDEROPTIONS.fields_by_name['deprecatedModeTwo']._options = None + _SLIDEROPTIONS.fields_by_name['deprecatedModeTwo']._serialized_options = b'\030\001' + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedPinOne']._options = None + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedPinOne']._serialized_options = b'\030\001' + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedPinTwo']._options = None + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedPinTwo']._serialized_options = b'\030\001' + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedModeOne']._options = None + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedModeOne']._serialized_options = b'\030\001' + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedModeTwo']._options = None + _SOCDSLIDEROPTIONS.fields_by_name['deprecatedModeTwo']._serialized_options = b'\030\001' + _ANALOGADS1219OPTIONS.fields_by_name['deprecatedI2cSDAPin']._options = None + _ANALOGADS1219OPTIONS.fields_by_name['deprecatedI2cSDAPin']._serialized_options = b'\030\001' + _ANALOGADS1219OPTIONS.fields_by_name['deprecatedI2cSCLPin']._options = None + _ANALOGADS1219OPTIONS.fields_by_name['deprecatedI2cSCLPin']._serialized_options = b'\030\001' + _ANALOGADS1219OPTIONS.fields_by_name['deprecatedI2cSpeed']._options = None + _ANALOGADS1219OPTIONS.fields_by_name['deprecatedI2cSpeed']._serialized_options = b'\030\001' + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedUpPin']._options = None + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedUpPin']._serialized_options = b'\030\001' + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedDownPin']._options = None + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedDownPin']._serialized_options = b'\030\001' + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedLeftPin']._options = None + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedLeftPin']._serialized_options = b'\030\001' + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedRightPin']._options = None + _DUALDIRECTIONALOPTIONS.fields_by_name['deprecatedRightPin']._serialized_options = b'\030\001' + _TILTOPTIONS.fields_by_name['deprecatedTiltFunctionPin']._options = None + _TILTOPTIONS.fields_by_name['deprecatedTiltFunctionPin']._serialized_options = b'\030\001' + _PS4OPTIONS.fields_by_name['serial']._options = None + _PS4OPTIONS.fields_by_name['serial']._serialized_options = b'\222?\002\010\020' + _PS4OPTIONS.fields_by_name['signature']._options = None + _PS4OPTIONS.fields_by_name['signature']._serialized_options = b'\222?\003\010\200\002' + _PS4OPTIONS.fields_by_name['rsaN']._options = None + _PS4OPTIONS.fields_by_name['rsaN']._serialized_options = b'\222?\003\010\200\002' + _PS4OPTIONS.fields_by_name['rsaE']._options = None + _PS4OPTIONS.fields_by_name['rsaE']._serialized_options = b'\222?\002\010\004' + _PS4OPTIONS.fields_by_name['rsaD']._options = None + _PS4OPTIONS.fields_by_name['rsaD']._serialized_options = b'\222?\003\010\200\002' + _PS4OPTIONS.fields_by_name['rsaP']._options = None + _PS4OPTIONS.fields_by_name['rsaP']._serialized_options = b'\222?\003\010\200\001' + _PS4OPTIONS.fields_by_name['rsaQ']._options = None + _PS4OPTIONS.fields_by_name['rsaQ']._serialized_options = b'\222?\003\010\200\001' + _PS4OPTIONS.fields_by_name['rsaDP']._options = None + _PS4OPTIONS.fields_by_name['rsaDP']._serialized_options = b'\222?\003\010\200\001' + _PS4OPTIONS.fields_by_name['rsaDQ']._options = None + _PS4OPTIONS.fields_by_name['rsaDQ']._serialized_options = b'\222?\003\010\200\001' + _PS4OPTIONS.fields_by_name['rsaQP']._options = None + _PS4OPTIONS.fields_by_name['rsaQP']._serialized_options = b'\222?\003\010\200\001' + _PS4OPTIONS.fields_by_name['rsaRN']._options = None + _PS4OPTIONS.fields_by_name['rsaRN']._serialized_options = b'\222?\003\010\200\002' + _PSPASSTHROUGHOPTIONS.fields_by_name['deprecatedPinDplus']._options = None + _PSPASSTHROUGHOPTIONS.fields_by_name['deprecatedPinDplus']._serialized_options = b'\030\001' + _PSPASSTHROUGHOPTIONS.fields_by_name['deprecatedPin5V']._options = None + _PSPASSTHROUGHOPTIONS.fields_by_name['deprecatedPin5V']._serialized_options = b'\030\001' + _WIIOPTIONS.fields_by_name['deprecatedI2cSDAPin']._options = None + _WIIOPTIONS.fields_by_name['deprecatedI2cSDAPin']._serialized_options = b'\030\001' + _WIIOPTIONS.fields_by_name['deprecatedI2cSCLPin']._options = None + _WIIOPTIONS.fields_by_name['deprecatedI2cSCLPin']._serialized_options = b'\030\001' + _WIIOPTIONS.fields_by_name['deprecatedI2cSpeed']._options = None + _WIIOPTIONS.fields_by_name['deprecatedI2cSpeed']._serialized_options = b'\030\001' + _KEYBOARDHOSTOPTIONS.fields_by_name['deprecatedPinDplus']._options = None + _KEYBOARDHOSTOPTIONS.fields_by_name['deprecatedPinDplus']._serialized_options = b'\030\001' + _KEYBOARDHOSTOPTIONS.fields_by_name['deprecatedPin5V']._options = None + _KEYBOARDHOSTOPTIONS.fields_by_name['deprecatedPin5V']._serialized_options = b'\030\001' + _MACRO.fields_by_name['macroLabel']._options = None + _MACRO.fields_by_name['macroLabel']._serialized_options = b'\222?\002p@' + _MACRO.fields_by_name['macroInputs']._options = None + _MACRO.fields_by_name['macroInputs']._serialized_options = b'\222?\002\020\036' + _MACROOPTIONS.fields_by_name['macroList']._options = None + _MACROOPTIONS.fields_by_name['macroList']._serialized_options = b'\222?\002\020\006' + _ADDONOPTIONS.fields_by_name['deprecatedExtraButtonOptions']._options = None + _ADDONOPTIONS.fields_by_name['deprecatedExtraButtonOptions']._serialized_options = b'\030\001' + _ADDONOPTIONS.fields_by_name['ps4Options']._options = None + _ADDONOPTIONS.fields_by_name['ps4Options']._serialized_options = b'\222?\003\360\001\001' + _CONFIG.fields_by_name['boardVersion']._options = None + _CONFIG.fields_by_name['boardVersion']._serialized_options = b'\222?\002p\037' + _CONFIG.fields_by_name['deprecatedPinMappings']._options = None + _CONFIG.fields_by_name['deprecatedPinMappings']._serialized_options = b'\030\001' + _CONFIG.fields_by_name['boardConfig']._options = None + _CONFIG.fields_by_name['boardConfig']._serialized_options = b'\222?\002p?' + _GAMEPADOPTIONS._serialized_start=44 + _GAMEPADOPTIONS._serialized_end=546 + _KEYBOARDMAPPING._serialized_start=549 + _KEYBOARDMAPPING._serialized_end=943 + _HOTKEYENTRY._serialized_start=945 + _HOTKEYENTRY._serialized_end=1046 + _HOTKEYOPTIONS._serialized_start=1049 + _HOTKEYOPTIONS._serialized_end=1576 + _PERIPHERALOPTIONS._serialized_start=1579 + _PERIPHERALOPTIONS._serialized_end=2076 + _PERIPHERALOPTIONS_I2COPTIONS._serialized_start=1850 + _PERIPHERALOPTIONS_I2COPTIONS._serialized_end=1920 + _PERIPHERALOPTIONS_SPIOPTIONS._serialized_start=1922 + _PERIPHERALOPTIONS_SPIOPTIONS._serialized_end=2000 + _PERIPHERALOPTIONS_USBOPTIONS._serialized_start=2002 + _PERIPHERALOPTIONS_USBOPTIONS._serialized_end=2076 + _FORCEDSETUPOPTIONS._serialized_start=2078 + _FORCEDSETUPOPTIONS._serialized_end=2130 + _BUTTONLAYOUTPARAMSCOMMON._serialized_start=2132 + _BUTTONLAYOUTPARAMSCOMMON._serialized_end=2235 + _BUTTONLAYOUTPARAMSLEFT._serialized_start=2237 + _BUTTONLAYOUTPARAMSLEFT._serialized_end=2335 + _BUTTONLAYOUTPARAMSRIGHT._serialized_start=2337 + _BUTTONLAYOUTPARAMSRIGHT._serialized_end=2441 + _BUTTONLAYOUTCUSTOMOPTIONS._serialized_start=2443 + _BUTTONLAYOUTCUSTOMOPTIONS._serialized_end=2562 + _PINMAPPINGS._serialized_start=2565 + _PINMAPPINGS._serialized_end=2976 + _GPIOMAPPINGINFO._serialized_start=2978 + _GPIOMAPPINGINFO._serialized_end=3024 + _GPIOMAPPINGS._serialized_start=3026 + _GPIOMAPPINGS._serialized_end=3079 + _ALTERNATIVEPINMAPPINGS._serialized_start=3082 + _ALTERNATIVEPINMAPPINGS._serialized_end=3357 + _PROFILEOPTIONS._serialized_start=3360 + _PROFILEOPTIONS._serialized_end=3500 + _DISPLAYOPTIONS._serialized_start=3503 + _DISPLAYOPTIONS._serialized_end=4045 + _LEDOPTIONS._serialized_start=4048 + _LEDOPTIONS._serialized_end=4766 + _ANIMATIONOPTIONS_PROTO._serialized_start=4769 + _ANIMATIONOPTIONS_PROTO._serialized_end=5955 + _BOOTSELBUTTONOPTIONS._serialized_start=5957 + _BOOTSELBUTTONOPTIONS._serialized_end=6015 + _ONBOARDLEDOPTIONS._serialized_start=6017 + _ONBOARDLEDOPTIONS._serialized_end=6084 + _ANALOGOPTIONS._serialized_start=6087 + _ANALOGOPTIONS._serialized_end=6440 + _TURBOOPTIONS._serialized_start=6443 + _TURBOOPTIONS._serialized_end=6889 + _SLIDEROPTIONS._serialized_start=6892 + _SLIDEROPTIONS._serialized_end=7112 + _SOCDSLIDEROPTIONS._serialized_start=7115 + _SOCDSLIDEROPTIONS._serialized_end=7327 + _REVERSEOPTIONS._serialized_start=7330 + _REVERSEOPTIONS._serialized_end=7477 + _ANALOGADS1219OPTIONS._serialized_start=7480 + _ANALOGADS1219OPTIONS._serialized_end=7655 + _DUALDIRECTIONALOPTIONS._serialized_start=7658 + _DUALDIRECTIONALOPTIONS._serialized_end=7893 + _TILTOPTIONS._serialized_start=7896 + _TILTOPTIONS._serialized_end=8496 + _BUZZEROPTIONS._serialized_start=8498 + _BUZZEROPTIONS._serialized_end=8559 + _EXTRABUTTONOPTIONS._serialized_start=8561 + _EXTRABUTTONOPTIONS._serialized_end=8630 + _PLAYERNUMBEROPTIONS._serialized_start=8632 + _PLAYERNUMBEROPTIONS._serialized_end=8686 + _PS4OPTIONS._serialized_start=8689 + _PS4OPTIONS._serialized_end=8969 + _PSPASSTHROUGHOPTIONS._serialized_start=8971 + _PSPASSTHROUGHOPTIONS._serialized_end=9071 + _XBONEPASSTHROUGHOPTIONS._serialized_start=9073 + _XBONEPASSTHROUGHOPTIONS._serialized_end=9115 + _WIIOPTIONS._serialized_start=9118 + _WIIOPTIONS._serialized_end=11411 + _WIIOPTIONS_ANALOGAXIS._serialized_start=9317 + _WIIOPTIONS_ANALOGAXIS._serialized_end=9383 + _WIIOPTIONS_STICKOPTIONS._serialized_start=9385 + _WIIOPTIONS_STICKOPTIONS._serialized_end=9469 + _WIIOPTIONS_NUNCHUKOPTIONS._serialized_start=9471 + _WIIOPTIONS_NUNCHUKOPTIONS._serialized_end=9562 + _WIIOPTIONS_CLASSICOPTIONS._serialized_start=9565 + _WIIOPTIONS_CLASSICOPTIONS._serialized_end=10041 + _WIIOPTIONS_TAIKOOPTIONS._serialized_start=10043 + _WIIOPTIONS_TAIKOOPTIONS._serialized_end=10151 + _WIIOPTIONS_GUITAROPTIONS._serialized_start=10154 + _WIIOPTIONS_GUITAROPTIONS._serialized_end=10455 + _WIIOPTIONS_DRUMOPTIONS._serialized_start=10458 + _WIIOPTIONS_DRUMOPTIONS._serialized_end=10678 + _WIIOPTIONS_TURNTABLEOPTIONS._serialized_start=10681 + _WIIOPTIONS_TURNTABLEOPTIONS._serialized_end=11127 + _WIIOPTIONS_CONTROLLEROPTIONS._serialized_start=11130 + _WIIOPTIONS_CONTROLLEROPTIONS._serialized_end=11411 + _SNESOPTIONS._serialized_start=11413 + _SNESOPTIONS._serialized_end=11496 + _KEYBOARDHOSTOPTIONS._serialized_start=11499 + _KEYBOARDHOSTOPTIONS._serialized_end=11633 + _FOCUSMODEOPTIONS._serialized_start=11636 + _FOCUSMODEOPTIONS._serialized_end=11810 + _MACROINPUT._serialized_start=11812 + _MACROINPUT._serialized_end=11887 + _MACRO._serialized_start=11890 + _MACRO._serialized_end=12182 + _MACROOPTIONS._serialized_start=12184 + _MACROOPTIONS._serialized_end=12292 + _INPUTHISTORYOPTIONS._serialized_start=12294 + _INPUTHISTORYOPTIONS._serialized_end=12374 + _ADDONOPTIONS._serialized_start=12377 + _ADDONOPTIONS._serialized_end=13397 + _MIGRATIONHISTORY._serialized_start=13399 + _MIGRATIONHISTORY._serialized_end=13525 + _CONFIG._serialized_start=13528 + _CONFIG._serialized_end=14140 +# @@protoc_insertion_point(module_scope) diff --git a/gp2040ce_bintools/proto_snapshot/enums.proto b/gp2040ce_bintools/proto_snapshot/enums.proto new file mode 100644 index 0000000..1c4efbf --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/enums.proto @@ -0,0 +1,266 @@ +syntax = "proto2"; + +import "nanopb.proto"; + +enum ButtonLayout +{ + option (nanopb_enumopt).long_names = false; + + BUTTON_LAYOUT_STICK = 0; + BUTTON_LAYOUT_STICKLESS = 1; + BUTTON_LAYOUT_BUTTONS_ANGLED = 2; + BUTTON_LAYOUT_BUTTONS_BASIC = 3; + BUTTON_LAYOUT_KEYBOARD_ANGLED = 4; + BUTTON_LAYOUT_KEYBOARDA = 5; + BUTTON_LAYOUT_DANCEPADA = 6; + BUTTON_LAYOUT_TWINSTICKA = 7; + BUTTON_LAYOUT_BLANKA = 8; + BUTTON_LAYOUT_VLXA = 9; + BUTTON_LAYOUT_FIGHTBOARD_STICK = 10; + BUTTON_LAYOUT_FIGHTBOARD_MIRRORED = 11; + BUTTON_LAYOUT_CUSTOMA = 12; + BUTTON_LAYOUT_OPENCORE0WASDA = 13; +} + +enum ButtonLayoutRight +{ + option (nanopb_enumopt).long_names = false; + + BUTTON_LAYOUT_ARCADE = 0; + BUTTON_LAYOUT_STICKLESSB = 1; + BUTTON_LAYOUT_BUTTONS_ANGLEDB = 2; + BUTTON_LAYOUT_VEWLIX = 3; + BUTTON_LAYOUT_VEWLIX7 = 4; + BUTTON_LAYOUT_CAPCOM = 5; + BUTTON_LAYOUT_CAPCOM6 = 6; + BUTTON_LAYOUT_SEGA2P = 7; + BUTTON_LAYOUT_NOIR8 = 8; + BUTTON_LAYOUT_KEYBOARDB = 9; + BUTTON_LAYOUT_DANCEPADB = 10; + BUTTON_LAYOUT_TWINSTICKB = 11; + BUTTON_LAYOUT_BLANKB = 12; + BUTTON_LAYOUT_VLXB = 13; + BUTTON_LAYOUT_FIGHTBOARD = 14; + BUTTON_LAYOUT_FIGHTBOARD_STICK_MIRRORED = 15; + BUTTON_LAYOUT_CUSTOMB = 16; + BUTTON_LAYOUT_KEYBOARD8B = 17; + BUTTON_LAYOUT_OPENCORE0WASDB = 18; +} + +enum SplashMode +{ + option (nanopb_enumopt).long_names = false; + + SPLASH_MODE_STATIC = 0; + SPLASH_MODE_CLOSEIN = 1; + SPLASH_MODE_CLOSEINCUSTOM = 2; + SPLASH_MODE_NONE = 3; +} + +enum SplashChoice +{ + option (nanopb_enumopt).long_names = false; + + SPLASH_CHOICE_MAIN = 0; + SPLASH_CHOICE_X = 1; + SPLASH_CHOICE_Y = 2; + SPLASH_CHOICE_Z = 3; + SPLASH_CHOICE_CUSTOM = 4; + SPLASH_CHOICE_LEGACY = 5; +} + +enum OnBoardLedMode +{ + option (nanopb_enumopt).long_names = false; + + ON_BOARD_LED_MODE_OFF = 0; + ON_BOARD_LED_MODE_MODE_INDICATOR = 1; + ON_BOARD_LED_MODE_INPUT_TEST = 2; + ON_BOARD_LED_MODE_PS_AUTH = 3; +} + +enum InputMode +{ + option (nanopb_enumopt).long_names = false; + + INPUT_MODE_XINPUT = 0; + INPUT_MODE_SWITCH = 1; + INPUT_MODE_HID = 2; + INPUT_MODE_KEYBOARD = 3; + INPUT_MODE_PS4 = 4; + INPUT_MODE_XBONE = 5; + INPUT_MODE_MDMINI = 6; + INPUT_MODE_NEOGEO = 7; + INPUT_MODE_PCEMINI = 8; + INPUT_MODE_EGRET = 9; + INPUT_MODE_ASTRO = 10; + INPUT_MODE_PSCLASSIC = 11; + INPUT_MODE_XBOXORIGINAL = 12; + INPUT_MODE_CONFIG = 255; +} + +enum DpadMode +{ + option (nanopb_enumopt).long_names = false; + + DPAD_MODE_DIGITAL = 0; + DPAD_MODE_LEFT_ANALOG = 1; + DPAD_MODE_RIGHT_ANALOG = 2; +} + +enum InvertMode +{ + option (nanopb_enumopt).long_names = false; + + INVERT_NONE = 0; + INVERT_X = 1; + INVERT_Y = 2; + INVERT_XY = 3; +} + +enum SOCDMode +{ + option (nanopb_enumopt).long_names = false; + + SOCD_MODE_UP_PRIORITY = 0; // U+D=U, L+R=N + SOCD_MODE_NEUTRAL = 1; // U+D=N, L+R=N + SOCD_MODE_SECOND_INPUT_PRIORITY = 2; // U>D=D, L>R=R (Last Input Priority, aka Last Win) + SOCD_MODE_FIRST_INPUT_PRIORITY = 3; // U>D=U, L>R=L (First Input Priority, aka First Win) + SOCD_MODE_BYPASS = 4; // U+D=UD, L+R=LR (No cleaning applied) +} + +enum GpioAction +{ + option (nanopb_enumopt).long_names = false; + + // the lowest value is the default, which should be NONE; + // reserving some numbers in case we need more not-mapped type values + NONE = -10; + RESERVED = -5; + ASSIGNED_TO_ADDON = 0; + BUTTON_PRESS_UP = 1; + BUTTON_PRESS_DOWN = 2; + BUTTON_PRESS_LEFT = 3; + BUTTON_PRESS_RIGHT = 4; + BUTTON_PRESS_B1 = 5; + BUTTON_PRESS_B2 = 6; + BUTTON_PRESS_B3 = 7; + BUTTON_PRESS_B4 = 8; + BUTTON_PRESS_L1 = 9; + BUTTON_PRESS_R1 = 10; + BUTTON_PRESS_L2 = 11; + BUTTON_PRESS_R2 = 12; + BUTTON_PRESS_S1 = 13; + BUTTON_PRESS_S2 = 14; + BUTTON_PRESS_A1 = 15; + BUTTON_PRESS_A2 = 16; + BUTTON_PRESS_L3 = 17; + BUTTON_PRESS_R3 = 18; + BUTTON_PRESS_FN = 19; + BUTTON_PRESS_DDI_UP = 20; + BUTTON_PRESS_DDI_DOWN = 21; + BUTTON_PRESS_DDI_LEFT = 22; + BUTTON_PRESS_DDI_RIGHT = 23; + SUSTAIN_DP_MODE_DP = 24; + SUSTAIN_DP_MODE_LS = 25; + SUSTAIN_DP_MODE_RS = 26; + SUSTAIN_SOCD_MODE_UP_PRIO = 27; + SUSTAIN_SOCD_MODE_NEUTRAL = 28; + SUSTAIN_SOCD_MODE_SECOND_WIN = 29; + SUSTAIN_SOCD_MODE_FIRST_WIN = 30; + SUSTAIN_SOCD_MODE_BYPASS = 31; +} + +enum GamepadHotkey +{ + option (nanopb_enumopt).long_names = false; + + HOTKEY_NONE = 0; + HOTKEY_DPAD_DIGITAL = 1; + HOTKEY_DPAD_LEFT_ANALOG = 2; + HOTKEY_DPAD_RIGHT_ANALOG = 3; + HOTKEY_HOME_BUTTON = 4; + HOTKEY_CAPTURE_BUTTON = 5; + HOTKEY_SOCD_UP_PRIORITY = 6; + HOTKEY_SOCD_NEUTRAL = 7; + HOTKEY_SOCD_LAST_INPUT = 8; + HOTKEY_INVERT_X_AXIS = 9; + HOTKEY_INVERT_Y_AXIS = 10; + HOTKEY_SOCD_FIRST_INPUT = 11; + HOTKEY_SOCD_BYPASS = 12; + HOTKEY_TOGGLE_4_WAY_MODE = 13; + HOTKEY_TOGGLE_DDI_4_WAY_MODE = 14; + HOTKEY_LOAD_PROFILE_1 = 15; + HOTKEY_LOAD_PROFILE_2 = 16; + HOTKEY_LOAD_PROFILE_3 = 17; + HOTKEY_LOAD_PROFILE_4 = 18; + HOTKEY_L3_BUTTON = 19; + HOTKEY_R3_BUTTON = 20; + HOTKEY_TOUCHPAD_BUTTON = 21; + HOTKEY_REBOOT_DEFAULT = 22; + HOTKEY_B1_BUTTON = 23; + HOTKEY_B2_BUTTON = 24; + HOTKEY_B3_BUTTON = 25; + HOTKEY_B4_BUTTON = 26; + HOTKEY_L1_BUTTON = 27; + HOTKEY_R1_BUTTON = 28; + HOTKEY_L2_BUTTON = 29; + HOTKEY_R2_BUTTON = 30; + HOTKEY_S1_BUTTON = 31; + HOTKEY_S2_BUTTON = 32; + HOTKEY_A1_BUTTON = 33; + HOTKEY_A2_BUTTON = 34; +} + +// This has to be kept in sync with LEDFormat in NeoPico.hpp +enum LEDFormat_Proto +{ + LED_FORMAT_GRB = 0; + LED_FORMAT_RGB = 1; + LED_FORMAT_GRBW = 2; + LED_FORMAT_RGBW = 3; +} + +enum ShmupMixMode +{ + option (nanopb_enumopt).long_names = false; + + SHMUP_MIX_MODE_TURBO_PRIORITY = 0; + SHMUP_MIX_MODE_CHARGE_PRIORITY = 1; +} + +enum PLEDType +{ + option (nanopb_enumopt).long_names = false; + + PLED_TYPE_NONE = -1; + PLED_TYPE_PWM = 0; + PLED_TYPE_RGB = 1; +}; + +enum ForcedSetupMode +{ + option (nanopb_enumopt).long_names = false; + + FORCED_SETUP_MODE_OFF = 0; + FORCED_SETUP_MODE_LOCK_MODE_SWITCH = 1; + FORCED_SETUP_MODE_LOCK_WEB_CONFIG = 2; + FORCED_SETUP_MODE_LOCK_BOTH = 3; +}; + +enum PS4ControllerType +{ + option (nanopb_enumopt).long_names = false; + + PS4_CONTROLLER = 0; + PS4_ARCADESTICK = 7; +} + +enum MacroType +{ + option (nanopb_enumopt).long_names = false; + + ON_PRESS = 1; + ON_HOLD_REPEAT = 2; + ON_TOGGLE = 3; +}; diff --git a/gp2040ce_bintools/proto_snapshot/enums_pb2.py b/gp2040ce_bintools/proto_snapshot/enums_pb2.py new file mode 100644 index 0000000..c9aecfd --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/enums_pb2.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: enums.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import nanopb_pb2 as nanopb__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x65nums.proto\x1a\x0cnanopb.proto*\xc3\x03\n\x0c\x42uttonLayout\x12\x17\n\x13\x42UTTON_LAYOUT_STICK\x10\x00\x12\x1b\n\x17\x42UTTON_LAYOUT_STICKLESS\x10\x01\x12 \n\x1c\x42UTTON_LAYOUT_BUTTONS_ANGLED\x10\x02\x12\x1f\n\x1b\x42UTTON_LAYOUT_BUTTONS_BASIC\x10\x03\x12!\n\x1d\x42UTTON_LAYOUT_KEYBOARD_ANGLED\x10\x04\x12\x1b\n\x17\x42UTTON_LAYOUT_KEYBOARDA\x10\x05\x12\x1b\n\x17\x42UTTON_LAYOUT_DANCEPADA\x10\x06\x12\x1c\n\x18\x42UTTON_LAYOUT_TWINSTICKA\x10\x07\x12\x18\n\x14\x42UTTON_LAYOUT_BLANKA\x10\x08\x12\x16\n\x12\x42UTTON_LAYOUT_VLXA\x10\t\x12\"\n\x1e\x42UTTON_LAYOUT_FIGHTBOARD_STICK\x10\n\x12%\n!BUTTON_LAYOUT_FIGHTBOARD_MIRRORED\x10\x0b\x12\x19\n\x15\x42UTTON_LAYOUT_CUSTOMA\x10\x0c\x12 \n\x1c\x42UTTON_LAYOUT_OPENCORE0WASDA\x10\r\x1a\x05\x92?\x02 \x00*\xc2\x04\n\x11\x42uttonLayoutRight\x12\x18\n\x14\x42UTTON_LAYOUT_ARCADE\x10\x00\x12\x1c\n\x18\x42UTTON_LAYOUT_STICKLESSB\x10\x01\x12!\n\x1d\x42UTTON_LAYOUT_BUTTONS_ANGLEDB\x10\x02\x12\x18\n\x14\x42UTTON_LAYOUT_VEWLIX\x10\x03\x12\x19\n\x15\x42UTTON_LAYOUT_VEWLIX7\x10\x04\x12\x18\n\x14\x42UTTON_LAYOUT_CAPCOM\x10\x05\x12\x19\n\x15\x42UTTON_LAYOUT_CAPCOM6\x10\x06\x12\x18\n\x14\x42UTTON_LAYOUT_SEGA2P\x10\x07\x12\x17\n\x13\x42UTTON_LAYOUT_NOIR8\x10\x08\x12\x1b\n\x17\x42UTTON_LAYOUT_KEYBOARDB\x10\t\x12\x1b\n\x17\x42UTTON_LAYOUT_DANCEPADB\x10\n\x12\x1c\n\x18\x42UTTON_LAYOUT_TWINSTICKB\x10\x0b\x12\x18\n\x14\x42UTTON_LAYOUT_BLANKB\x10\x0c\x12\x16\n\x12\x42UTTON_LAYOUT_VLXB\x10\r\x12\x1c\n\x18\x42UTTON_LAYOUT_FIGHTBOARD\x10\x0e\x12+\n\'BUTTON_LAYOUT_FIGHTBOARD_STICK_MIRRORED\x10\x0f\x12\x19\n\x15\x42UTTON_LAYOUT_CUSTOMB\x10\x10\x12\x1c\n\x18\x42UTTON_LAYOUT_KEYBOARD8B\x10\x11\x12 \n\x1c\x42UTTON_LAYOUT_OPENCORE0WASDB\x10\x12\x1a\x05\x92?\x02 \x00*y\n\nSplashMode\x12\x16\n\x12SPLASH_MODE_STATIC\x10\x00\x12\x17\n\x13SPLASH_MODE_CLOSEIN\x10\x01\x12\x1d\n\x19SPLASH_MODE_CLOSEINCUSTOM\x10\x02\x12\x14\n\x10SPLASH_MODE_NONE\x10\x03\x1a\x05\x92?\x02 \x00*\xa0\x01\n\x0cSplashChoice\x12\x16\n\x12SPLASH_CHOICE_MAIN\x10\x00\x12\x13\n\x0fSPLASH_CHOICE_X\x10\x01\x12\x13\n\x0fSPLASH_CHOICE_Y\x10\x02\x12\x13\n\x0fSPLASH_CHOICE_Z\x10\x03\x12\x18\n\x14SPLASH_CHOICE_CUSTOM\x10\x04\x12\x18\n\x14SPLASH_CHOICE_LEGACY\x10\x05\x1a\x05\x92?\x02 \x00*\x99\x01\n\x0eOnBoardLedMode\x12\x19\n\x15ON_BOARD_LED_MODE_OFF\x10\x00\x12$\n ON_BOARD_LED_MODE_MODE_INDICATOR\x10\x01\x12 \n\x1cON_BOARD_LED_MODE_INPUT_TEST\x10\x02\x12\x1d\n\x19ON_BOARD_LED_MODE_PS_AUTH\x10\x03\x1a\x05\x92?\x02 \x00*\xd8\x02\n\tInputMode\x12\x15\n\x11INPUT_MODE_XINPUT\x10\x00\x12\x15\n\x11INPUT_MODE_SWITCH\x10\x01\x12\x12\n\x0eINPUT_MODE_HID\x10\x02\x12\x17\n\x13INPUT_MODE_KEYBOARD\x10\x03\x12\x12\n\x0eINPUT_MODE_PS4\x10\x04\x12\x14\n\x10INPUT_MODE_XBONE\x10\x05\x12\x15\n\x11INPUT_MODE_MDMINI\x10\x06\x12\x15\n\x11INPUT_MODE_NEOGEO\x10\x07\x12\x16\n\x12INPUT_MODE_PCEMINI\x10\x08\x12\x14\n\x10INPUT_MODE_EGRET\x10\t\x12\x14\n\x10INPUT_MODE_ASTRO\x10\n\x12\x18\n\x14INPUT_MODE_PSCLASSIC\x10\x0b\x12\x1b\n\x17INPUT_MODE_XBOXORIGINAL\x10\x0c\x12\x16\n\x11INPUT_MODE_CONFIG\x10\xff\x01\x1a\x05\x92?\x02 \x00*_\n\x08\x44padMode\x12\x15\n\x11\x44PAD_MODE_DIGITAL\x10\x00\x12\x19\n\x15\x44PAD_MODE_LEFT_ANALOG\x10\x01\x12\x1a\n\x16\x44PAD_MODE_RIGHT_ANALOG\x10\x02\x1a\x05\x92?\x02 \x00*O\n\nInvertMode\x12\x0f\n\x0bINVERT_NONE\x10\x00\x12\x0c\n\x08INVERT_X\x10\x01\x12\x0c\n\x08INVERT_Y\x10\x02\x12\r\n\tINVERT_XY\x10\x03\x1a\x05\x92?\x02 \x00*\xa2\x01\n\x08SOCDMode\x12\x19\n\x15SOCD_MODE_UP_PRIORITY\x10\x00\x12\x15\n\x11SOCD_MODE_NEUTRAL\x10\x01\x12#\n\x1fSOCD_MODE_SECOND_INPUT_PRIORITY\x10\x02\x12\"\n\x1eSOCD_MODE_FIRST_INPUT_PRIORITY\x10\x03\x12\x14\n\x10SOCD_MODE_BYPASS\x10\x04\x1a\x05\x92?\x02 \x00*\xbc\x06\n\nGpioAction\x12\x11\n\x04NONE\x10\xf6\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x15\n\x08RESERVED\x10\xfb\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x15\n\x11\x41SSIGNED_TO_ADDON\x10\x00\x12\x13\n\x0f\x42UTTON_PRESS_UP\x10\x01\x12\x15\n\x11\x42UTTON_PRESS_DOWN\x10\x02\x12\x15\n\x11\x42UTTON_PRESS_LEFT\x10\x03\x12\x16\n\x12\x42UTTON_PRESS_RIGHT\x10\x04\x12\x13\n\x0f\x42UTTON_PRESS_B1\x10\x05\x12\x13\n\x0f\x42UTTON_PRESS_B2\x10\x06\x12\x13\n\x0f\x42UTTON_PRESS_B3\x10\x07\x12\x13\n\x0f\x42UTTON_PRESS_B4\x10\x08\x12\x13\n\x0f\x42UTTON_PRESS_L1\x10\t\x12\x13\n\x0f\x42UTTON_PRESS_R1\x10\n\x12\x13\n\x0f\x42UTTON_PRESS_L2\x10\x0b\x12\x13\n\x0f\x42UTTON_PRESS_R2\x10\x0c\x12\x13\n\x0f\x42UTTON_PRESS_S1\x10\r\x12\x13\n\x0f\x42UTTON_PRESS_S2\x10\x0e\x12\x13\n\x0f\x42UTTON_PRESS_A1\x10\x0f\x12\x13\n\x0f\x42UTTON_PRESS_A2\x10\x10\x12\x13\n\x0f\x42UTTON_PRESS_L3\x10\x11\x12\x13\n\x0f\x42UTTON_PRESS_R3\x10\x12\x12\x13\n\x0f\x42UTTON_PRESS_FN\x10\x13\x12\x17\n\x13\x42UTTON_PRESS_DDI_UP\x10\x14\x12\x19\n\x15\x42UTTON_PRESS_DDI_DOWN\x10\x15\x12\x19\n\x15\x42UTTON_PRESS_DDI_LEFT\x10\x16\x12\x1a\n\x16\x42UTTON_PRESS_DDI_RIGHT\x10\x17\x12\x16\n\x12SUSTAIN_DP_MODE_DP\x10\x18\x12\x16\n\x12SUSTAIN_DP_MODE_LS\x10\x19\x12\x16\n\x12SUSTAIN_DP_MODE_RS\x10\x1a\x12\x1d\n\x19SUSTAIN_SOCD_MODE_UP_PRIO\x10\x1b\x12\x1d\n\x19SUSTAIN_SOCD_MODE_NEUTRAL\x10\x1c\x12 \n\x1cSUSTAIN_SOCD_MODE_SECOND_WIN\x10\x1d\x12\x1f\n\x1bSUSTAIN_SOCD_MODE_FIRST_WIN\x10\x1e\x12\x1c\n\x18SUSTAIN_SOCD_MODE_BYPASS\x10\x1f\x1a\x05\x92?\x02 \x00*\x80\x07\n\rGamepadHotkey\x12\x0f\n\x0bHOTKEY_NONE\x10\x00\x12\x17\n\x13HOTKEY_DPAD_DIGITAL\x10\x01\x12\x1b\n\x17HOTKEY_DPAD_LEFT_ANALOG\x10\x02\x12\x1c\n\x18HOTKEY_DPAD_RIGHT_ANALOG\x10\x03\x12\x16\n\x12HOTKEY_HOME_BUTTON\x10\x04\x12\x19\n\x15HOTKEY_CAPTURE_BUTTON\x10\x05\x12\x1b\n\x17HOTKEY_SOCD_UP_PRIORITY\x10\x06\x12\x17\n\x13HOTKEY_SOCD_NEUTRAL\x10\x07\x12\x1a\n\x16HOTKEY_SOCD_LAST_INPUT\x10\x08\x12\x18\n\x14HOTKEY_INVERT_X_AXIS\x10\t\x12\x18\n\x14HOTKEY_INVERT_Y_AXIS\x10\n\x12\x1b\n\x17HOTKEY_SOCD_FIRST_INPUT\x10\x0b\x12\x16\n\x12HOTKEY_SOCD_BYPASS\x10\x0c\x12\x1c\n\x18HOTKEY_TOGGLE_4_WAY_MODE\x10\r\x12 \n\x1cHOTKEY_TOGGLE_DDI_4_WAY_MODE\x10\x0e\x12\x19\n\x15HOTKEY_LOAD_PROFILE_1\x10\x0f\x12\x19\n\x15HOTKEY_LOAD_PROFILE_2\x10\x10\x12\x19\n\x15HOTKEY_LOAD_PROFILE_3\x10\x11\x12\x19\n\x15HOTKEY_LOAD_PROFILE_4\x10\x12\x12\x14\n\x10HOTKEY_L3_BUTTON\x10\x13\x12\x14\n\x10HOTKEY_R3_BUTTON\x10\x14\x12\x1a\n\x16HOTKEY_TOUCHPAD_BUTTON\x10\x15\x12\x19\n\x15HOTKEY_REBOOT_DEFAULT\x10\x16\x12\x14\n\x10HOTKEY_B1_BUTTON\x10\x17\x12\x14\n\x10HOTKEY_B2_BUTTON\x10\x18\x12\x14\n\x10HOTKEY_B3_BUTTON\x10\x19\x12\x14\n\x10HOTKEY_B4_BUTTON\x10\x1a\x12\x14\n\x10HOTKEY_L1_BUTTON\x10\x1b\x12\x14\n\x10HOTKEY_R1_BUTTON\x10\x1c\x12\x14\n\x10HOTKEY_L2_BUTTON\x10\x1d\x12\x14\n\x10HOTKEY_R2_BUTTON\x10\x1e\x12\x14\n\x10HOTKEY_S1_BUTTON\x10\x1f\x12\x14\n\x10HOTKEY_S2_BUTTON\x10 \x12\x14\n\x10HOTKEY_A1_BUTTON\x10!\x12\x14\n\x10HOTKEY_A2_BUTTON\x10\"\x1a\x05\x92?\x02 \x00*c\n\x0fLEDFormat_Proto\x12\x12\n\x0eLED_FORMAT_GRB\x10\x00\x12\x12\n\x0eLED_FORMAT_RGB\x10\x01\x12\x13\n\x0fLED_FORMAT_GRBW\x10\x02\x12\x13\n\x0fLED_FORMAT_RGBW\x10\x03*\\\n\x0cShmupMixMode\x12!\n\x1dSHMUP_MIX_MODE_TURBO_PRIORITY\x10\x00\x12\"\n\x1eSHMUP_MIX_MODE_CHARGE_PRIORITY\x10\x01\x1a\x05\x92?\x02 \x00*T\n\x08PLEDType\x12\x1b\n\x0ePLED_TYPE_NONE\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x11\n\rPLED_TYPE_PWM\x10\x00\x12\x11\n\rPLED_TYPE_RGB\x10\x01\x1a\x05\x92?\x02 \x00*\xa3\x01\n\x0f\x46orcedSetupMode\x12\x19\n\x15\x46ORCED_SETUP_MODE_OFF\x10\x00\x12&\n\"FORCED_SETUP_MODE_LOCK_MODE_SWITCH\x10\x01\x12%\n!FORCED_SETUP_MODE_LOCK_WEB_CONFIG\x10\x02\x12\x1f\n\x1b\x46ORCED_SETUP_MODE_LOCK_BOTH\x10\x03\x1a\x05\x92?\x02 \x00*C\n\x11PS4ControllerType\x12\x12\n\x0ePS4_CONTROLLER\x10\x00\x12\x13\n\x0fPS4_ARCADESTICK\x10\x07\x1a\x05\x92?\x02 \x00*C\n\tMacroType\x12\x0c\n\x08ON_PRESS\x10\x01\x12\x12\n\x0eON_HOLD_REPEAT\x10\x02\x12\r\n\tON_TOGGLE\x10\x03\x1a\x05\x92?\x02 \x00') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'enums_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _BUTTONLAYOUT._options = None + _BUTTONLAYOUT._serialized_options = b'\222?\002 \000' + _BUTTONLAYOUTRIGHT._options = None + _BUTTONLAYOUTRIGHT._serialized_options = b'\222?\002 \000' + _SPLASHMODE._options = None + _SPLASHMODE._serialized_options = b'\222?\002 \000' + _SPLASHCHOICE._options = None + _SPLASHCHOICE._serialized_options = b'\222?\002 \000' + _ONBOARDLEDMODE._options = None + _ONBOARDLEDMODE._serialized_options = b'\222?\002 \000' + _INPUTMODE._options = None + _INPUTMODE._serialized_options = b'\222?\002 \000' + _DPADMODE._options = None + _DPADMODE._serialized_options = b'\222?\002 \000' + _INVERTMODE._options = None + _INVERTMODE._serialized_options = b'\222?\002 \000' + _SOCDMODE._options = None + _SOCDMODE._serialized_options = b'\222?\002 \000' + _GPIOACTION._options = None + _GPIOACTION._serialized_options = b'\222?\002 \000' + _GAMEPADHOTKEY._options = None + _GAMEPADHOTKEY._serialized_options = b'\222?\002 \000' + _SHMUPMIXMODE._options = None + _SHMUPMIXMODE._serialized_options = b'\222?\002 \000' + _PLEDTYPE._options = None + _PLEDTYPE._serialized_options = b'\222?\002 \000' + _FORCEDSETUPMODE._options = None + _FORCEDSETUPMODE._serialized_options = b'\222?\002 \000' + _PS4CONTROLLERTYPE._options = None + _PS4CONTROLLERTYPE._serialized_options = b'\222?\002 \000' + _MACROTYPE._options = None + _MACROTYPE._serialized_options = b'\222?\002 \000' + _BUTTONLAYOUT._serialized_start=30 + _BUTTONLAYOUT._serialized_end=481 + _BUTTONLAYOUTRIGHT._serialized_start=484 + _BUTTONLAYOUTRIGHT._serialized_end=1062 + _SPLASHMODE._serialized_start=1064 + _SPLASHMODE._serialized_end=1185 + _SPLASHCHOICE._serialized_start=1188 + _SPLASHCHOICE._serialized_end=1348 + _ONBOARDLEDMODE._serialized_start=1351 + _ONBOARDLEDMODE._serialized_end=1504 + _INPUTMODE._serialized_start=1507 + _INPUTMODE._serialized_end=1851 + _DPADMODE._serialized_start=1853 + _DPADMODE._serialized_end=1948 + _INVERTMODE._serialized_start=1950 + _INVERTMODE._serialized_end=2029 + _SOCDMODE._serialized_start=2032 + _SOCDMODE._serialized_end=2194 + _GPIOACTION._serialized_start=2197 + _GPIOACTION._serialized_end=3025 + _GAMEPADHOTKEY._serialized_start=3028 + _GAMEPADHOTKEY._serialized_end=3924 + _LEDFORMAT_PROTO._serialized_start=3926 + _LEDFORMAT_PROTO._serialized_end=4025 + _SHMUPMIXMODE._serialized_start=4027 + _SHMUPMIXMODE._serialized_end=4119 + _PLEDTYPE._serialized_start=4121 + _PLEDTYPE._serialized_end=4205 + _FORCEDSETUPMODE._serialized_start=4208 + _FORCEDSETUPMODE._serialized_end=4371 + _PS4CONTROLLERTYPE._serialized_start=4373 + _PS4CONTROLLERTYPE._serialized_end=4440 + _MACROTYPE._serialized_start=4442 + _MACROTYPE._serialized_end=4509 +# @@protoc_insertion_point(module_scope) diff --git a/gp2040ce_bintools/proto_snapshot/nanopb.proto b/gp2040ce_bintools/proto_snapshot/nanopb.proto new file mode 100644 index 0000000..eb62f9f --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/nanopb.proto @@ -0,0 +1,189 @@ +// Custom options for defining: +// - Maximum size of string/bytes +// - Maximum number of elements in array +// +// These are used by nanopb to generate statically allocable structures +// for memory-limited environments. + +syntax = "proto2"; +import "google/protobuf/descriptor.proto"; + +option java_package = "fi.kapsi.koti.jpa.nanopb"; + +enum FieldType { + FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible. + FT_CALLBACK = 1; // Always generate a callback field. + FT_POINTER = 4; // Always generate a dynamically allocated field. + FT_STATIC = 2; // Generate a static field or raise an exception if not possible. + FT_IGNORE = 3; // Ignore the field completely. + FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead +} + +enum IntSize { + IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto + IS_8 = 8; + IS_16 = 16; + IS_32 = 32; + IS_64 = 64; +} + +enum TypenameMangling { + M_NONE = 0; // Default, no typename mangling + M_STRIP_PACKAGE = 1; // Strip current package name + M_FLATTEN = 2; // Only use last path component + M_PACKAGE_INITIALS = 3; // Replace the package name by the initials +} + +enum DescriptorSize { + DS_AUTO = 0; // Select minimal size based on field type + DS_1 = 1; // 1 word; up to 15 byte fields, no arrays + DS_2 = 2; // 2 words; up to 4095 byte fields, 4095 entry arrays + DS_4 = 4; // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays + DS_8 = 8; // 8 words; up to 2^32-1 entry arrays +} + +// This is the inner options message, which basically defines options for +// a field. When it is used in message or file scope, it applies to all +// fields. +message NanoPBOptions { + // Allocated size for 'bytes' and 'string' fields. + // For string fields, this should include the space for null terminator. + optional int32 max_size = 1; + + // Maximum length for 'string' fields. Setting this is equivalent + // to setting max_size to a value of length+1. + optional int32 max_length = 14; + + // Allocated number of entries in arrays ('repeated' fields) + optional int32 max_count = 2; + + // Size of integer fields. Can save some memory if you don't need + // full 32 bits for the value. + optional IntSize int_size = 7 [default = IS_DEFAULT]; + + // Force type of field (callback or static allocation) + optional FieldType type = 3 [default = FT_DEFAULT]; + + // Use long names for enums, i.e. EnumName_EnumValue. + optional bool long_names = 4 [default = true]; + + // Add 'packed' attribute to generated structs. + // Note: this cannot be used on CPUs that break on unaligned + // accesses to variables. + optional bool packed_struct = 5 [default = false]; + + // Add 'packed' attribute to generated enums. + optional bool packed_enum = 10 [default = false]; + + // Skip this message + optional bool skip_message = 6 [default = false]; + + // Generate oneof fields as normal optional fields instead of union. + optional bool no_unions = 8 [default = false]; + + // integer type tag for a message + optional uint32 msgid = 9; + + // decode oneof as anonymous union + optional bool anonymous_oneof = 11 [default = false]; + + // Proto3 singular field does not generate a "has_" flag + optional bool proto3 = 12 [default = false]; + + // Force proto3 messages to have no "has_" flag. + // This was default behavior until nanopb-0.4.0. + optional bool proto3_singular_msgs = 21 [default = false]; + + // Generate an enum->string mapping function (can take up lots of space). + optional bool enum_to_string = 13 [default = false]; + + // Generate bytes arrays with fixed length + optional bool fixed_length = 15 [default = false]; + + // Generate repeated field with fixed count + optional bool fixed_count = 16 [default = false]; + + // Generate message-level callback that is called before decoding submessages. + // This can be used to set callback fields for submsgs inside oneofs. + optional bool submsg_callback = 22 [default = false]; + + // Shorten or remove package names from type names. + // This option applies only on the file level. + optional TypenameMangling mangle_names = 17 [default = M_NONE]; + + // Data type for storage associated with callback fields. + optional string callback_datatype = 18 [default = "pb_callback_t"]; + + // Callback function used for encoding and decoding. + // Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t + // structure. This is still supported, but does not work inside e.g. oneof or pointer + // fields. Instead, a new method allows specifying a per-message callback that + // will be called for all callback fields in a message type. + optional string callback_function = 19 [default = "pb_default_field_callback"]; + + // Select the size of field descriptors. This option has to be defined + // for the whole message, not per-field. Usually automatic selection is + // ok, but if it results in compilation errors you can increase the field + // size here. + optional DescriptorSize descriptorsize = 20 [default = DS_AUTO]; + + // Set default value for has_ fields. + optional bool default_has = 23 [default = false]; + + // Extra files to include in generated `.pb.h` + repeated string include = 24; + + // Automatic includes to exclude from generated `.pb.h` + // Same as nanopb_generator.py command line flag -x. + repeated string exclude = 26; + + // Package name that applies only for nanopb. + optional string package = 25; + + // Override type of the field in generated C code. Only to be used with related field types + optional google.protobuf.FieldDescriptorProto.Type type_override = 27; + + // Due to historical reasons, nanopb orders fields in structs by their tag number + // instead of the order in .proto. Set this to false to keep the .proto order. + // The default value will probably change to false in nanopb-0.5.0. + optional bool sort_by_tag = 28 [default = true]; + + // Set the FT_DEFAULT field conversion strategy. + // A field that can become a static member of a c struct (e.g. int, bool, etc) + // will be a a static field. + // Fields with dynamic length are converted to either a pointer or a callback. + optional FieldType fallback_type = 29 [default = FT_CALLBACK]; + + // GP2040-CE extension + // Marks a field to be excluded when performing export operations (i.e. converting to JSON) + optional bool disallow_export = 30 [default = false]; +} + +// Extensions to protoc 'Descriptor' type in order to define options +// inside a .proto file. +// +// Protocol Buffers extension number registry +// -------------------------------- +// Project: Nanopb +// Contact: Petteri Aimonen +// Web site: http://kapsi.fi/~jpa/nanopb +// Extensions: 1010 (all types) +// -------------------------------- + +extend google.protobuf.FileOptions { + optional NanoPBOptions nanopb_fileopt = 1010; +} + +extend google.protobuf.MessageOptions { + optional NanoPBOptions nanopb_msgopt = 1010; +} + +extend google.protobuf.EnumOptions { + optional NanoPBOptions nanopb_enumopt = 1010; +} + +extend google.protobuf.FieldOptions { + optional NanoPBOptions nanopb = 1010; +} + + diff --git a/gp2040ce_bintools/proto_snapshot/nanopb_pb2.py b/gp2040ce_bintools/proto_snapshot/nanopb_pb2.py new file mode 100644 index 0000000..84f802c --- /dev/null +++ b/gp2040ce_bintools/proto_snapshot/nanopb_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: nanopb.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\xc4\x07\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x12\n\nmax_length\x18\x0e \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12&\n\x08int_size\x18\x07 \x01(\x0e\x32\x08.IntSize:\nIS_DEFAULT\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0bpacked_enum\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0cskip_message\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tno_unions\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\r\n\x05msgid\x18\t \x01(\r\x12\x1e\n\x0f\x61nonymous_oneof\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x15\n\x06proto3\x18\x0c \x01(\x08:\x05\x66\x61lse\x12#\n\x14proto3_singular_msgs\x18\x15 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x0e\x65num_to_string\x18\r \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x66ixed_length\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x66ixed_count\x18\x10 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0fsubmsg_callback\x18\x16 \x01(\x08:\x05\x66\x61lse\x12/\n\x0cmangle_names\x18\x11 \x01(\x0e\x32\x11.TypenameMangling:\x06M_NONE\x12(\n\x11\x63\x61llback_datatype\x18\x12 \x01(\t:\rpb_callback_t\x12\x34\n\x11\x63\x61llback_function\x18\x13 \x01(\t:\x19pb_default_field_callback\x12\x30\n\x0e\x64\x65scriptorsize\x18\x14 \x01(\x0e\x32\x0f.DescriptorSize:\x07\x44S_AUTO\x12\x1a\n\x0b\x64\x65\x66\x61ult_has\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x0f\n\x07include\x18\x18 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x1a \x03(\t\x12\x0f\n\x07package\x18\x19 \x01(\t\x12\x41\n\rtype_override\x18\x1b \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x19\n\x0bsort_by_tag\x18\x1c \x01(\x08:\x04true\x12.\n\rfallback_type\x18\x1d \x01(\x0e\x32\n.FieldType:\x0b\x46T_CALLBACK\x12\x1e\n\x0f\x64isallow_export\x18\x1e \x01(\x08:\x05\x66\x61lse*i\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03\x12\r\n\tFT_INLINE\x10\x05*D\n\x07IntSize\x12\x0e\n\nIS_DEFAULT\x10\x00\x12\x08\n\x04IS_8\x10\x08\x12\t\n\x05IS_16\x10\x10\x12\t\n\x05IS_32\x10 \x12\t\n\x05IS_64\x10@*Z\n\x10TypenameMangling\x12\n\n\x06M_NONE\x10\x00\x12\x13\n\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n\tM_FLATTEN\x10\x02\x12\x16\n\x12M_PACKAGE_INITIALS\x10\x03*E\n\x0e\x44\x65scriptorSize\x12\x0b\n\x07\x44S_AUTO\x10\x00\x12\x08\n\x04\x44S_1\x10\x01\x12\x08\n\x04\x44S_2\x10\x02\x12\x08\n\x04\x44S_4\x10\x04\x12\x08\n\x04\x44S_8\x10\x08:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nanopb_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(nanopb_fileopt) + google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(nanopb_msgopt) + google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(nanopb_enumopt) + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(nanopb) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030fi.kapsi.koti.jpa.nanopb' + _FIELDTYPE._serialized_start=1017 + _FIELDTYPE._serialized_end=1122 + _INTSIZE._serialized_start=1124 + _INTSIZE._serialized_end=1192 + _TYPENAMEMANGLING._serialized_start=1194 + _TYPENAMEMANGLING._serialized_end=1284 + _DESCRIPTORSIZE._serialized_start=1286 + _DESCRIPTORSIZE._serialized_end=1355 + _NANOPBOPTIONS._serialized_start=51 + _NANOPBOPTIONS._serialized_end=1015 +# @@protoc_insertion_point(module_scope) diff --git a/pyproject.toml b/pyproject.toml index 4415b85..d0d174e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ visualize-storage = "gp2040ce_bintools.storage:visualize" [tool.flake8] enable-extensions = "G,M" -exclude = [".tox/", "venv/", "_version.py", "tests/test-files/"] +exclude = [".tox/", "venv/", "_version.py", "tests/test-files/", "config_pb2.py", "enums_pb2.py", "nanopb_pb2.py"] extend-ignore = "T101" max-complexity = 10 max-line-length = 120 @@ -51,6 +51,11 @@ max-line-length = 120 line_length = 120 [tool.mypy] +exclude = [ + "config_pb2.py", + "enums_pb2.py", + "nanopb_pb2.py", +] ignore_missing_imports = true [[tool.mypy.overrides]] diff --git a/tests/test_package.py b/tests/test_package.py index 2068ee1..91138da 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -6,8 +6,6 @@ SPDX-License-Identifier: MIT import os import sys -import pytest - from gp2040ce_bintools import get_config_pb2 HERE = os.path.dirname(os.path.abspath(__file__)) @@ -30,9 +28,10 @@ def test_get_config_pb2_compile(): def test_get_config_pb2_exception(): - """Without any precompiled files or proto files on the path, test we raise an exception.""" - with pytest.raises(ModuleNotFoundError): - _ = get_config_pb2() + """Without any precompiled files or proto files on the path, test we DO NOT raise an exception.""" + # this used to raise ModuleNotFoundError, but with our snapshot included now, + # we should always have a config to import + _ = get_config_pb2() def test_get_config_pb2_precompile(): diff --git a/tests/test_storage.py b/tests/test_storage.py index 797a797..3ed429f 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -69,12 +69,6 @@ def test_config_footer_bad_crc(storage_dump): _, _, _ = storage.get_config_footer(corrupt) -def test_config_fails_without_pb2s(storage_dump): - """Test that we need the config_pb2 to exist/be compiled for reading the config to work.""" - with pytest.raises(ModuleNotFoundError): - _ = storage.get_config(storage_dump) - - @with_pb2s def test_get_config_from_file_storage_dump(): """Test that we can open a storage dump file and find its config.""" diff --git a/tox.ini b/tox.ini index 67ddaf2..94ae89a 100644 --- a/tox.ini +++ b/tox.ini @@ -67,3 +67,4 @@ branch = True omit = **/_version.py + **/proto_snapshot/*