From 66205faf65927f86cd1faa8d738e48551fff75e0 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 4 Jan 2013 09:38:41 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5029 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/fs/fatfs/fatfs_fsimpl.cpp | 47 +++++++++++++++++++++++++++++++++++++++++--- os/fs/fatfs/fatfs_fsimpl.hpp | 12 ++++++++--- 2 files changed, 53 insertions(+), 6 deletions(-) (limited to 'os/fs/fatfs') diff --git a/os/fs/fatfs/fatfs_fsimpl.cpp b/os/fs/fatfs/fatfs_fsimpl.cpp index 8c9fd73c7..e42c11e50 100644 --- a/os/fs/fatfs/fatfs_fsimpl.cpp +++ b/os/fs/fatfs/fatfs_fsimpl.cpp @@ -36,6 +36,9 @@ #define ERR_TERMINATING (msg_t)1 #define ERR_UNKNOWN_MSG (msg_t)2 +using namespace chibios_rt; +using namespace chibios_fs; + /** * @brief FatFS wrapper-related classes and interfaces. */ @@ -51,11 +54,11 @@ namespace chibios_fatfs { start(FATFS_THREAD_PRIORITY); } - FatFSWrapper::FatFSServerThread::~FatFSServerThread() { +/* FatFSWrapper::FatFSServerThread::~FatFSServerThread() { sendMessage(MSG_TERMINATE); wait(); - } + }*/ msg_t FatFSWrapper::FatFSServerThread::main() { msg_t sts; @@ -84,9 +87,47 @@ namespace chibios_fatfs { server.start(FATFS_THREAD_PRIORITY); } - FatFSWrapper::~FatFSWrapper() { +/* FatFSWrapper::~FatFSWrapper() { server.~FatFSServerThread(); + }*/ + + uint32_t FatFSWrapper::getAndClearLastError(void) { + + return 0; + } + + void FatFSWrapper::synchronize(void) { + + } + + void FatFSWrapper::remove(const char *fname) { + + (void)fname; + } + + BaseFileStreamInterface *FatFSWrapper::open(const char *fname) { + + (void)fname; + return NULL; + } + + BaseFileStreamInterface *FatFSWrapper::openForRead(const char *fname) { + + (void)fname; + return NULL; + } + + BaseFileStreamInterface *FatFSWrapper::openForWrite(const char *fname) { + + (void)fname; + return NULL; + } + + BaseFileStreamInterface *FatFSWrapper::create(const char *fname) { + + (void)fname; + return NULL; } } diff --git a/os/fs/fatfs/fatfs_fsimpl.hpp b/os/fs/fatfs/fatfs_fsimpl.hpp index c8a454c3c..8c61c5748 100644 --- a/os/fs/fatfs/fatfs_fsimpl.hpp +++ b/os/fs/fatfs/fatfs_fsimpl.hpp @@ -27,6 +27,7 @@ */ #include "ch.hpp" +#include "fs.hpp" #include "hal.h" #ifndef _FS_FATFS_IMPL_HPP_ @@ -47,6 +48,7 @@ #endif using namespace chibios_rt; +using namespace chibios_fs; /** * @brief FatFS wrapper-related classes and interfaces. @@ -71,13 +73,17 @@ namespace chibios_fatfs { virtual msg_t main(void); public: FatFSServerThread(::BaseBlockDevice *blkdev); - ~FatFSServerThread(); } server; public: FatFSWrapper(::BaseBlockDevice *blkdev); - - ~FatFSWrapper(); + virtual uint32_t getAndClearLastError(void); + virtual void synchronize(void); + virtual void remove(const char *fname); + virtual BaseFileStreamInterface *open(const char *fname); + virtual BaseFileStreamInterface *openForRead(const char *fname); + virtual BaseFileStreamInterface *openForWrite(const char *fname); + virtual BaseFileStreamInterface *create(const char *fname); }; } -- cgit v1.2.3