How to get NAK status from i2c_master_transmit?

aandsc
Posts: 2
Joined: Fri Oct 18, 2024 11:23 am

How to get NAK status from i2c_master_transmit?

Postby aandsc » Fri Oct 18, 2024 11:51 am

In i2c_device_config_t, I enable ACK checking through 'uint32_t disable_ack_check' which says: "Disable ACK check. If this is set false, that means ack check is enabled, the transaction will be stoped[sic] and API returns error when nack is detected."

But for 'esp_err_t i2c_master_transmit(...)' it says it only returns:
• ESP_OK: I2C master transmit success
• ESP_ERR_INVALID_ARG: I2C master transmit parameter invalid.
• ESP_ERR_TIMEOUT: Operation timeout(larger than xfer_timeout_ms) because the bus is busy or hardware crash.

Should I use a different method? Do I have to set up a callback?

Who is online

Users browsing this forum: No registered users and 51 guests