Merge pull request #8084 from breakersun/fix-spi

fix `invalid pin` error when create `busio.SPI` on MIMXRT10XX port
This commit is contained in:
Scott Shawcroft 2023-06-14 17:27:24 -07:00 committed by GitHub
commit 1f20328068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
// if both MOSI and MISO exist, loop search normally
if ((mosi != NULL) && (miso != NULL)) {
for (uint j = 0; j < mosi_count; j++) {
if ((mcu_spi_sdo_list[i].pin != mosi)
if ((mcu_spi_sdo_list[j].pin != mosi)
|| (mcu_spi_sck_list[i].bank_idx != mcu_spi_sdo_list[j].bank_idx)) {
continue;
}