Skip to content

Commit

Permalink
Merge branch 'bugfix/mipi_gen_short_read' into 'master'
Browse files Browse the repository at this point in the history
fix(mipi_dsi): error logic in reading short packet

See merge request espressif/esp-idf!34430
  • Loading branch information
suda-morris committed Oct 28, 2024
2 parents 2a2f0fd + 987f766 commit 0e40a4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/hal/mipi_dsi_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
temp = mipi_dsi_host_ll_gen_read_payload_fifo(hal->host);
for (int i = 0; i < 4; i++) {
if ((counter + i) < buffer_size) {
receive_buffer[counter + i] = (temp >> (8 * i)) & 0xFF;
if (counter < buffer_size) {
receive_buffer[counter] = (temp >> (8 * i)) & 0xFF;
counter++;
}
counter++;
}
}
}
Expand Down

0 comments on commit 0e40a4d

Please sign in to comment.