55// SPDX-License-Identifier: MIT
66
77#include "shared-bindings/board/__init__.h"
8-
98#include "shared-module/displayio/__init__.h"
9+
10+ CIRCUITPY_BOARD_BUS_SINGLETON (sd_spi , spi , 1 )
11+
1012static const mp_rom_map_elem_t board_module_globals_table [] = {
1113 CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
1214
@@ -64,11 +66,11 @@ static const mp_rom_map_elem_t board_module_globals_table[] = {
6466 { MP_ROM_QSTR (MP_QSTR_I2C ), MP_ROM_PTR (& board_i2c_obj ) },
6567
6668 // SD Card
67- { MP_ROM_QSTR (MP_QSTR_SD_SCK ), MP_ROM_PTR (& pin_GPIO36 )},
68- { MP_ROM_QSTR (MP_QSTR_SD_MOSI ), MP_ROM_PTR (& pin_GPIO35 )},
69- { MP_ROM_QSTR (MP_QSTR_SD_MISO ), MP_ROM_PTR (& pin_GPIO37 )},
70- { MP_ROM_QSTR (MP_QSTR_SD_CS ), MP_ROM_PTR (& pin_GPIO34 )},
71- { MP_ROM_QSTR (MP_QSTR_SD_SPI ), MP_ROM_PTR (& board_spi_obj ) },
69+ { MP_ROM_QSTR (MP_QSTR_SD_SCK ), MP_ROM_PTR (& pin_GPIO36 ) },
70+ { MP_ROM_QSTR (MP_QSTR_SD_MOSI ), MP_ROM_PTR (& pin_GPIO35 ) },
71+ { MP_ROM_QSTR (MP_QSTR_SD_MISO ), MP_ROM_PTR (& pin_GPIO37 ) },
72+ { MP_ROM_QSTR (MP_QSTR_SD_CS ), MP_ROM_PTR (& pin_GPIO34 ) },
73+ { MP_ROM_QSTR (MP_QSTR_SD_SPI ), MP_ROM_PTR (& board_sd_spi_obj ) },
7274 // Pin 38 is for the SDIO interface, and therefore not included in the SPI object
7375
7476 // LCD
@@ -78,6 +80,7 @@ static const mp_rom_map_elem_t board_module_globals_table[] = {
7880 { MP_ROM_QSTR (MP_QSTR_LCD_RST ), MP_ROM_PTR (& pin_GPIO9 ) },
7981 { MP_ROM_QSTR (MP_QSTR_LCD_BACKLIGHT ), MP_ROM_PTR (& pin_GPIO7 ) },
8082 { MP_ROM_QSTR (MP_QSTR_LCD_DC ), MP_ROM_PTR (& pin_GPIO8 ) },
83+ { MP_ROM_QSTR (MP_QSTR_LCD_SPI ), MP_ROM_PTR (& board_spi_obj ) },
8184 { MP_ROM_QSTR (MP_QSTR_DISPLAY ), MP_ROM_PTR (& displays [0 ].display ) },
8285
8386};
0 commit comments