Skip to content

Commit cb5e7e4

Browse files
authored
Update LIS2MDLSensor.h
Signed-off-by: Carlo Parata <carlo.parata@st.com>
1 parent 42579b1 commit cb5e7e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/LIS2MDLSensor.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@
4949
#include "lis2mdl_reg.h"
5050

5151
/* Defines -------------------------------------------------------------------*/
52-
52+
/* For compatibility with ESP32 platforms */
53+
#ifdef ESP32
54+
#ifndef MSBFIRST
55+
#define MSBFIRST SPI_MSBFIRST
56+
#endif
57+
#endif
5358

5459
#define LIS2MDL_MAG_SENSITIVITY_FS_50GAUSS 1.500f /**< Sensitivity value for 50 gauss full scale [mgauss/LSB] */
5560

0 commit comments

Comments
 (0)