Merge remote-tracking branch 'origin/main'

This commit is contained in:
Hosted Weblate 2022-03-24 22:51:21 +01:00
commit c77493661e
No known key found for this signature in database
GPG Key ID: A3FAAA06E6569B4C

View File

@ -205,11 +205,10 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self,
if (len == 0) { if (len == 0) {
return true; return true;
} }
// Other than the read special case, stop transfers that don't have a pin/array match if (self->MOSI == NULL && data_out != NULL) {
if (!self->MOSI && (data_out != data_in)) {
mp_raise_ValueError(translate("No MOSI Pin")); mp_raise_ValueError(translate("No MOSI Pin"));
} }
if (!self->MISO && data_in) { if (self->MISO == NULL && data_in != NULL) {
mp_raise_ValueError(translate("No MISO Pin")); mp_raise_ValueError(translate("No MISO Pin"));
} }