2020-10-14 07:11 AM
Hi! My name is Vincenzo,
I would like to know how to include the driver for VL53L1 inside an application for F401RE.
Up to now I have used the X-CUBE-53L1A2 which helped me to easily implement the driver using the structure of this software as a reference, but now, I would like to learn to include the API for VL53L1 starting from the bare driver.
I place this problem in the community, because until now, my attempts have ended in an error message concerning the windows.h header
I also encountered this error when trying to include the driver for VL53L3CX, and also in this case i used the X-CUBE software for VL53L3CX.
Moreover, in the community also I run into something similar to my problem:
How can I fix this windows.h file issue?
NOTE: i'm using STM32CubeIDE or SW4STM32
Thanks in advance for your support!
Vincenzo
Solved! Go to Solution.
2020-10-23 12:27 AM
Hi,
The API comes with vl53l1cb_platform.c and vl53l1cb_platform.h you have to customize. In the case of bare driver, it is already customized with features you don't really need, included this window.h (for debug purpose it seems). I faced the same problem and I switched to the API I took from expasion board example like you did with the STSW-IMG019 to make it work. This API is customized to fit STM32F4 application, so it works well
2020-10-19 07:51 AM
UPDATE:
I also observed that the platform part of the X-CUBE-53L1A2 (X-CUBE-53L3A2) software and the platform part of the baredriver STSW-IMG019 (STSW-IMG015) are different. Now I ask myself, Are the two platform parts really different? If so, what changes?
Why by including the driver as in the case of X-CUBE-53L3A2 the compilation ends successfully, while including it in the form of a bare driver I go into error?
What is the role of the windows.h header in bare driver?
Thanks in advance for your support,
Vincenzo
2020-10-23 12:27 AM
Hi,
The API comes with vl53l1cb_platform.c and vl53l1cb_platform.h you have to customize. In the case of bare driver, it is already customized with features you don't really need, included this window.h (for debug purpose it seems). I faced the same problem and I switched to the API I took from expasion board example like you did with the STSW-IMG019 to make it work. This API is customized to fit STM32F4 application, so it works well
2020-10-23 03:24 AM
Thanks for this useful information.
Vincenzo