We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbb15d7 commit 7b7b976Copy full SHA for 7b7b976
1 file changed
hw/ssi/esp32s3_spi.c
@@ -150,11 +150,11 @@ static void esp32s3_spi_txrx_buffer(ESP32S3SpiState *s,
150
int bytes = MAX(tx_bytes, rx_bytes);
151
for (int i = 0; i < bytes; ++i) {
152
uint8_t byte = 0;
153
- if (byte < tx_bytes) {
+ if (i < tx_bytes) {
154
memcpy(&byte, tx + i, 1);
155
}
156
uint32_t res = ssi_transfer(s->spi, byte);
157
- if (byte < rx_bytes) {
+ if (i < rx_bytes) {
158
memcpy(rx + i, &res, 1);
159
160
@@ -272,6 +272,10 @@ static void esp32s3_spi_begin_transaction(ESP32S3SpiState *s)
272
273
274
275
+ if (t.cmd == 0xeb && t.dummy_bytes < 2) {
276
+ t.dummy_bytes = 2;
277
+ }
278
+
279
esp32s3_spi_perform_transaction(s, &t);
280
281
0 commit comments