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

ESP-IDF master compilation crashes on one line #106

Open
adokitkat opened this issue Nov 5, 2024 · 3 comments
Open

ESP-IDF master compilation crashes on one line #106

adokitkat opened this issue Nov 5, 2024 · 3 comments

Comments

@adokitkat
Copy link

Hello, I just wanted to report a compilation crash due to this line on ESP-IDF master branch:

return i2c_periph_signal[num].module;

module field was removed from i2c_signal_conn_t struct (missing from IDF v5.4 or v5.5, not sure).

@lovyan03
Copy link
Collaborator

lovyan03 commented Nov 5, 2024

Hello, @adokitkat
please try develop branch.

lovyan03 added a commit that referenced this issue Nov 5, 2024
@adokitkat
Copy link
Author

adokitkat commented Nov 5, 2024

That is a correct fix for previous targets, thanks!

I also want to say you may encounter a problem in the future because the code will probably not work for newer targets (P4, C61, etc.) as periph_module_reset should not be called outside i2c driver and is deprecated and doesn't do anything on new targets as far as I understand.

We should fix this in the IDF though (new public APIs instead of you having to rely on private ones etc.). If you encounter something like this please open an issue in ESP-IDF repo, thanks.

@suda-morris
Copy link

Hi @lovyan03

For some reason (mostly because of hardware design changes), start from esp32p4, functions like periph_module_disable and periph_module_reset are not available. See: https://github.com/espressif/esp-idf/blob/master/components/esp_hw_support/include/esp_private/periph_ctrl.h#L74-L80

If you do want a way to reset the I2C peripheral, there's a low level function: static inline void i2c_ll_reset_register(int i2c_port).

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

3 participants