Driver I2C Difference github vs vscode

Pladi_86
Posts: 3
Joined: Sat Aug 28, 2021 11:53 pm

Driver I2C Difference github vs vscode

Postby Pladi_86 » Sun Aug 29, 2021 12:02 am

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
Attachments
i2c.PNG
i2c.PNG (18.15 KiB) Viewed 4172 times

XiotSamuel
Posts: 53
Joined: Sun Aug 29, 2021 1:50 pm

Re: Driver I2C Difference github vs vscode

Postby XiotSamuel » Thu Sep 02, 2021 7:31 am

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.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Driver I2C Difference github vs vscode

Postby WiFive » Thu Sep 02, 2021 8:51 am

Those functions were only added recently in master branch

XiotSamuel
Posts: 53
Joined: Sun Aug 29, 2021 1:50 pm

Re: Driver I2C Difference github vs vscode

Postby XiotSamuel » 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?

Victoria Nope
Posts: 75
Joined: Fri Dec 04, 2020 9:56 pm

Re: Driver I2C Difference github vs vscode

Postby Victoria Nope » Thu Sep 02, 2021 12:59 pm

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.

Who is online

Users browsing this forum: Baidu [Spider] and 90 guests