Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implicit Function Declaration #9289

Closed Answered by SuGlider
M-Rizwan-Anwar asked this question in Q&A
Discussion options

Dear community members, I am using arduino as a component in VS Code, I am having issues in ESP32 Core header files. it is saying implicit declaration for some of the i2c functions:

D:/esp32/Test-Helloworld/hello_world/components/cores/esp32/esp32-hal-i2c-slave.c:517:5: error: implicit declaration of function 'i2c_ll_cal_bus_clk' [-Werror=implicit-function-declaration]
517 | i2c_ll_cal_bus_clk(APB_CLK_FREQ, clk_speed, &clk_cal);
| ^~~~~~~~~~~~~~~~~~
D:/esp32/Test-Helloworld/hello_world/components/cores/esp32/esp32-hal-i2c-slave.c:525:5: error: implicit declaration of function 'i2c_ll_set_bus_timing'; did you mean 'i2c_ll_set_scl_timing'? [-Werror=implicit-function-declaration]
525 | i2c_ll_set_bus_timing(i2c->dev, &clk_cal);
| ^~~~~~~~~~~~~~~~~~~~~
| i2c_ll_set_scl_timing
D:/esp32/Test-Helloworld/hello_world/components/cores/esp32/esp32-hal-i2c-slave.c:526:5: error: implicit declaration of function 'i2c_ll_set_filter'; did you mean 'i2c_ll_set_tout'? [-Werror=implicit-function-declaration]
526 | i2c_ll_set_filter(i2c->dev, 3);
| ^~~~~~~~~~~~~~~~~
| i2c_ll_set_tout

I tried multiple solutions, but nothing worked for me. Can anyone help me solve this error?

You must be logged in to vote

There is no Arduino Core that uses IDF 5.2. Please change the IDF version using git checkout <TAG> in order to use the right IDF version.
The right version of IDF can be found in each Arduino Core version Release Notes.
Example: Arduino Core 2.0.14 uses IDF 4.4.6 as written in https://github.com/espressif/arduino-esp32/releases/tag/2.0.14

Replies: 3 comments 4 replies

Comment options

@M-Rizwan-Anwar - Arduino as Component requests that IDF version matches the correct Arduino Core version.
Can you provide more information about the versions, folder structure, code etc?

You must be logged in to vote
2 replies
Comment options

I installed ESP-IDF 5.2 version.

Comment options

There is no Arduino Core that uses IDF 5.2. Please change the IDF version using git checkout <TAG> in order to use the right IDF version.
The right version of IDF can be found in each Arduino Core version Release Notes.
Example: Arduino Core 2.0.14 uses IDF 4.4.6 as written in https://github.com/espressif/arduino-esp32/releases/tag/2.0.14

Answer selected by lucasssvaz
Comment options

It looks like the function names have changed:
i2c_ll_cal_bus_clk -> i2c_ll_master_cal_bus_clk
i2c_ll_set_bus_timing -> i2c_ll_master_set_bus_timing
i2c_ll_set_filter -> i2c_ll_master_set_filter

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /