Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 3:977ed4dda7da
- Parent:
- 1:772d0adf75cc
- Child:
- 4:df65a888a785
diff -r 38eaf322b428 -r 977ed4dda7da main.cpp
--- a/main.cpp Wed Apr 18 13:35:52 2018 +0800
+++ b/main.cpp Mon Nov 04 18:31:10 2019 +0800
@@ -27,27 +27,18 @@
#include "LittleFileSystem.h"
#include "FATFileSystem.h"
-
-// Physical block device, can be any device that supports the BlockDevice API
-#if MBED_CONF_APP_ONBOARD_SPIF
-/* Some targets, e.g. NUMAKER_PFM_M487 support on-board SPI flash. */
-SPIFBlockDevice bd(MBED_CONF_APP_ONBOARD_SPI_MOSI,
- MBED_CONF_APP_ONBOARD_SPI_MISO,
- MBED_CONF_APP_ONBOARD_SPI_CLK,
- MBED_CONF_APP_ONBOARD_SPI_CS);
-
#if defined(TARGET_NUMAKER_PFM_M487)
/* We needn't write-protect and hold functions. Configure /WP and /HOLD pins to high. */
DigitalOut onboard_spi_wp(PC_5, 1);
DigitalOut onboard_spi_hold(PC_4, 1);
#endif
-#else
-/* Externally attached SPI flash */
-SPIFBlockDevice bd(MBED_CONF_APP_SPI_MOSI,
- MBED_CONF_APP_SPI_MISO,
- MBED_CONF_APP_SPI_CLK,
- MBED_CONF_APP_SPI_CS);
-#endif
+
+SPIFBlockDevice bd(MBED_CONF_SPIF_DRIVER_SPI_MOSI,
+ MBED_CONF_SPIF_DRIVER_SPI_MISO,
+ MBED_CONF_SPIF_DRIVER_SPI_CLK,
+ MBED_CONF_SPIF_DRIVER_SPI_CS);
+
+
// File system declaration
LittleFileSystem fs("fs");