cancel
Showing results for 
Search instead for 
Did you mean: 

How to use VL53L4CX driver API calls(given in vl53lx_api.h) from a user application on a Jetson Nano device?

Acl
Associate

I have installed the driver module on my Jetson Nano device and I'm able to detect the device after running the Phio application. But I want to use the driver APIs calls provided in vl53lx_api.h to access the device from a user application. Phio application doesn't use the driver APIs, it makes IOCTL calls directly. Is there a way to use the driver APIs?

2 REPLIES 2
Anne BIGOT
ST Employee

Hello,

the vl53l4cx linux driver is compiled in kernel mode and must be accessed through sysfs or Ioctl linux paths. However, if your needs are only user space side the driver can be compiled in user space and then your user space application can call directly all the API functions.

The drawback is you shall use the device in polling mode because the end of ranging interrupt can't be caught directly from the user space.

Please let us know if such user space only driver compilation fits your needs.


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

Yes, the user space only driver compilation will work for me, but how do I proceed with that? some reference will be helpful. Also, does the 'phio' application run on polling mode? if yes, then how are the interrupts cleared? because there is no ioctl call to clear the interrupt and to start the next ranging.