Merge pull request #336 from tannewt/2.x
esp8266: Correct SPI functionality when write_value is provided.
This commit is contained in:
commit
e2ce87e250
@ -174,13 +174,13 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self,
|
|||||||
write_value;
|
write_value;
|
||||||
for (size_t j = 0; j < count; ++j) {
|
for (size_t j = 0; j < count; ++j) {
|
||||||
for (size_t k = 0; k < chunk_size; ++k) {
|
for (size_t k = 0; k < chunk_size; ++k) {
|
||||||
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 0, 0, 8, long_write_value);
|
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 8, long_write_value, 8, 0);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
ets_loop_iter();
|
ets_loop_iter();
|
||||||
}
|
}
|
||||||
while (i < len) {
|
while (i < len) {
|
||||||
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 0, 0, 8, long_write_value);
|
data[i] = spi_transaction(HSPI, 0, 0, 0, 0, 8, long_write_value, 8, 0);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user