]> granicus.if.org Git - esp-idf/commit
i2c: rx <-> tx typo's, NULLing free'd variable, consistent CRITICAL sects
authorChuck Todd <ctodd@cableone.net>
Fri, 27 Oct 2017 22:59:10 +0000 (16:59 -0600)
committerWangjialin <wangjialin@espressif.com>
Mon, 11 Dec 2017 03:08:39 +0000 (11:08 +0800)
commitd913fff6d70152d201c84c0026312c119bfe9871
tree6d001d3d1e675b1965adde16d1c0b4ac7009d50c
parent9075b507b54a99ce732fc2819ba17274d9a69ab5
i2c: rx <-> tx typo's, NULLing free'd variable, consistent CRITICAL sects

A couple of typos referencing tx_ring_buf when rx_ring_buf, slv_tx_mux
instead of slv_rx_mux.

Also, I2C_ENTER_CRITICAL()/I2C_EXIT_CRITICAL() usage was not consistent.
Only some of the _set_ functions had them.  Most of the _get_ function
had them?  It is my understanding that they should be wrapped around
writes, not reads? (I think we still need the lock for reading pairs of consistent values)

Also, the ticks_to_wait timeout handling in i2c_master_cmd_begin() would
not handle integer rollover correctly.

Merges https://github.com/espressif/esp-idf/pull/1180
components/driver/i2c.c