diff options
| author | Damien George <damien@micropython.org> | 2020-06-16 12:23:29 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2020-06-17 00:09:37 +1000 |
| commit | da99e0f97911864d1803b804249b38344385de11 (patch) | |
| tree | ed44976e628f3389d7509b0bfa362a91f2b0d8f8 | |
| parent | 1678f417445703750e187b1b8a83c8c3e0e3796f (diff) | |
stm32/factoryreset: Provide empty create-FS function when FAT disabled.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/stm32/factoryreset.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ports/stm32/factoryreset.c b/ports/stm32/factoryreset.c index 04591101e..725ecd12a 100644 --- a/ports/stm32/factoryreset.c +++ b/ports/stm32/factoryreset.c @@ -34,6 +34,8 @@ #if MICROPY_HW_ENABLE_STORAGE +#if MICROPY_VFS_FAT + static const char fresh_boot_py[] = "# boot.py -- run on boot-up\r\n" "# can run arbitrary Python, but best to keep it minimal\r\n" @@ -128,4 +130,13 @@ MP_WEAK int factory_reset_create_filesystem(void) { return 0; // success } +#else + +// If FAT is not enabled then it's up to the board to create a fresh filesystem. +MP_WEAK int factory_reset_create_filesystem(void) { + return 0; // success +} + +#endif + #endif // MICROPY_HW_ENABLE_STORAGE |
