Skip to content
Discussion options

You must be logged in to vote

tl;dr The answer is: you cannot.

i2cdev.h does NOT simply provide short-hand functions or thin wrappers of underlying esp-idf functions. It handles resource management and, most importantly, thread-safe operations with locking because the older i2c.h from esp-idf does not guarantee thread-safety. The newer i2c_master.h introduced buses, devices and thread-safe functions, which is quite similar to what i2cdev.h has been providing. Because two implementations do the same thing, you cannot mix them up.

We can rewrite i2cdev.h so that the drivers and i2c_master.h can co-exist but it will break older esp-idf versions. In addition, esp8266 does not, and probably will not, have i2c_master.h.

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
5 replies
@jChereck
Comment options

@trombik
Comment options

@jChereck
Comment options

@trombik
Comment options

@jChereck
Comment options

Answer selected by trombik
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jChereck
Comment options

@jnischler
Comment options

@quinkq
Comment options

@jnischler
Comment options

@jnischler
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants