Skip to content

Commit 63e4ea7

Browse files
author
Cruz Monrreal
authored
Merge pull request #7757 from ARMmbed/revert-7663-namespace_bd_update
Revert "Move BlockDevice classes inside mbed namespace"
2 parents 8b47f9e + ff67a96 commit 63e4ea7

27 files changed

+30
-127
lines changed

features/filesystem/FileSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "platform/FileHandle.h"
2424
#include "platform/DirHandle.h"
2525
#include "platform/FileSystemLike.h"
26-
#include "bd/BlockDevice.h"
26+
#include "BlockDevice.h"
2727

2828
namespace mbed {
2929
/** \addtogroup filesystem */

features/filesystem/bd/BlockDevice.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717
#ifndef MBED_BLOCK_DEVICE_H
1818
#define MBED_BLOCK_DEVICE_H
1919

20-
#include "platform/platform.h"
2120
#include <stdint.h>
2221

23-
namespace mbed {
24-
/** \addtogroup filesystem */
25-
/** @{*/
2622

2723
/** Enum of standard error codes
2824
*
@@ -223,7 +219,5 @@ class BlockDevice
223219
}
224220
};
225221

226-
/** @}*/
227-
} // namespace mbed
228222

229223
#endif

features/filesystem/bd/BufferedBlockDevice.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include <algorithm>
2121
#include <string.h>
2222

23-
namespace mbed {
24-
2523
static inline uint32_t align_down(bd_size_t val, bd_size_t size)
2624
{
2725
return val / size * size;
@@ -241,5 +239,3 @@ bd_size_t BufferedBlockDevice::size() const
241239
{
242240
return _bd->size();
243241
}
244-
245-
} // namespace mbed

features/filesystem/bd/BufferedBlockDevice.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
#include "BlockDevice.h"
2626

27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
3027

3128
/** Block device for allowing minimal read and program sizes (of 1) for the underlying BD,
3229
* using a buffer on the heap.
@@ -166,7 +163,5 @@ class BufferedBlockDevice : public BlockDevice {
166163

167164
};
168165

169-
/** @}*/
170-
} // namespace mbed
171166

172167
#endif

features/filesystem/bd/ChainingBlockDevice.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
*/
1616

1717
#include "ChainingBlockDevice.h"
18-
#include "platform/mbed_critical.h"
19-
#include "platform/mbed_assert.h"
18+
#include "mbed_critical.h"
2019

21-
namespace mbed {
2220

2321
ChainingBlockDevice::ChainingBlockDevice(BlockDevice **bds, size_t bd_count)
2422
: _bds(bds), _bd_count(bd_count)
@@ -251,5 +249,3 @@ bd_size_t ChainingBlockDevice::size() const
251249
{
252250
return _size;
253251
}
254-
255-
} // namespace mbed

features/filesystem/bd/ChainingBlockDevice.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
#define MBED_CHAINING_BLOCK_DEVICE_H
2424

2525
#include "BlockDevice.h"
26+
#include "mbed.h"
2627

27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
3028

3129
/** Block device for chaining multiple block devices
3230
* with the similar block sizes at sequential addresses
@@ -180,7 +178,5 @@ class ChainingBlockDevice : public BlockDevice
180178
uint32_t _init_ref_count;
181179
};
182180

183-
/** @}*/
184-
} // namespace mbed
185181

186182
#endif

features/filesystem/bd/ExhaustibleBlockDevice.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
*/
1616

1717
#include "ExhaustibleBlockDevice.h"
18-
#include "platform/mbed_critical.h"
19-
#include "platform/mbed_assert.h"
18+
#include "mbed.h"
19+
#include "mbed_critical.h"
2020

21-
namespace mbed {
2221

2322
ExhaustibleBlockDevice::ExhaustibleBlockDevice(BlockDevice *bd, uint32_t erase_cycles)
2423
: _bd(bd), _erase_array(NULL), _erase_cycles(erase_cycles), _init_ref_count(0)
@@ -142,5 +141,3 @@ bd_size_t ExhaustibleBlockDevice::size() const
142141
{
143142
return _bd->size();
144143
}
145-
146-
} // namespace mbed

