Page 1 of 1

Driver I2C Difference github vs vscode

Posted: Sun Aug 29, 2021 12:02 am
by Pladi_86
Noticed that even though i am using the same IDF version 4.1.2/

The driver include file and .c file on github vs vscode is not the same.

On VSCODE IDF extension i cannot find some of the function declarations and definitions that i see on github.

Whats the reason for this ?

I am interested in :

esp_err_t i2c_master_write_to_device part of driver/i2c.h
esp_err_t i2c_master_write_read_device



These are not available on VSCODE IDF

Re: Driver I2C Difference github vs vscode

Posted: Thu Sep 02, 2021 7:31 am
by XiotSamuel
I also find the i2c_master_write_read_device function seem missing in the library. I have manual inlude the C:/.espressif/esp-mdf/esp-idf/components/driver/include/ but seem no use.

Re: Driver I2C Difference github vs vscode

Posted: Thu Sep 02, 2021 8:51 am
by WiFive
Those functions were only added recently in master branch

Re: Driver I2C Difference github vs vscode

Posted: Thu Sep 02, 2021 10:02 am
by XiotSamuel
I have copy all the content in the driver in \.espressif\esp-mdf\esp-idf\components\driver to project folder and somehow it work. Is it normal?

Re: Driver I2C Difference github vs vscode

Posted: Thu Sep 02, 2021 12:59 pm
by Victoria Nope
XiotSamuel wrote:
Thu Sep 02, 2021 10:02 am
I have copy all the content in the driver in \.espressif\esp-mdf\esp-idf\components\driver to project folder and somehow it work. Is it normal?

If you copy an IDF component into your project, the compiler will (by default) pick that one, which allows you to override IDF components. For the reference, this principle is described in the build system manual.