Skip to content

Filesystem: Add mbed namespace to FATFileSystem and BlockDevice classes #3766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions features/filesystem/bd/BlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "BlockDevice.h"
#include "mbed.h"


// Writes by default perform an erase + program
Expand Down
7 changes: 7 additions & 0 deletions features/filesystem/bd/BlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

#include <stdint.h>

namespace mbed {
/** \addtogroup filesystem */
/** @{*/


/** Enum of standard error codes
*
Expand Down Expand Up @@ -183,4 +187,7 @@ class BlockDevice {
};


/** @}*/
} // namespace mbed

#endif
1 change: 1 addition & 0 deletions features/filesystem/bd/ChainingBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "ChainingBlockDevice.h"
#include "mbed.h"


ChainingBlockDevice::ChainingBlockDevice(BlockDevice **bds, size_t bd_count)
Expand Down
7 changes: 7 additions & 0 deletions features/filesystem/bd/ChainingBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include "BlockDevice.h"
#include "mbed.h"

namespace mbed {
/** \addtogroup filesystem */
/** @{*/


/** Block device for chaining multiple block devices
* with the similar block sizes at sequential addresses
Expand Down Expand Up @@ -150,4 +154,7 @@ class ChainingBlockDevice : public BlockDevice {
};


/** @}*/
} // namespace mbed

#endif
1 change: 1 addition & 0 deletions features/filesystem/bd/HeapBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "HeapBlockDevice.h"
#include "mbed.h"


HeapBlockDevice::HeapBlockDevice(bd_size_t size, bd_size_t block)
Expand Down
7 changes: 7 additions & 0 deletions features/filesystem/bd/HeapBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include "BlockDevice.h"
#include "mbed.h"

namespace mbed {
/** \addtogroup filesystem */
/** @{*/


/** Lazily allocated heap-backed block device
*
Expand Down Expand Up @@ -129,4 +133,7 @@ class HeapBlockDevice : public BlockDevice {
};


/** @}*/
} // namespace mbed

#endif
1 change: 1 addition & 0 deletions features/filesystem/bd/SlicingBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "SlicingBlockDevice.h"
#include "mbed.h"


SlicingBlockDevice::SlicingBlockDevice(BlockDevice *bd, bd_addr_t start)
Expand Down
7 changes: 7 additions & 0 deletions features/filesystem/bd/SlicingBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include "BlockDevice.h"
#include "mbed.h"

namespace mbed {
/** \addtogroup filesystem */
/** @{*/


/** Block device for mapping to a slice of another block device
*
Expand Down Expand Up @@ -148,4 +152,7 @@ class SlicingBlockDevice : public BlockDevice {
};


/** @}*/
} // namespace mbed

#endif
2 changes: 1 addition & 1 deletion features/filesystem/fat/FATDirHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "ff.h"
#include "FATDirHandle.h"
#include "FATMisc.h"
#include "mbed.h"

using namespace mbed;

FATDirHandle::FATDirHandle(const FATFS_DIR &the_dir, PlatformMutex * mutex): _mutex(mutex) {
dir = the_dir;
Expand Down
9 changes: 8 additions & 1 deletion features/filesystem/fat/FATDirHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
#include "DirHandle.h"
#include "PlatformMutex.h"

using namespace mbed;
namespace mbed {
/** \addtogroup filesystem */
/** @{*/


class FATDirHandle : public DirHandle {

Expand All @@ -50,4 +53,8 @@ class FATDirHandle : public DirHandle {

};


/** @}*/
} // namespace mbed

#endif
1 change: 1 addition & 0 deletions features/filesystem/fat/FATFileHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "FATFileHandle.h"
#include "FATMisc.h"
#include "mbed.h"

FATFileHandle::FATFileHandle(FIL fh, PlatformMutex * mutex): _mutex(mutex) {
_fh = fh;
Expand Down
9 changes: 8 additions & 1 deletion features/filesystem/fat/FATFileHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
#include "FileHandle.h"
#include "PlatformMutex.h"

using namespace mbed;
namespace mbed {
/** \addtogroup filesystem */
/** @{*/


class FATFileHandle : public FileHandle {
public:
Expand All @@ -49,4 +52,8 @@ class FATFileHandle : public FileHandle {

};


/** @}*/
} // namespace mbed

#endif
1 change: 1 addition & 0 deletions features/filesystem/fat/FATFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "FATDirHandle.h"
#include "critical.h"
#include "FATMisc.h"
#include "mbed.h"


// Global access to block device from FAT driver
Expand Down
9 changes: 8 additions & 1 deletion features/filesystem/fat/FATFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
#include <stdint.h>
#include "PlatformMutex.h"

using namespace mbed;
namespace mbed {
/** \addtogroup filesystem */
/** @{*/


/**
* FATFileSystem based on ChaN's Fat Filesystem library v0.8
Expand Down Expand Up @@ -116,4 +119,8 @@ class FATFileSystem : public FileSystemLike {
virtual void unlock();
};


/** @}*/
} // namespace mbed

#endif
4 changes: 4 additions & 0 deletions features/filesystem/fat/FATMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include <errno.h>
#include "platform/retarget.h"

namespace mbed {


/* @brief Set errno based on the error code returned from underlying filesystem
*
Expand Down Expand Up @@ -80,3 +82,5 @@ void fat_filesystem_set_errno(FRESULT res)
return;
}


}
9 changes: 9 additions & 0 deletions features/filesystem/fat/FATMisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@

#include "ff.h"

namespace mbed {
/** \addtogroup filesystem */
/** @{*/


void fat_filesystem_set_errno(FRESULT res);


/** @}*/
} // namespace mbed

#endif /* FILESYSTEM_FAT_MISC_H */