-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
I2C command link in API reference (IDFGH-13430) #14336
Comments
A new i2c driver is now available in ESP-IDF V5.2. I hope this is helpful to read a value from the device. https://github.com/espressif/esp-idf/tree/master/examples/peripherals/i2c/i2c_tools |
I have this issue to. I need the ability to create an i2c command with a repeated start command:
With the new API function I would love to move to the new driver because of the nice way to configure the master and devices, but this is hindering me for now. Any plans to reintroduce that style of creating i2c transactions? |
An hour after you posted, I started typing up a response, but then realized I didn't know what you were truly going for. Actually just did it again. I found a good issue for illustration: #13952 I believe you'll have to split up this to three calls:
I believe this to be correct. If anyone could correct me, I'd appreciate helping me get better at the "new" way of doing ESP32s |
This sadly won't work in my case since a
Unfortunatly the sensor i am working with is very strict about it's commands. |
Maybe edit the IDF source? You could duplicate the transmit_receive method and rename it to suit your needs.
It seems like if you can daisy chain the commands (like the old command link).
Then you get to perform all your transactions before the last element to stop. |
I thought about that as well, but I would much rather have an API that allows me to create such specific i2c bus transactions, much like the old API. |
Answers checklist.
General issue report
I'm using an ESP32-S3 with ESP-IDF v.5.2.1. In the API reference for i2c (https://docs.espressif.com/projects/esp-idf/en/v5.2.2/esp32s3/api-reference/peripherals/i2c.html), it states, "In order to organize the process, the driver uses a command link, that should be populated with a sequence of commands and then passed to I2C controller for execution." But it see in, "[Migration Guides] » [Migration from 5.1 to 5.2] » Peripherals" (https://docs.espressif.com/projects/esp-idf/en/v5.2/esp32/migration-guides/release-5.x/5.2/peripherals.html), it states, "i2c_cmd_link_xxx functions have been removed, user doesn't need to use link to link commands on its own."
I've used 'i2c_master_transmit_receive' to read a value from the device, but I'm struggling with how to do a 'write-write' using the write_buffer and an array.
Could more information about what strategy replaced the command link would be great! Thanks!
The text was updated successfully, but these errors were encountered: