From df9685a21c105962e90dbd95133c5a1bcef7886f Mon Sep 17 00:00:00 2001
From: german77 <juangerman-13@hotmail.com>
Date: Wed, 28 Jun 2023 00:20:38 -0600
Subject: input_common: Remove duplicated DriverResult enum

---
 .../helpers/joycon_protocol/generic_functions.h    | 41 ++++++++++++----------
 1 file changed, 23 insertions(+), 18 deletions(-)

(limited to 'src/input_common/helpers/joycon_protocol/generic_functions.h')

diff --git a/src/input_common/helpers/joycon_protocol/generic_functions.h b/src/input_common/helpers/joycon_protocol/generic_functions.h
index 424831e81b..90fcd17f6c 100644
--- a/src/input_common/helpers/joycon_protocol/generic_functions.h
+++ b/src/input_common/helpers/joycon_protocol/generic_functions.h
@@ -11,6 +11,10 @@
 #include "input_common/helpers/joycon_protocol/common_protocol.h"
 #include "input_common/helpers/joycon_protocol/joycon_types.h"
 
+namespace Common::Input {
+enum class DriverResult;
+}
+
 namespace InputCommon::Joycon {
 
 /// Joycon driver functions that easily implemented
@@ -20,34 +24,34 @@ public:
 
     /// Enables passive mode. This mode only sends button data on change. Sticks will return digital
     /// data instead of analog. Motion will be disabled
-    DriverResult EnablePassiveMode();
+    Common::Input::DriverResult EnablePassiveMode();
 
     /// Enables active mode. This mode will return the current status every 5-15ms
-    DriverResult EnableActiveMode();
+    Common::Input::DriverResult EnableActiveMode();
 
     /// Enables or disables the low power mode
-    DriverResult SetLowPowerMode(bool enable);
+    Common::Input::DriverResult SetLowPowerMode(bool enable);
 
     /// Unknown function used by the switch
-    DriverResult TriggersElapsed();
+    Common::Input::DriverResult TriggersElapsed();
 
     /**
      * Sends a request to obtain the joycon firmware and mac from handle
      * @returns controller device info
      */
-    DriverResult GetDeviceInfo(DeviceInfo& controller_type);
+    Common::Input::DriverResult GetDeviceInfo(DeviceInfo& controller_type);
 
     /**
      * Sends a request to obtain the joycon type from handle
      * @returns controller type of the joycon
      */
-    DriverResult GetControllerType(ControllerType& controller_type);
+    Common::Input::DriverResult GetControllerType(ControllerType& controller_type);
 
     /**
      * Enables motion input
      * @param enable if true motion data will be enabled
      */
-    DriverResult EnableImu(bool enable);
+    Common::Input::DriverResult EnableImu(bool enable);
 
     /**
      * Configures the motion sensor with the specified parameters
@@ -56,59 +60,60 @@ public:
      * @param asen accelerometer sensitivity in G force
      * @param afrec accelerometer frequency in hertz
      */
-    DriverResult SetImuConfig(GyroSensitivity gsen, GyroPerformance gfrec,
-                              AccelerometerSensitivity asen, AccelerometerPerformance afrec);
+    Common::Input::DriverResult SetImuConfig(GyroSensitivity gsen, GyroPerformance gfrec,
+                                             AccelerometerSensitivity asen,
+                                             AccelerometerPerformance afrec);
 
     /**
      * Request battery level from the device
      * @returns battery level
      */
-    DriverResult GetBattery(u32& battery_level);
+    Common::Input::DriverResult GetBattery(u32& battery_level);
 
     /**
      * Request joycon colors from the device
      * @returns colors of the body and buttons
      */
-    DriverResult GetColor(Color& color);
+    Common::Input::DriverResult GetColor(Color& color);
 
     /**
      * Request joycon serial number from the device
      * @returns 16 byte serial number
      */
-    DriverResult GetSerialNumber(SerialNumber& serial_number);
+    Common::Input::DriverResult GetSerialNumber(SerialNumber& serial_number);
 
     /**
      * Request joycon serial number from the device
      * @returns 16 byte serial number
      */
-    DriverResult GetTemperature(u32& temperature);
+    Common::Input::DriverResult GetTemperature(u32& temperature);
 
     /**
      * Request joycon serial number from the device
      * @returns 16 byte serial number
      */
-    DriverResult GetVersionNumber(FirmwareVersion& version);
+    Common::Input::DriverResult GetVersionNumber(FirmwareVersion& version);
 
     /**
      * Sets home led behaviour
      */
-    DriverResult SetHomeLight();
+    Common::Input::DriverResult SetHomeLight();
 
     /**
      * Sets home led into a slow breathing state
      */
-    DriverResult SetLedBusy();
+    Common::Input::DriverResult SetLedBusy();
 
     /**
      * Sets the 4 player leds on the joycon on a solid state
      * @params bit flag containing the led state
      */
-    DriverResult SetLedPattern(u8 leds);
+    Common::Input::DriverResult SetLedPattern(u8 leds);
 
     /**
      * Sets the 4 player leds on the joycon on a blinking state
      * @returns bit flag containing the led state
      */
-    DriverResult SetLedBlinkPattern(u8 leds);
+    Common::Input::DriverResult SetLedBlinkPattern(u8 leds);
 };
 } // namespace InputCommon::Joycon
-- 
cgit v1.2.3-70-g09d2