Skip to content

Commit

Permalink
fix for ESP32S3 Bus_SPI::readBytes. Unaligned length read does not wo…
Browse files Browse the repository at this point in the history
…rk properly. ( m5stack#75 )
  • Loading branch information
lovyan03 committed Feb 12, 2024
1 parent 3fad7a0 commit 8cc1b55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lgfx/v1/platforms/esp32/Bus_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,9 @@ namespace lgfx
if (0 == (length -= len1)) {
len2 = len1;
wait_spi();
memcpy(dst, (void*)spi_w0_reg, (len2 + 3) & ~3u);
uint8_t tmp[32];
memcpy(tmp, (void*)spi_w0_reg, (len2 + 3) & ~3u);
memcpy(dst, tmp, len2);
} else {
if (length < len1) {
len1 = length;
Expand Down

0 comments on commit 8cc1b55

Please sign in to comment.