Skip to content

Commit 1c862b9

Browse files
gekysimonqhughes
authored andcommitted
Filesystem: Add mbed namespace to FATFileSystem and BlockDevice classes
1 parent 7b55802 commit 1c862b9

16 files changed

+72
-4
lines changed

features/filesystem/bd/BlockDevice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "BlockDevice.h"
18+
#include "mbed.h"
1819

1920

2021
// Writes by default perform an erase + program

features/filesystem/bd/BlockDevice.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#include <stdint.h>
2121

22+
namespace mbed {
23+
/** \addtogroup filesystem */
24+
/** @{*/
25+
2226

2327
/** Enum of standard error codes
2428
*
@@ -183,4 +187,7 @@ class BlockDevice {
183187
};
184188

185189

190+
/** @}*/
191+
} // namespace mbed
192+
186193
#endif

features/filesystem/bd/ChainingBlockDevice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "ChainingBlockDevice.h"
18+
#include "mbed.h"
1819

1920

2021
ChainingBlockDevice::ChainingBlockDevice(BlockDevice **bds, size_t bd_count)

features/filesystem/bd/ChainingBlockDevice.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#include "BlockDevice.h"
2626
#include "mbed.h"
2727

28+
namespace mbed {
29+
/** \addtogroup filesystem */
30+
/** @{*/
31+
2832

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

152156

157+
/** @}*/
158+
} // namespace mbed
159+
153160
#endif

features/filesystem/bd/HeapBlockDevice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "HeapBlockDevice.h"
18+
#include "mbed.h"
1819

1920

2021
HeapBlockDevice::HeapBlockDevice(bd_size_t size, bd_size_t block)

features/filesystem/bd/HeapBlockDevice.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#include "BlockDevice.h"
2626
#include "mbed.h"
2727

28+
namespace mbed {
29+
/** \addtogroup filesystem */
30+
/** @{*/
31+
2832

2933
/** Lazily allocated heap-backed block device
3034
*
@@ -129,4 +133,7 @@ class HeapBlockDevice : public BlockDevice {
129133
};
130134

131135

136+
/** @}*/
137+
} // namespace mbed
138+
132139
#endif

features/filesystem/bd/SlicingBlockDevice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "SlicingBlockDevice.h"
18+
#include "mbed.h"
1819

1920

2021
SlicingBlockDevice::SlicingBlockDevice(BlockDevice *bd, bd_addr_t start)

features/filesystem/bd/SlicingBlockDevice.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#include "BlockDevice.h"
2626
#include "mbed.h"
2727

28+
namespace mbed {
29+
/** \addtogroup filesystem */
30+
/** @{*/
31+
2832

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

150154

155+
/** @}*/
156+
} // namespace mbed
157+
151158
#endif

features/filesystem/fat/FATDirHandle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#include "ff.h"
2424
#include "FATDirHandle.h"
2525
#include "FATMisc.h"
26+
#include "mbed.h"
2627

27-
using namespace mbed;
2828

2929
FATDirHandle::FATDirHandle(const FATFS_DIR &the_dir, PlatformMutex * mutex): _mutex(mutex) {
3030
dir = the_dir;

features/filesystem/fat/FATDirHandle.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
#include "DirHandle.h"
2626
#include "PlatformMutex.h"
2727

28-
using namespace mbed;
28+
namespace mbed {
29+
/** \addtogroup filesystem */
30+
/** @{*/
31+
2932

3033
class FATDirHandle : public DirHandle {
3134

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

5154
};
5255

56+
57+
/** @}*/
58+
} // namespace mbed
59+
5360
#endif

features/filesystem/fat/FATFileHandle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include "FATFileHandle.h"
2727
#include "FATMisc.h"
28+
#include "mbed.h"
2829

2930
FATFileHandle::FATFileHandle(FIL fh, PlatformMutex * mutex): _mutex(mutex) {
3031
_fh = fh;

features/filesystem/fat/FATFileHandle.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
#include "FileHandle.h"
2626
#include "PlatformMutex.h"
2727

28-
using namespace mbed;
28+
namespace mbed {
29+
/** \addtogroup filesystem */
30+
/** @{*/
31+
2932

3033
class FATFileHandle : public FileHandle {
3134
public:
@@ -49,4 +52,8 @@ class FATFileHandle : public FileHandle {
4952

5053
};
5154

55+
56+
/** @}*/
57+
} // namespace mbed
58+
5259
#endif

features/filesystem/fat/FATFileSystem.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "FATDirHandle.h"
3131
#include "critical.h"
3232
#include "FATMisc.h"
33+
#include "mbed.h"
3334

3435

3536
// Global access to block device from FAT driver

features/filesystem/fat/FATFileSystem.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
#include <stdint.h>
3030
#include "PlatformMutex.h"
3131

32-
using namespace mbed;
32+
namespace mbed {
33+
/** \addtogroup filesystem */
34+
/** @{*/
35+
3336

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

122+
123+
/** @}*/
124+
} // namespace mbed
125+
119126
#endif

features/filesystem/fat/FATMisc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <errno.h>
2222
#include "platform/retarget.h"
2323

24+
namespace mbed {
25+
2426

2527
/* @brief Set errno based on the error code returned from underlying filesystem
2628
*
@@ -80,3 +82,5 @@ void fat_filesystem_set_errno(FRESULT res)
8082
return;
8183
}
8284

85+
86+
}

features/filesystem/fat/FATMisc.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222

2323
#include "ff.h"
2424

25+
namespace mbed {
26+
/** \addtogroup filesystem */
27+
/** @{*/
28+
29+
2530
void fat_filesystem_set_errno(FRESULT res);
2631

32+
33+
/** @}*/
34+
} // namespace mbed
35+
2736
#endif /* FILESYSTEM_FAT_MISC_H */

0 commit comments

Comments
 (0)