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:
Jean-François Milants
2021-04-02 16:56:14 +02:00
parent c7cc47ae30
commit 52a90288fd
7 changed files with 33 additions and 15 deletions

View File

@@ -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;
};
}
}