add a .clang-format file (#9154)

This commit is contained in:
Jorropo
2026-01-03 21:19:24 +01:00
committed by GitHub
parent abab6ce815
commit 0d11331d18
771 changed files with 77752 additions and 83184 deletions

View File

@@ -17,45 +17,43 @@
extern ScanI2C::DeviceAddress accelerometer_found;
// Singleton wrapper for the Sparkfun QMA_6100P_I2C class
class QMA6100PSingleton : public QMA6100P
{
private:
static QMA6100PSingleton *pinstance;
class QMA6100PSingleton : public QMA6100P {
private:
static QMA6100PSingleton *pinstance;
protected:
QMA6100PSingleton();
~QMA6100PSingleton();
protected:
QMA6100PSingleton();
~QMA6100PSingleton();
public:
// Create a singleton instance (not thread safe)
static QMA6100PSingleton *GetInstance();
public:
// Create a singleton instance (not thread safe)
static QMA6100PSingleton *GetInstance();
// Singletons should not be cloneable.
QMA6100PSingleton(QMA6100PSingleton &other) = delete;
// Singletons should not be cloneable.
QMA6100PSingleton(QMA6100PSingleton &other) = delete;
// Singletons should not be assignable.
void operator=(const QMA6100PSingleton &) = delete;
// Singletons should not be assignable.
void operator=(const QMA6100PSingleton &) = delete;
// Initialise the motion sensor singleton for normal operation
bool init(ScanI2C::FoundDevice device);
// Initialise the motion sensor singleton for normal operation
bool init(ScanI2C::FoundDevice device);
// Enable Wake on Motion interrupts (sensor must be initialised first)
bool setWakeOnMotion();
// Enable Wake on Motion interrupts (sensor must be initialised first)
bool setWakeOnMotion();
};
class QMA6100PSensor : public MotionSensor
{
private:
QMA6100PSingleton *sensor = nullptr;
class QMA6100PSensor : public MotionSensor {
private:
QMA6100PSingleton *sensor = nullptr;
public:
explicit QMA6100PSensor(ScanI2C::FoundDevice foundDevice);
public:
explicit QMA6100PSensor(ScanI2C::FoundDevice foundDevice);
// Initialise the motion sensor
virtual bool init() override;
// Initialise the motion sensor
virtual bool init() override;
// Called each time our sensor gets a chance to run
virtual int32_t runOnce() override;
// Called each time our sensor gets a chance to run
virtual int32_t runOnce() override;
};
#endif