Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 16 bit command/index #101

Closed
rgillan opened this issue Jun 3, 2021 · 3 comments
Closed

Support for 16 bit command/index #101

rgillan opened this issue Jun 3, 2021 · 3 comments

Comments

@rgillan
Copy link

rgillan commented Jun 3, 2021

In interfacing with some advanced sensors (e.g. ST VL53L3X) it requires a 16 bit command to identify the register to access. We were wondering if it was possible to add this functionality to this module (which we use extensively thank you).

16bit index read

16bit index write

@rgillan
Copy link
Author

rgillan commented Jun 3, 2021

although we have been able to do some basic comms with i2cWriteSync and i2cReadSync, so probably more for convenience than anything I expect.

@fivdi
Copy link
Owner

fivdi commented Jun 3, 2021

The plain I2C methods described in the readme can be used to achieve what's needed here.

For example, for the read shown in Figure 12, call i2cWrite or i2cWriteSync to write to address 0x52 followed by a call to i2cRead or i2cReadSync to read from address 0x53.

For the write shown in Figure 11, call i2cWrite or i2cWriteSync to write to address 0x52.

If needed, your application can implement higher level methods suitable for accessing the VL53L3X which leverage the functionality provided by the plain I2C methods that i2c-bus offers.

I won't be adding methods to cover this use case to i2c-bus. The read shown in Figure 12 that first writes to address 0x52 and then reads from address 0x53 isn't very conventional.

@rgillan
Copy link
Author

rgillan commented Jun 3, 2021

Thanks for getting back so promptly. So we've worked out the 52/53 thing is actually a documentation anomaly. It's actually write/read to 0x29 including the r/w bit (silly way to identify the address in my opinion). Anyway, thanks for this great module and we'll make do with the plain i2c methods. Cheers

@rgillan rgillan closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants