From 61851aad07f02d47a121776d862cca2cf22fed5e Mon Sep 17 00:00:00 2001 From: Marcus Chang Date: Tue, 5 Mar 2019 08:25:48 -0800 Subject: [PATCH] Add missing RSPIF component to the defaut BlockDevice handler --- .../storage/system_storage/SystemStorage.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/features/storage/system_storage/SystemStorage.cpp b/features/storage/system_storage/SystemStorage.cpp index 05dbee14b8..8003a3c481 100644 --- a/features/storage/system_storage/SystemStorage.cpp +++ b/features/storage/system_storage/SystemStorage.cpp @@ -25,6 +25,10 @@ #include "SPIFBlockDevice.h" #endif +#if COMPONENT_RSPIF +#include "SPIFReducedBlockDevice.h" +#endif + #if COMPONENT_QSPIF #include "QSPIFBlockDevice.h" #endif @@ -92,6 +96,18 @@ MBED_WEAK BlockDevice *BlockDevice::get_default_instance() return &default_bd; +#elif COMPONENT_RSPIF + + static SPIFReducedBlockDevice default_bd( + MBED_CONF_RSPIF_DRIVER_SPI_MOSI, + MBED_CONF_RSPIF_DRIVER_SPI_MISO, + MBED_CONF_RSPIF_DRIVER_SPI_CLK, + MBED_CONF_RSPIF_DRIVER_SPI_CS, + MBED_CONF_RSPIF_DRIVER_SPI_FREQ + ); + + return &default_bd; + #elif COMPONENT_QSPIF static QSPIFBlockDevice default_bd(