Handle return code from BMA driver, and set a flag is the initialization fails. This allows to boot InfiniTime even if the device cannot initialize.
This commit is contained in:
@@ -25,12 +25,13 @@ namespace Pinetime {
|
||||
void Read(uint8_t registerAddress, uint8_t *buffer, size_t size);
|
||||
void Write(uint8_t registerAddress, const uint8_t *data, size_t size);
|
||||
|
||||
bool IsOk() const;
|
||||
|
||||
private:
|
||||
TwiMaster& twiMaster;
|
||||
uint8_t deviceAddress = 0x18;
|
||||
|
||||
|
||||
struct bma4_dev bma;
|
||||
bool isOk = false;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user