You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#defineCMD_HANDLER_BUFFER_SIZE I2C_LINK_RECOMMENDED_SIZE(7) // only 7 operations will be queued in the handler ATTOW
The buffer allocated for the I2C transactions in the I2C IO of the esp_lcd component is sized big enough for 7 transactions; and I count 6 + START + STOP operations worst-case in panel_io_i2c_rx_buffer. I2C_LINK_RECOMMENDED_SIZE assumes a "transaction" to comprise up to 5 operations, so for the 6+2 operations needed, I2C_LINK_RECOMMENDED_SIZE(2) should be sufficient as buffer size, saving (7-2) * (5 * I2C_INTERNAL_STRUCT_SIZE)=600 bytes of heap.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
esp_lcd: Buffer allocated in I2C IO is bigger than it needs to be
esp_lcd: Buffer allocated in I2C IO is bigger than it needs to be (IDFGH-9674)
Mar 18, 2023
esp-idf/components/esp_lcd/src/esp_lcd_panel_io_i2c.c
Line 25 in 4f0769d
The buffer allocated for the I2C transactions in the I2C IO of the esp_lcd component is sized big enough for 7 transactions; and I count 6 + START + STOP operations worst-case in
panel_io_i2c_rx_buffer
.I2C_LINK_RECOMMENDED_SIZE
assumes a "transaction" to comprise up to 5 operations, so for the 6+2 operations needed,I2C_LINK_RECOMMENDED_SIZE(2)
should be sufficient as buffer size, saving (7-2) * (5 * I2C_INTERNAL_STRUCT_SIZE)=600 bytes of heap.The text was updated successfully, but these errors were encountered: