Initial support for the x3
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user