Skip to content

Conversation

@markCwatson
Copy link
Contributor

@markCwatson markCwatson commented Jan 19, 2023

The driver utilizes ST Microelectronics library (which exists in modules\hal\st\sensor\vl53l1x). Platform specific headers and source files used by the library are included and adapted for Zephyr.

The driver can be configured in proj.conf to use an interrupt/polling methods and use of the XSHUT pin on the VL53L1X. All uses were tested successfully.

A sample application was developed to test the driver. Due to Zephyr's desire to limit the number of sample applications for specific drivers, it was decided to not include the sample app in this PR. There is a similar app for another time-of-flight sensor (the VL53L0X). It was recommended to adapt this other sample app to be configurable to use either the VL53L0X or the VL53L1X.

Signed-off-by: Mark Watson [email protected]

@zephyrbot zephyrbot added area: Devicetree Binding PR modifies or adds a Device Tree binding area: Sensors Sensors labels Jan 19, 2023
@zephyrbot zephyrbot requested review from galak and teburd January 19, 2023 17:35
@markCwatson markCwatson force-pushed the vl53l1x_driver branch 9 times, most recently from 4bdd1f2 to ffbf1af Compare January 19, 2023 19:43
@markCwatson
Copy link
Contributor Author

markCwatson commented Jan 20, 2023

@MaureenHelm The compliance checks or failing rn due to typedefs. The STM library has some typedefs that I cannot remove. Some of the platform/HAL .h/.c files need to be adapted to work with zephyr. Therefore, some files from the library need to be included in the driver and certain definitions modifies to work in zephyr. The typedefs, for example, which are currently causing the compliance checks to fail, are types used throughout the library and cannot be changed. However, there is a similar driver for the (different) vl53l0x sensor that already lives in drivers/sensor in zephyr that uses a similar library by STM, and also has these typedefs, but doesn't appear to be an issue since it is in the main zephyr tree.

@markCwatson markCwatson force-pushed the vl53l1x_driver branch 2 times, most recently from 321e3f7 to 9889362 Compare January 20, 2023 15:55
@markCwatson markCwatson force-pushed the vl53l1x_driver branch 4 times, most recently from 38d2d75 to fe7af75 Compare January 23, 2023 14:30
cfriedt
cfriedt previously approved these changes Feb 27, 2023
@cfriedt
Copy link
Member

cfriedt commented Feb 27, 2023

@markCwatson - you will still need to rebase on main and resolve conflicts manually. I would be happy to re-approve after that.

@markCwatson markCwatson reopened this Feb 28, 2023
@markCwatson markCwatson dismissed stale reviews from cfriedt and MaureenHelm via f0ece8e March 1, 2023 23:33
@markCwatson
Copy link
Contributor Author

Thanks a bunch @cfriedt. @MaureenHelm @erwango @avisconti @nashif @stephanosio, sorry to tag you all again, this branch had a conflict that needed to be resolved, so I had to address it. Would love to get this approved/merged so I don't have to keep doing this and bug everyone to give their approvals again LOL

MaureenHelm
MaureenHelm previously approved these changes Mar 2, 2023
teburd
teburd previously approved these changes Mar 2, 2023
cfriedt
cfriedt previously approved these changes Mar 3, 2023
@erwango erwango self-requested a review March 3, 2023 14:14
erwango
erwango previously approved these changes Mar 3, 2023
@MaureenHelm
Copy link
Member

Arg....another merge conflict, so now this needs another rebase. :(

@yperess this has been a recurring problem since you reworked tests/drivers/build_all/sensor/i2c.dtsi. We need to think if there's a better way to organize this test to avoid the churn.

The driver utilizes ST Microelectronics library (which
exists in modules\hal\st\sensor\vl53l1x. Platform specific
headers and source files used by the library are included
and adapted for Zephyr.

The driver can be configured in proj.conf to use a
interrupt/polling methods and the use of the XSHUT pin on
the VL53L1X. All uses were tested successfully.

Signed-off-by: Mark Watson <[email protected]>
@markCwatson
Copy link
Contributor Author

Arg....another merge conflict, so now this needs another rebase. :(

@yperess this has been a recurring problem since you reworked tests/drivers/build_all/sensor/i2c.dtsi. We need to think if there's a better way to organize this test to avoid the churn.

Thanks @MaureenHelm. I addressed the merge conflict. I appreciate everyone taking the time to come back again and again to give their approvals. I am going to tag everyone once again and kindly ask for their approvals so we can push this through before the next merge conflict arises: @cfriedt @erwango @teburd @avisconti @nashif @stephanosio

@yperess
Copy link
Contributor

yperess commented Mar 3, 2023

Arg....another merge conflict, so now this needs another rebase. :(

@yperess this has been a recurring problem since you reworked tests/drivers/build_all/sensor/i2c.dtsi. We need to think if there's a better way to organize this test to avoid the churn.

I'll take a look and run some ideas by you. I'll make an issue for it so we can discuss options.

@MaureenHelm MaureenHelm merged commit 1f178ca into zephyrproject-rtos:main Mar 3, 2023
@markCwatson markCwatson deleted the vl53l1x_driver branch March 3, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree Binding PR modifies or adds a Device Tree binding area: Sensors Sensors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants