File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,14 +89,16 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
8989 Sercom * sercom = NULL ;
9090 uint8_t sercom_index ;
9191 uint32_t clock_pinmux = 0 ;
92- bool mosi_none = mosi == mp_const_none ;
93- bool miso_none = miso == mp_const_none ;
92+ bool mosi_none = mosi == mp_const_none || mosi == NULL ;
93+ bool miso_none = miso == mp_const_none || miso == NULL ;
9494 uint32_t mosi_pinmux = 0 ;
9595 uint32_t miso_pinmux = 0 ;
9696 uint8_t clock_pad = 0 ;
9797 uint8_t mosi_pad = 0 ;
9898 uint8_t miso_pad = 0 ;
9999 uint8_t dopo = 255 ;
100+
101+ // Special case for SAMR boards.
100102 #ifdef PIN_PC19
101103 if (miso == & pin_PC19 ) {
102104 if (mosi == & pin_PB30 && clock == & pin_PC18 ) {
Original file line number Diff line number Diff line change @@ -171,6 +171,9 @@ safe_mode_t port_init(void) {
171171
172172 init_shared_dma ();
173173
174+ // Reset everything into a known state before board_init.
175+ reset_port ();
176+
174177 // Init the board last so everything else is ready
175178 board_init ();
176179
You can’t perform that action at this time.
0 commit comments