diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-04-01 19:18:59 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-04-04 13:56:11 (GMT) |
| commit | c7cc47ae306b8012c196587f156519b0773aef93 (patch) | |
| tree | 72df182a16b1636a72009275119dff6f3494d258 /src/drivers/Bma421.h | |
| parent | 19b53545d42f343668a340f24616f153866051a1 (diff) | |
Code cleaning in BMA421 driver. Do the axis inversion in the driver and not in the application.
NOTE: Axis remapping from the SDK do not apply to the "raw" X/Y/Z values returned to the sensor. According to the doc, the remapping is only applied to features, but I cannot check if it has any effect on step counting (I'm not sure I use it correctly, doc is not complete enough about this feature).
Diffstat (limited to 'src/drivers/Bma421.h')
| -rw-r--r-- | src/drivers/Bma421.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/drivers/Bma421.h b/src/drivers/Bma421.h index bcc06b1..fbb190a 100644 --- a/src/drivers/Bma421.h +++ b/src/drivers/Bma421.h @@ -25,19 +25,12 @@ 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); - void OnIrq(); - - uint32_t GetNbInterrupts() const {return nbInterrupts;} - private: TwiMaster& twiMaster; - uint8_t twiAddress; + uint8_t deviceAddress = 0x18; - struct bma4_dev bma; - struct bma4_accel_config accel_conf; - static constexpr uint8_t deviceAddress = 0x18; - uint32_t nbInterrupts = 0; + struct bma4_dev bma; }; } }
\ No newline at end of file |
