Initial support for the x3

This commit is contained in:
Justin Mitchell
2026-02-12 16:16:54 -05:00
parent 0991782fb4
commit cbea838f91
8 changed files with 102 additions and 31 deletions
+13
View File
@@ -23,6 +23,14 @@ class HalGPIO {
InputManager inputMgr;
#endif
public:
enum class DeviceType : uint8_t { X4, X3 };
private:
DeviceType _deviceType = DeviceType::X4;
int _detectAdcValue = 0;
int _batteryPin = BAT_GPIO0;
public:
HalGPIO() = default;
@@ -47,6 +55,11 @@ class HalGPIO {
// Check if USB is connected
bool isUsbConnected() const;
// Device detection helpers
DeviceType getDeviceType() const { return _deviceType; }
int getDetectAdcValue() const { return _detectAdcValue; }
int getBatteryPin() const { return _batteryPin; }
enum class WakeupReason { PowerButton, AfterFlash, AfterUSBPower, Other };
WakeupReason getWakeupReason() const;