mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
f0a82d7185
GCC compiler can generate 8-bit stores when modifying bitfields of volatile structs (https://github.com/espressif/esp-idf/issues/597). In the specific case of I2C driver, this resulted in byte_num field to be written using s8i. However the peripheral requires 32-bit writes, and ignores 8-bit writes. This change modifies the code to compose the 32-bit command register value first, and then write the complete value to the hardware.