The I2C data reading function has ACK. I don't want to have ACK just like writing function. How to do it, thank you!
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
esp_err_t i2c_master_write(i2c_cmd_handle_t cmd_handle, uint8_t* data, size_t data_len, bool ack_en);
The I2C data reading function has ACK. I don't want to have ACK just like writing function.
-
- Posts: 118
- Joined: Tue Jun 26, 2018 3:09 am
Re: The I2C data reading function has ACK. I don't want to have ACK just like writing function.
Hi, chencangchencang wrote: ↑Thu Feb 28, 2019 4:27 pmThe I2C data reading function has ACK. I don't want to have ACK just like writing function. How to do it, thank you!
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
esp_err_t i2c_master_write(i2c_cmd_handle_t cmd_handle, uint8_t* data, size_t data_len, bool ack_en);
The ack type you can use "I2C_MASTER_NACK"
wookooho
Who is online
Users browsing this forum: No registered users and 12 guests