From a3d75eb99d51f8303ef7f02170f64aec14d9759d Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 22 Oct 2018 12:28:55 +0700 Subject: [PATCH] clean up --- boards.txt | 3 +- libraries/FileSystem/src/ExternalFS.cpp | 61 +++++++++++++++++++++++++ libraries/FileSystem/src/ExternalFS.h | 12 +++++ libraries/FileSystem/src/InternalFS.cpp | 1 + 4 files changed, 75 insertions(+), 2 deletions(-) diff --git a/boards.txt b/boards.txt index 5425d74d..6612d255 100644 --- a/boards.txt +++ b/boards.txt @@ -63,7 +63,6 @@ feather52832.menu.debug.l3=Level 3 (Segger SystemView) feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os - #********************************************** # Feather nRF52840 Board #********************************************** @@ -94,7 +93,6 @@ feather52840.upload.use_1200bps_touch=true feather52840.upload.wait_for_upload_port=true #feather52840.upload.native_usb=true - # Build feather52840.build.mcu=cortex-m4 feather52840.build.f_cpu=64000000 @@ -125,6 +123,7 @@ feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os feather52840.menu.debug.l3=Level 3 (Segger SystemView) feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os + #********************************************** # PCA10056 ( to be remove ) #********************************************** diff --git a/libraries/FileSystem/src/ExternalFS.cpp b/libraries/FileSystem/src/ExternalFS.cpp index ef0b671b..541870ce 100644 --- a/libraries/FileSystem/src/ExternalFS.cpp +++ b/libraries/FileSystem/src/ExternalFS.cpp @@ -34,3 +34,64 @@ */ /**************************************************************************/ +#include +#include +#include "ExternalFS.h" + +FatFS::FatFS () +{ +} +FatFS::~FatFS () +{ +} + +bool FatFS::begin () +{ +} +File FatFS::open (char const *filename, uint8_t mode) +{ +} +bool FatFS::exists (char const *filepath) +{ +} +bool FatFS::mkdir (char const *filepath) +{ +} +bool FatFS::remove (char const *filepath) +{ +} +bool FatFS::rmdir (char const *filepath) +{ +} +bool FatFS::rmdir_r (char const *filepath) +{ +} + +size_t FatFS::_f_write (void* fhdl, uint8_t const *buf, size_t size) +{ +} +int FatFS::_f_read (void* fhdl, void *buf, uint16_t nbyte) +{ +} +void FatFS::_f_flush (void* fhdl) +{ +} +void FatFS::_f_close (void* fhdl, bool is_dir) +{ +} +bool FatFS::_f_seek (void* fhdl, uint32_t pos) +{ +} +uint32_t FatFS::_f_position (void* fhdl) +{ +} +uint32_t FatFS::_f_size (void* fhdl) +{ +} + +File FatFS::_f_openNextFile (void* fhdl, char const* cwd, uint8_t mode) +{ +} +void FatFS::_f_rewindDirectory (void* fhdl) +{ +} diff --git a/libraries/FileSystem/src/ExternalFS.h b/libraries/FileSystem/src/ExternalFS.h index c6c3a2fb..e946e58c 100644 --- a/libraries/FileSystem/src/ExternalFS.h +++ b/libraries/FileSystem/src/ExternalFS.h @@ -51,6 +51,18 @@ class FatFS: public BluefuritLib::FileSystemClass bool mkdir (char const *filepath); bool remove (char const *filepath); bool rmdir (char const *filepath); + bool rmdir_r (char const *filepath); + + virtual size_t _f_write (void* fhdl, uint8_t const *buf, size_t size); + virtual int _f_read (void* fhdl, void *buf, uint16_t nbyte); + virtual void _f_flush (void* fhdl); + virtual void _f_close (void* fhdl, bool is_dir); + virtual bool _f_seek (void* fhdl, uint32_t pos); + virtual uint32_t _f_position (void* fhdl); + virtual uint32_t _f_size (void* fhdl); + + virtual File _f_openNextFile (void* fhdl, char const* cwd, uint8_t mode); + virtual void _f_rewindDirectory (void* fhdl); }; diff --git a/libraries/FileSystem/src/InternalFS.cpp b/libraries/FileSystem/src/InternalFS.cpp index bf33519f..738698bf 100644 --- a/libraries/FileSystem/src/InternalFS.cpp +++ b/libraries/FileSystem/src/InternalFS.cpp @@ -56,6 +56,7 @@ #define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, NULL) #define PRINT_LFS_ERR(_err) + #else #define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, dbg_strerr_lfs)