Skip to content

Commit ac7977b

Browse files
authored
Merge pull request #6191 from tannewt/esp_3_wire_spi
Fix 3-wire SPI on ESP
2 parents 9d4c74a + 380a708 commit ac7977b

File tree

1 file changed

+2
-3
lines changed
  • ports/espressif/common-hal/busio

1 file changed

+2
-3
lines changed

ports/espressif/common-hal/busio/SPI.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,10 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self,
205205
if (len == 0) {
206206
return true;
207207
}
208-
// Other than the read special case, stop transfers that don't have a pin/array match
209-
if (!self->MOSI && (data_out != data_in)) {
208+
if (self->MOSI == NULL && data_out != NULL) {
210209
mp_raise_ValueError(translate("No MOSI Pin"));
211210
}
212-
if (!self->MISO && data_in) {
211+
if (self->MISO == NULL && data_in != NULL) {
213212
mp_raise_ValueError(translate("No MISO Pin"));
214213
}
215214

0 commit comments

Comments
 (0)