define esp32 as master device using new i2c_master.c functions
Posted: Mon Apr 15, 2024 6:19 pm
Hello,
I would like to use the ESP32 as a I2C master device using Bus 0.
I have no issues while using the "old" i2c.c functions (I can make it work with no problems).
But the "old" i2c functions are deprecated.
So I looked into the "new" way of doing things (IDF v5.2.1). But I can not make it work.
As I understand from https://docs.espressif.com/projects/esp ... 2%20master
one should:
1. get a new bus handle using i2c_new_master_bus
2. define a new master device handle for the ESP32 (?) , is this correct? Using i2c_master_bus_add_device ?
Or is there anopther way to configure the Bus 0 with the ESP32 I2C controller working as a master?
So, I do not know how to configure the new Bus to be used by the ESP32 with the ESP32 I2C controller being the master of the Bus.
What I am missing/ not understanding? Can someone please help me?
I would like to use the ESP32 as a I2C master device using Bus 0.
I have no issues while using the "old" i2c.c functions (I can make it work with no problems).
But the "old" i2c functions are deprecated.
So I looked into the "new" way of doing things (IDF v5.2.1). But I can not make it work.
As I understand from https://docs.espressif.com/projects/esp ... 2%20master
one should:
1. get a new bus handle using i2c_new_master_bus
2. define a new master device handle for the ESP32 (?) , is this correct? Using i2c_master_bus_add_device ?
Or is there anopther way to configure the Bus 0 with the ESP32 I2C controller working as a master?
So, I do not know how to configure the new Bus to be used by the ESP32 with the ESP32 I2C controller being the master of the Bus.
What I am missing/ not understanding? Can someone please help me?