File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed
ports/stm32f4/boards/meowbit_v121 Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 39
39
#define BOARD_NO_VBUS
40
40
41
41
// On-board flash
42
- // #define SPI_FLASH_MOSI_PIN (&pin_PB15)
43
- // #define SPI_FLASH_MISO_PIN (&pin_PB14)
44
- // #define SPI_FLASH_SCK_PIN (&pin_PB13)
45
- // #define SPI_FLASH_CS_PIN (&pin_PB01)
42
+ #define SPI_FLASH_MOSI_PIN (&pin_PB15)
43
+ #define SPI_FLASH_MISO_PIN (&pin_PB14)
44
+ #define SPI_FLASH_SCK_PIN (&pin_PB13)
45
+ #define SPI_FLASH_CS_PIN (&pin_PB01)
Original file line number Diff line number Diff line change @@ -4,19 +4,19 @@ USB_PRODUCT = "Meowbit"
4
4
USB_MANUFACTURER = "Kittenbot"
5
5
USB_DEVICES = "CDC,MSC"
6
6
7
- # SPI_FLASH_FILESYSTEM = 1
8
- # EXTERNAL_FLASH_DEVICE_COUNT = 1
9
- # EXTERNAL_FLASH_DEVICES = W25Q16JV_IQ
10
- # LONGINT_IMPL = MPZ
7
+ SPI_FLASH_FILESYSTEM = 1
8
+ EXTERNAL_FLASH_DEVICE_COUNT = 1
9
+ EXTERNAL_FLASH_DEVICES = W25Q16JV_IQ
10
+ LONGINT_IMPL = MPZ
11
11
12
- INTERNAL_FLASH_FILESYSTEM = 1
13
- LONGINT_IMPL = NONE
12
+ # INTERNAL_FLASH_FILESYSTEM = 1
13
+ # LONGINT_IMPL = NONE
14
14
15
15
MCU_SERIES = m4
16
16
MCU_VARIANT = stm32f4
17
17
MCU_SUB_VARIANT = stm32f401xe
18
18
MCU_PACKAGE = 64
19
19
CMSIS_MCU = STM32F401xE
20
- LD_FILE = boards/STM32F401_fs .ld
20
+ LD_FILE = boards/STM32F401 .ld
21
21
TEXT0_ADDR = 0x08010000
22
22
TEXT1_ADDR = 0x08020000
Original file line number Diff line number Diff line change 1
1
#include "shared-bindings/board/__init__.h"
2
+ #include "supervisor/spi_flash_api.h"
2
3
3
4
STATIC const mp_rom_map_elem_t board_module_globals_table [] = {
4
5
{ MP_ROM_QSTR (MP_QSTR_LED_RED ), MP_ROM_PTR (& pin_PB04 ) },
@@ -59,5 +60,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
59
60
{ MP_ROM_QSTR (MP_QSTR_P0 ), MP_ROM_PTR (& pin_PA00 ) },
60
61
{ MP_ROM_QSTR (MP_QSTR_P3 ), MP_ROM_PTR (& pin_PB00 ) },
61
62
63
+ { MP_ROM_QSTR (MP_QSTR_INTERNAL_SPI ), MP_ROM_PTR (& spi ) },
62
64
};
63
65
MP_DEFINE_CONST_DICT (board_module_globals , board_module_globals_table );
Original file line number Diff line number Diff line change 31
31
32
32
#include "supervisor/shared/external_flash/devices.h"
33
33
34
+ #include "shared-bindings/busio/SPI.h"
35
+
36
+ extern busio_spi_obj_t spi ; //Used to share SPI bus on some boards
37
+
34
38
// This API is implemented for both normal SPI peripherals and QSPI peripherals.
35
39
36
40
bool spi_flash_command (uint8_t command );
You can’t perform that action at this time.
0 commit comments