2025-03-09 6:03 AM - edited 2025-03-09 9:27 AM
Hi,
I am trying to use command line to compile self test of lsm6dsm by the following:
arm-linux-gnueabi-gcc -static lsm6dsm_self_test.c lsm6dsm_reg.c -o self test -I.
and got error:
lsm6dsm_self_test.c:159:21: error: ‘SENSOR_BUS’ undeclared (first use in this function)
I couldn't find how to define SENSOR_BUS.
I have tried:
extern SPI_HandleTypeDef hspi1;
#define SENSOR_BUS hspi1
The device is connected using SPI.
Regards.