aboutsummaryrefslogtreecommitdiffstats
path: root/os/fs
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-01-04 09:38:41 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-01-04 09:38:41 +0000
commit66205faf65927f86cd1faa8d738e48551fff75e0 (patch)
tree843d9b9021fedd121dd51c40703bd3ab517b71a8 /os/fs
parentc95f632a674afbf3606d66f950455438efa7aec3 (diff)
downloadChibiOS-66205faf65927f86cd1faa8d738e48551fff75e0.tar.gz
ChibiOS-66205faf65927f86cd1faa8d738e48551fff75e0.tar.bz2
ChibiOS-66205faf65927f86cd1faa8d738e48551fff75e0.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5029 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/fs')
-rw-r--r--os/fs/fatfs/fatfs_fsimpl.cpp47
-rw-r--r--os/fs/fatfs/fatfs_fsimpl.hpp12
-rw-r--r--os/fs/fs.hpp5
3 files changed, 53 insertions, 11 deletions
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);
};
}
diff --git a/os/fs/fs.hpp b/os/fs/fs.hpp
index 1ba2cfdc2..ed4a3e177 100644
--- a/os/fs/fs.hpp
+++ b/os/fs/fs.hpp
@@ -124,11 +124,6 @@ namespace chibios_fs {
class BaseFileSystemInterface {
public:
/**
- * @brief File system unmount and object destruction.
- */
- virtual ~BaseFileSystemInterface() = 0;
-
- /**
* @brief Returns an implementation dependent error code.
*
* @return An implementation-dependent error code.