File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
ports/cxd56/common-hal/busio Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,13 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t *
35
35
const mcu_pin_obj_t * mosi , const mcu_pin_obj_t * miso ) {
36
36
int port = -1 ;
37
37
38
- if (clock -> number == PIN_SPI4_SCK && mosi -> number == PIN_SPI4_MOSI && miso -> number == PIN_SPI4_MISO ) {
38
+ if (clock -> number == PIN_SPI4_SCK &&
39
+ (mosi == NULL || mosi -> number == PIN_SPI4_MOSI ) &&
40
+ (miso == NULL || miso -> number == PIN_SPI4_MISO )) {
39
41
port = 4 ;
40
- } else if (clock -> number == PIN_EMMC_CLK && mosi -> number == PIN_EMMC_DATA0 && miso -> number == PIN_EMMC_DATA1 ) {
42
+ } else if (clock -> number == PIN_EMMC_CLK &&
43
+ (mosi == NULL || mosi -> number == PIN_EMMC_DATA0 ) &&
44
+ (miso == NULL || miso -> number == PIN_EMMC_DATA1 )) {
41
45
port = 5 ;
42
46
}
43
47
You can’t perform that action at this time.
0 commit comments