Integration of the example code for ilps28qsw
Hello everyone,
I want to connect my pressure sensor (ilps28qsw) and have written the code in C and using I2C. If I use the example code as in the following link, and do nothing else, it works. For example, if I pull the variables (see below) out of this function and make them usable outside of the function (ilps28qsw_read_data_polling()) or want to execute other functions before or after this code, I get an error.
I cannot understand this behavior. If anyone can explain it to me, I would be very grateful.
Example code: https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/ilps28qsw_STdC/examples/ilps28qsw_read_data_polling.c
Variables:
ilps28qsw_all_sources_t all_sources;
ilps28qsw_bus_mode_t bus_mode;
ilps28qsw_stat_t status;
stmdev_ctx_t dev_ctx;
ilps28qsw_id_t id;
ilps28qsw_md_t md;
