Skip to content

Commit 1f20328

Browse files
authored
Merge pull request #8084 from breakersun/fix-spi
fix `invalid pin` error when create `busio.SPI` on MIMXRT10XX port
2 parents 666fb94 + 7354e2a commit 1f20328

File tree

1 file changed

+1
-1
lines changed
  • ports/mimxrt10xx/common-hal/busio

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
109109
// if both MOSI and MISO exist, loop search normally
110110
if ((mosi != NULL) && (miso != NULL)) {
111111
for (uint j = 0; j < mosi_count; j++) {
112-
if ((mcu_spi_sdo_list[i].pin != mosi)
112+
if ((mcu_spi_sdo_list[j].pin != mosi)
113113
|| (mcu_spi_sck_list[i].bank_idx != mcu_spi_sdo_list[j].bank_idx)) {
114114
continue;
115115
}

0 commit comments

Comments
 (0)