File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
red_vision_examples/rv_init Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2020 # mosi = 3,
2121 # miso = 4,
2222)
23+
24+ # Some boards use the same SPI bus for both the display and the SD card, others
25+ # have separate buses. We'll create a separate `spi_sd` object for the SD card.
26+ import sys
27+ if "IoT RedBoard RP2350" in sys .implementation ._machine :
28+ spi_sd = SPI (
29+ 1 ,
30+ baudrate = 24_000_000 ,
31+ )
32+ else :
33+ spi_sd = spi
Original file line number Diff line number Diff line change 1414# Import the Pin class for the board's default pins.
1515from machine import Pin
1616
17- # Import the SPI bus
18- from .bus_spi import spi
17+ # Import the SPI bus.
18+ from .bus_spi import spi_sd as spi
1919
2020# When the SD card is initialized, it changes the SPI bus baudrate. We'll
2121# want to revert it, so we need to know the original baudrate. There's no
You can’t perform that action at this time.
0 commit comments