features/filesystem/bd/ExhaustibleBlockDevice.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
#include "BlockDevice.h"
2626

27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
3027

3128
/** Heap backed block device which simulates failures
3229
*
@@ -160,7 +157,5 @@ class ExhaustibleBlockDevice : public BlockDevice
160157
uint32_t _init_ref_count;
161158
};
162159

163-
/** @}*/
164-
} // namespace mbed
165160

166161
#endif

features/filesystem/bd/FlashSimBlockDevice.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@
1515
*/
1616

1717
#include "FlashSimBlockDevice.h"
18-
#include "platform/mbed_critical.h"
19-
#include "platform/mbed_assert.h"
20-
18+
#include "mbed_assert.h"
19+
#include "mbed_critical.h"
2120
#include <algorithm>
2221
#include <stdlib.h>
2322
#include <string.h>
2423

25-
namespace mbed {
26-
2724
static const bd_size_t min_blank_buf_size = 32;
2825

2926
static inline uint32_t align_up(bd_size_t val, bd_size_t size)
@@ -163,5 +160,3 @@ int FlashSimBlockDevice::get_erase_value() const
163160
{
164161
return _erase_value;
165162
}
166-
167-
} // namespace mbed

features/filesystem/bd/FlashSimBlockDevice.h

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

2525
#include "BlockDevice.h"
2626

27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
30-
3127
enum {
3228
BD_ERROR_NOT_ERASED = -3201,
3329
};
@@ -142,7 +138,4 @@ class FlashSimBlockDevice : public BlockDevice {
142138
uint32_t _init_ref_count;
143139
};
144140

145-
/** @}*/
146-
} // namespace mbed
147-
148141
#endif

features/filesystem/bd/HeapBlockDevice.cpp

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

1717
#include "HeapBlockDevice.h"
18-
#include "platform/mbed_critical.h"
19-
#include "platform/mbed_assert.h"
18+
#include "mbed_critical.h"
2019

21-
#include <stdlib.h>
22-
#include <string.h>
23-
24-
namespace mbed {
2520

2621
HeapBlockDevice::HeapBlockDevice(bd_size_t size, bd_size_t block)
2722
: _read_size(block), _program_size(block), _erase_size(block)
@@ -171,4 +166,3 @@ int HeapBlockDevice::erase(bd_addr_t addr, bd_size_t size)
171166
return 0;
172167
}
173168

174-
} // namespace mbed

features/filesystem/bd/HeapBlockDevice.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
#define MBED_MEM_BLOCK_DEVICE_H
2424

2525
#include "BlockDevice.h"
26-
27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
30-
26+
#include "mbed.h"
3127

3228

3329
/** Lazily allocated heap-backed block device
@@ -157,7 +153,5 @@ class HeapBlockDevice : public BlockDevice
157153
uint32_t _init_ref_count;
158154
};
159155

160-
/** @}*/
161-
} // namespace mbed
162156

163157
#endif

features/filesystem/bd/MBRBlockDevice.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@
1515
*/
1616

1717
#include "MBRBlockDevice.h"
18-
#include "platform/mbed_critical.h"
19-
#include "platform/mbed_assert.h"
20-
18+
#include "mbed_critical.h"
2119
#include <algorithm>
22-
#include <stdlib.h>
23-
#include <string.h>
2420

25-
namespace mbed {
2621

2722
// On disk structures, all entries are little endian
2823
MBED_PACKED(struct) mbr_entry {
@@ -345,5 +340,3 @@ int MBRBlockDevice::get_partition_number() const
345340
{
346341
return _part;
347342
}
348-
349-
} // namespace mbed

features/filesystem/bd/MBRBlockDevice.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
#define MBED_MBR_BLOCK_DEVICE_H
2424

2525
#include "BlockDevice.h"
26+
#include "mbed.h"
2627

27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
3028

3129
/** Additional error codes used for MBR records
3230
*/
@@ -257,7 +255,5 @@ class MBRBlockDevice : public BlockDevice
257255
uint32_t _init_ref_count;
258256
};
259257

