Skip to content

Commit 8dcc949

Browse files
authored
Merge pull request #8002 from deepikabhavnani/storage_remove_mbed_h
Storage: Add required header file and namespace element instead add all
2 parents 24857d0 + 8642ece commit 8dcc949

17 files changed

+28
-29
lines changed

features/storage/blockdevice/BufferedBlockDevice.cpp

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

1717
#include "BufferedBlockDevice.h"
18-
#include "mbed_assert.h"
19-
#include "mbed_critical.h"
18+
#include "platform/mbed_assert.h"
19+
#include "platform/mbed_critical.h"
2020
#include <algorithm>
2121
#include <string.h>
2222

features/storage/blockdevice/ChainingBlockDevice.cpp

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

1717
#include "ChainingBlockDevice.h"
18-
#include "mbed_critical.h"
18+
#include "platform/mbed_critical.h"
1919

2020

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

features/storage/blockdevice/ChainingBlockDevice.h

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

2525
#include "BlockDevice.h"
26-
#include "mbed.h"
27-
26+
#include "platform/mbed_assert.h"
27+
#include <stdlib.h>
2828

2929
/** Block device for chaining multiple block devices
3030
* with the similar block sizes at sequential addresses
@@ -45,8 +45,7 @@
4545
* ChainingBlockDevice chainmem(bds);
4646
* @endcode
4747
*/
48-
class ChainingBlockDevice : public BlockDevice
49-
{
48+
class ChainingBlockDevice : public BlockDevice {
5049
public:
5150
/** Lifetime of the memory block device
5251
*
@@ -179,5 +178,4 @@ class ChainingBlockDevice : public BlockDevice
179178
bool _is_initialized;
180179
};
181180

182-
183181
#endif

features/storage/blockdevice/ExhaustibleBlockDevice.cpp

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

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

2221
ExhaustibleBlockDevice::ExhaustibleBlockDevice(BlockDevice *bd, uint32_t erase_cycles)
2322
: _bd(bd), _erase_array(NULL), _erase_cycles(erase_cycles), _init_ref_count(0), _is_initialized(false)

features/storage/blockdevice/FlashSimBlockDevice.cpp

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

1717
#include "FlashSimBlockDevice.h"
18-
#include "mbed_assert.h"
19-
#include "mbed_critical.h"
18+
#include "platform/mbed_assert.h"
19+
#include "platform/mbed_critical.h"
2020
#include <algorithm>
2121
#include <stdlib.h>
2222
#include <string.h>

features/storage/blockdevice/HeapBlockDevice.cpp

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

1717
#include "HeapBlockDevice.h"
18-
#include "mbed_critical.h"
18+
#include "platform/mbed_critical.h"
1919

2020

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

features/storage/blockdevice/HeapBlockDevice.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
#define MBED_MEM_BLOCK_DEVICE_H
2424

2525
#include "BlockDevice.h"
26-
#include "mbed.h"
27-
26+
#include "platform/mbed_assert.h"
27+
#include <string.h>
28+
#include <stdlib.h>
2829

2930
/** Lazily allocated heap-backed block device
3031
*

features/storage/blockdevice/MBRBlockDevice.cpp

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

1717
#include "MBRBlockDevice.h"
18-
#include "mbed_critical.h"
18+
#include "platform/mbed_critical.h"
19+
#include "platform/mbed_toolchain.h"
20+
#include "platform/mbed_assert.h"
1921
#include <algorithm>
20-
22+
#include <string.h>
2123

2224
// On disk structures, all entries are little endian
2325
MBED_PACKED(struct) mbr_entry {

features/storage/blockdevice/MBRBlockDevice.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#define MBED_MBR_BLOCK_DEVICE_H
2424

2525
#include "BlockDevice.h"
26-
#include "mbed.h"
2726

2827

2928
/** Additional error codes used for MBR records

features/storage/blockdevice/ObservingBlockDevice.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#include "ObservingBlockDevice.h"
2424
#include "ReadOnlyBlockDevice.h"
25-
#include "mbed.h"
2625

2726

2827
ObservingBlockDevice::ObservingBlockDevice(BlockDevice *bd)
@@ -36,7 +35,7 @@ ObservingBlockDevice::~ObservingBlockDevice()
3635
// Does nothing
3736
}
3837

39-
void ObservingBlockDevice::attach(Callback<void(BlockDevice *)> cb)
38+
void ObservingBlockDevice::attach(mbed::Callback<void(BlockDevice *)> cb)
4039
{
4140
_change = cb;
4241
}

0 commit comments

Comments
 (0)