I would like to setup the I2C_ACK_ERR_INT interrupt for I2C driver.
Both "i2c_driver_install" and "i2c_isr_register" function require "intr_alloc_flags" but I don't know how to specify it.
I have searched some examples but I didn't found.
Thanks
setup interrupt for I2C_ACK_ERR_INT (ack error)
Re: setup interrupt for I2C_ACK_ERR_INT (ack error)
Driver uses it already https://github.com/espressif/esp-idf/bl ... i2c.c#L232
Usually you will just use 0 for flags.
Usually you will just use 0 for flags.
Re: setup interrupt for I2C_ACK_ERR_INT (ack error)
Thanks @WiFive.
In practice should I rely only on the return value of
to get an error of I2C communication? I already did it (I check if return is ESP_FAIL or ESP_ERR_TIMEOUT but my intent was to be informed by the driver immediatly when an ACK is not received.
In practice should I rely only on the return value of
Code: Select all
i2c_master_cmd_begin
Re: setup interrupt for I2C_ACK_ERR_INT (ack error)
Yes the driver handles those things internally.
Who is online
Users browsing this forum: No registered users and 141 guests