260-
/** @}*/
261-
} // namespace mbed
262258

263259
#endif

features/filesystem/bd/ObservingBlockDevice.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
#include "ObservingBlockDevice.h"
2424
#include "ReadOnlyBlockDevice.h"
25+
#include "mbed.h"
2526

26-
namespace mbed {
2727

2828
ObservingBlockDevice::ObservingBlockDevice(BlockDevice *bd)
2929
: _bd(bd)
@@ -110,5 +110,3 @@ bd_size_t ObservingBlockDevice::size() const
110110
{
111111
return _bd->size();
112112
}
113-
114-
} // namespace mbed

features/filesystem/bd/ObservingBlockDevice.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
#include "PlatformMutex.h"
2727
#include "Callback.h"
2828

29-
namespace mbed {
30-
/** \addtogroup filesystem */
31-
/** @{*/
3229

3330
class ObservingBlockDevice : public BlockDevice
3431
{
@@ -144,7 +141,6 @@ class ObservingBlockDevice : public BlockDevice
144141
mbed::Callback<void(BlockDevice *)> _change;
145142
};
146143

147-
/** @}*/
148-
} // namespace mbed
144+
149145

150146
#endif

features/filesystem/bd/ProfilingBlockDevice.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "ProfilingBlockDevice.h"
1818

19-
namespace mbed {
2019

2120
ProfilingBlockDevice::ProfilingBlockDevice(BlockDevice *bd)
2221
: _bd(bd)
@@ -119,5 +118,3 @@ bd_size_t ProfilingBlockDevice::get_erase_count() const
119118
{
120119
return _erase_count;
121120
}
122-
123-
} // namespace mbed

features/filesystem/bd/ProfilingBlockDevice.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
#define MBED_PROFILING_BLOCK_DEVICE_H
2424

2525
#include "BlockDevice.h"
26+
#include "mbed.h"
2627

27-
namespace mbed {
28-
/** \addtogroup filesystem */
29-
/** @{*/
3028

3129
/** Block device for measuring storage operations of another block device
3230
*
@@ -184,7 +182,5 @@ class ProfilingBlockDevice : public BlockDevice
184182
bd_size_t _erase_count;
185183
};
186184

187-
/** @}*/
188-
} // namespace mbed
189185

190186
#endif

features/filesystem/bd/ReadOnlyBlockDevice.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
*/
2222

2323
#include "ReadOnlyBlockDevice.h"
24-
#include "platform/mbed_error.h"
24+
#include "mbed_error.h"
2525

26-
namespace mbed {
2726

2827
ReadOnlyBlockDevice::ReadOnlyBlockDevice(BlockDevice *bd)
2928
: _bd(bd)
@@ -97,5 +96,3 @@ bd_size_t ReadOnlyBlockDevice::size() const
9796
{
9897
return _bd->size();
9998
}
100-
101-
} // namespace mbed

features/filesystem/bd/ReadOnlyBlockDevice.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
#include "BlockDevice.h"
2626
#include "PlatformMutex.h"
2727

28-
namespace mbed {
29-
/** \addtogroup filesystem */
30-
/** @{*/
3128

3229
class ReadOnlyBlockDevice : public BlockDevice
3330
{
@@ -136,7 +133,6 @@ class ReadOnlyBlockDevice : public BlockDevice
136133
BlockDevice *_bd;
137134
};
138135

139-
/** @}*/
140-
} // namespace mbed
136+
141137

142138
#endif

features/filesystem/bd/SlicingBlockDevice.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
*/
1616

1717
#include "SlicingBlockDevice.h"
18-
#include "platform/mbed_assert.h"
1918

20-
namespace mbed {
2119

2220
SlicingBlockDevice::SlicingBlockDevice(BlockDevice *bd, bd_addr_t start, bd_addr_t stop)
2321
: _bd(bd)
@@ -118,5 +116,3 @@ bd_size_t SlicingBlockDevice::size() const
118116
{
119117
return _stop - _start;
120118
}
121-
122-
} // namespace mbed

0 commit comments

Comments
 (0)