Skip to content

Commit f9b9fea

Browse files
committed
Fix compilation issue on ESP32 platforms
1 parent 5f1500b commit f9b9fea

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=STM32duino LSM6DSOX
2-
version=2.3.3
2+
version=2.3.4
33
author=SRA
44
maintainer=stm32duino
55
sentence=Ultra Low Power inertial measurement unit.

src/LSM6DSOXSensor.h

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
#include "lsm6dsox_reg.h"
5151

5252
/* Defines -------------------------------------------------------------------*/
53+
/* For compatibility with ESP32 platforms */
54+
#ifdef ESP32
55+
#ifndef MSBFIRST
56+
#define MSBFIRST SPI_MSBFIRST
57+
#endif
58+
#endif
5359

5460
#define LSM6DSOX_ACC_SENSITIVITY_FS_2G 0.061f
5561
#define LSM6DSOX_ACC_SENSITIVITY_FS_4G 0.122f

src/lsm6dsox_reg.c

+1
Original file line numberDiff line numberDiff line change
@@ -10504,6 +10504,7 @@ int32_t lsm6dsox_mode_set(lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx,
1050410504
/* FIXME: Remove warnings with STM32CubeIDE */
1050510505
ctrl3_c.not_used_01 = 0;
1050610506
ctrl4_c.not_used_01 = 0;
10507+
spi2_ctrl2_ois.not_used_01 = 0;
1050710508

1050810509
/* reading input configuration */
1050910510
xl_hm_mode = ( (uint8_t)val->ui.xl.odr & 0x10U ) >> 4;

0 commit comments

Comments
 (0)