mirror of
https://github.com/espressif/esp-idf
synced 2025-03-31 03:41:07 -04:00
fix(mipi_dsi): error logic in reading short packet
This commit is contained in:
parent
d25f9b6071
commit
ceef7a5f91
@ -206,10 +206,10 @@ void mipi_dsi_hal_host_gen_read_short_packet(mipi_dsi_hal_context_t *hal, uint8_
|
|||||||
while (!mipi_dsi_host_ll_gen_is_read_fifo_empty(hal->host)) {
|
while (!mipi_dsi_host_ll_gen_is_read_fifo_empty(hal->host)) {
|
||||||
temp = mipi_dsi_host_ll_gen_read_payload_fifo(hal->host);
|
temp = mipi_dsi_host_ll_gen_read_payload_fifo(hal->host);
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
if ((counter + i) < buffer_size) {
|
if (counter < buffer_size) {
|
||||||
receive_buffer[counter + i] = (temp >> (8 * i)) & 0xFF;
|
receive_buffer[counter] = (temp >> (8 * i)) & 0xFF;
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user