aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/Bma421.h
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-06-19 20:27:59 +0200
committerGitHub <noreply@github.com>2021-06-19 20:27:59 +0200
commitc6dca25b9fa30af989baf748f6c32b38eaa95bac (patch)
tree587308fdb9d1bfd7e19a6232316891f196163413 /src/drivers/Bma421.h
parente90e8c7426f9a44e696b208a5b393a60476a3d43 (diff)
Add support for BMA425 acceleration sensor. (#440)
* Add support for BMA425 acceleration sensor.
Diffstat (limited to 'src/drivers/Bma421.h')
-rw-r--r--src/drivers/Bma421.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/Bma421.h b/src/drivers/Bma421.h
index e4d925f5..ace644bd 100644
--- a/src/drivers/Bma421.h
+++ b/src/drivers/Bma421.h
@@ -6,6 +6,11 @@ namespace Pinetime {
class TwiMaster;
class Bma421 {
public:
+ enum class DeviceTypes : uint8_t {
+ Unknown,
+ BMA421,
+ BMA425
+ };
struct Values {
uint32_t steps;
int16_t x;
@@ -29,6 +34,7 @@ namespace Pinetime {
void Write(uint8_t registerAddress, const uint8_t* data, size_t size);
bool IsOk() const;
+ DeviceTypes DeviceType() const;
private:
void Reset();
@@ -38,6 +44,7 @@ namespace Pinetime {
struct bma4_dev bma;
bool isOk = false;
bool isResetOk = false;
+ DeviceTypes deviceType = DeviceTypes::Unknown;
};
}
} \ No newline at end of file