Skip to content

Commit e2ce87e

Browse files
authored
Merge pull request adafruit#336 from tannewt/2.x
esp8266: Correct SPI functionality when write_value is provided.
2 parents 2148211 + 6c7d35c commit e2ce87e

File tree

1 file changed

+2
-2
lines changed
  • esp8266/common-hal/busio

1 file changed

+2
-2
lines changed

esp8266/common-hal/busio/SPI.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self,
174174
write_value;
175175
for (size_t j = 0; j < count; ++j) {
176176
for (size_t k = 0; k < chunk_size; ++k) {
177-
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 0, 0, 8, long_write_value);
177+
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 8, long_write_value, 8, 0);
178178
++i;
179179
}
180180
ets_loop_iter();
181181
}
182182
while (i < len) {
183-
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 0, 0, 8, long_write_value);
183+
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 8, long_write_value, 8, 0);
184184
++i;
185185
}
186186
return true;

0 commit comments

Comments
 (0)