hid_firmware_settings.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-3.0-or-later
  3. #pragma once
  4. #include "common/common_types.h"
  5. namespace Service::HID {
  6. /// Loads firmware config from nn::settings::fwdbg
  7. class HidFirmwareSettings {
  8. public:
  9. using FirmwareSetting = std::array<u8, 4>;
  10. using FeaturesPerId = std::array<bool, 0xA8>;
  11. HidFirmwareSettings();
  12. void Reload();
  13. void LoadSettings(bool reload_config);
  14. bool IsDebugPadEnabled();
  15. bool IsDeviceManaged();
  16. bool IsEmulateFutureDevice();
  17. bool IsTouchI2cManaged();
  18. bool IsHandheldForced();
  19. bool IsRailEnabled();
  20. bool IsHardwareErrorEmulated();
  21. bool IsBleDisabled();
  22. bool IsDscaleDisabled();
  23. bool IsTouchAutoUpdateDisabled();
  24. FirmwareSetting GetFirmwareUpdateFailure();
  25. FeaturesPerId FeaturesDisabledPerId();
  26. private:
  27. bool is_initialized{};
  28. // Debug settings
  29. bool is_debug_pad_enabled{};
  30. bool is_device_managed{};
  31. bool is_touch_i2c_managed{};
  32. bool is_future_devices_emulated{};
  33. bool is_mcu_hardware_error_emulated{};
  34. bool is_rail_enabled{};
  35. bool is_firmware_update_failure_emulated{};
  36. bool is_ble_disabled{};
  37. bool is_dscale_disabled{};
  38. bool is_handheld_forced{};
  39. bool is_touch_firmware_auto_update_disabled{};
  40. FirmwareSetting is_firmware_update_failure{};
  41. FeaturesPerId features_per_id_disabled{};
  42. };
  43. } // namespace Service::HID