@@ -22,18 +22,17 @@ namespace {
22
22
void user_delay (uint32_t period_us, void * /* intf_ptr*/ ) {
23
23
nrf_delay_us (period_us);
24
24
}
25
- }
26
-
27
- // Scale factors to convert accelerometer counts to milli-g
28
- // from datasheet: https://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf
29
- // The array index to use is stored in accel_conf.range
30
- constexpr int16_t accelScaleFactors[] = {
31
- [BMA4_ACCEL_RANGE_2G] = 1024 , // LSB/g +/- 2g range
32
- [BMA4_ACCEL_RANGE_4G] = 512 , // LSB/g +/- 4g range
33
- [BMA4_ACCEL_RANGE_8G] = 256 , // LSB/g +/- 8g range
34
- [BMA4_ACCEL_RANGE_16G] = 128 // LSB/g +/- 16g range
35
- };
36
25
26
+ // Scale factors to convert accelerometer counts to milli-g
27
+ // from datasheet: https://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf
28
+ // The array index to use is stored in accel_conf.range
29
+ constexpr int16_t accelScaleFactors[] = {
30
+ [BMA4_ACCEL_RANGE_2G] = 1024 , // LSB/g +/- 2g range
31
+ [BMA4_ACCEL_RANGE_4G] = 512 , // LSB/g +/- 4g range
32
+ [BMA4_ACCEL_RANGE_8G] = 256 , // LSB/g +/- 8g range
33
+ [BMA4_ACCEL_RANGE_16G] = 128 // LSB/g +/- 16g range
34
+ };
35
+ }
37
36
38
37
Bma421::Bma421 (TwiMaster& twiMaster, uint8_t twiAddress) : twiMaster {twiMaster}, deviceAddress {twiAddress} {
39
38
bma.intf = BMA4_I2C_INTF;
0 commit comments