diff --git a/features/storage/blockdevice/BufferedBlockDevice.cpp b/features/storage/blockdevice/BufferedBlockDevice.cpp index 86c324b26d7..c61c10b9153 100644 --- a/features/storage/blockdevice/BufferedBlockDevice.cpp +++ b/features/storage/blockdevice/BufferedBlockDevice.cpp @@ -15,8 +15,8 @@ */ #include "BufferedBlockDevice.h" -#include "mbed_assert.h" -#include "mbed_critical.h" +#include "platform/mbed_assert.h" +#include "platform/mbed_critical.h" #include #include diff --git a/features/storage/blockdevice/ChainingBlockDevice.cpp b/features/storage/blockdevice/ChainingBlockDevice.cpp index 60a87a8e113..d8b7e19f25f 100644 --- a/features/storage/blockdevice/ChainingBlockDevice.cpp +++ b/features/storage/blockdevice/ChainingBlockDevice.cpp @@ -15,7 +15,7 @@ */ #include "ChainingBlockDevice.h" -#include "mbed_critical.h" +#include "platform/mbed_critical.h" ChainingBlockDevice::ChainingBlockDevice(BlockDevice **bds, size_t bd_count) diff --git a/features/storage/blockdevice/ChainingBlockDevice.h b/features/storage/blockdevice/ChainingBlockDevice.h index fe7a3f7e182..d36e943b119 100644 --- a/features/storage/blockdevice/ChainingBlockDevice.h +++ b/features/storage/blockdevice/ChainingBlockDevice.h @@ -23,8 +23,8 @@ #define MBED_CHAINING_BLOCK_DEVICE_H #include "BlockDevice.h" -#include "mbed.h" - +#include "platform/mbed_assert.h" +#include /** Block device for chaining multiple block devices * with the similar block sizes at sequential addresses @@ -45,8 +45,7 @@ * ChainingBlockDevice chainmem(bds); * @endcode */ -class ChainingBlockDevice : public BlockDevice -{ +class ChainingBlockDevice : public BlockDevice { public: /** Lifetime of the memory block device * @@ -179,5 +178,4 @@ class ChainingBlockDevice : public BlockDevice bool _is_initialized; }; - #endif diff --git a/features/storage/blockdevice/ExhaustibleBlockDevice.cpp b/features/storage/blockdevice/ExhaustibleBlockDevice.cpp index 36d5d947362..d15fd82fe13 100644 --- a/features/storage/blockdevice/ExhaustibleBlockDevice.cpp +++ b/features/storage/blockdevice/ExhaustibleBlockDevice.cpp @@ -15,9 +15,8 @@ */ #include "ExhaustibleBlockDevice.h" -#include "mbed.h" -#include "mbed_critical.h" - +#include "platform/mbed_critical.h" +#include "platform/mbed_assert.h" ExhaustibleBlockDevice::ExhaustibleBlockDevice(BlockDevice *bd, uint32_t erase_cycles) : _bd(bd), _erase_array(NULL), _erase_cycles(erase_cycles), _init_ref_count(0), _is_initialized(false) diff --git a/features/storage/blockdevice/FlashSimBlockDevice.cpp b/features/storage/blockdevice/FlashSimBlockDevice.cpp index f69e4aa389d..37675848c2b 100644 --- a/features/storage/blockdevice/FlashSimBlockDevice.cpp +++ b/features/storage/blockdevice/FlashSimBlockDevice.cpp @@ -15,8 +15,8 @@ */ #include "FlashSimBlockDevice.h" -#include "mbed_assert.h" -#include "mbed_critical.h" +#include "platform/mbed_assert.h" +#include "platform/mbed_critical.h" #include #include #include diff --git a/features/storage/blockdevice/HeapBlockDevice.cpp b/features/storage/blockdevice/HeapBlockDevice.cpp index 460e522f67c..5108b2239a1 100644 --- a/features/storage/blockdevice/HeapBlockDevice.cpp +++ b/features/storage/blockdevice/HeapBlockDevice.cpp @@ -15,7 +15,7 @@ */ #include "HeapBlockDevice.h" -#include "mbed_critical.h" +#include "platform/mbed_critical.h" HeapBlockDevice::HeapBlockDevice(bd_size_t size, bd_size_t block) diff --git a/features/storage/blockdevice/HeapBlockDevice.h b/features/storage/blockdevice/HeapBlockDevice.h index 5791aa67e3e..e096d35dec4 100644 --- a/features/storage/blockdevice/HeapBlockDevice.h +++ b/features/storage/blockdevice/HeapBlockDevice.h @@ -23,8 +23,9 @@ #define MBED_MEM_BLOCK_DEVICE_H #include "BlockDevice.h" -#include "mbed.h" - +#include "platform/mbed_assert.h" +#include +#include /** Lazily allocated heap-backed block device * diff --git a/features/storage/blockdevice/MBRBlockDevice.cpp b/features/storage/blockdevice/MBRBlockDevice.cpp index 0d7e14ca28c..9acdca57b11 100644 --- a/features/storage/blockdevice/MBRBlockDevice.cpp +++ b/features/storage/blockdevice/MBRBlockDevice.cpp @@ -15,9 +15,11 @@ */ #include "MBRBlockDevice.h" -#include "mbed_critical.h" +#include "platform/mbed_critical.h" +#include "platform/mbed_toolchain.h" +#include "platform/mbed_assert.h" #include - +#include // On disk structures, all entries are little endian MBED_PACKED(struct) mbr_entry { diff --git a/features/storage/blockdevice/MBRBlockDevice.h b/features/storage/blockdevice/MBRBlockDevice.h index 99fefef456a..a78ff190354 100644 --- a/features/storage/blockdevice/MBRBlockDevice.h +++ b/features/storage/blockdevice/MBRBlockDevice.h @@ -23,7 +23,6 @@ #define MBED_MBR_BLOCK_DEVICE_H #include "BlockDevice.h" -#include "mbed.h" /** Additional error codes used for MBR records diff --git a/features/storage/blockdevice/ObservingBlockDevice.cpp b/features/storage/blockdevice/ObservingBlockDevice.cpp index d484a572133..d343cb47a9b 100644 --- a/features/storage/blockdevice/ObservingBlockDevice.cpp +++ b/features/storage/blockdevice/ObservingBlockDevice.cpp @@ -22,7 +22,6 @@ #include "ObservingBlockDevice.h" #include "ReadOnlyBlockDevice.h" -#include "mbed.h" ObservingBlockDevice::ObservingBlockDevice(BlockDevice *bd) @@ -36,7 +35,7 @@ ObservingBlockDevice::~ObservingBlockDevice() // Does nothing } -void ObservingBlockDevice::attach(Callback cb) +void ObservingBlockDevice::attach(mbed::Callback cb) { _change = cb; } diff --git a/features/storage/blockdevice/ObservingBlockDevice.h b/features/storage/blockdevice/ObservingBlockDevice.h index 9dce5fdf203..1a8b59e3dc7 100644 --- a/features/storage/blockdevice/ObservingBlockDevice.h +++ b/features/storage/blockdevice/ObservingBlockDevice.h @@ -23,8 +23,8 @@ #define MBED_OBSERVING_BLOCK_DEVICE_H #include "BlockDevice.h" -#include "PlatformMutex.h" -#include "Callback.h" +#include "platform/PlatformMutex.h" +#include "platform/Callback.h" class ObservingBlockDevice : public BlockDevice diff --git a/features/storage/blockdevice/ProfilingBlockDevice.h b/features/storage/blockdevice/ProfilingBlockDevice.h index 5d3a01323c0..f87dad882f5 100644 --- a/features/storage/blockdevice/ProfilingBlockDevice.h +++ b/features/storage/blockdevice/ProfilingBlockDevice.h @@ -23,7 +23,6 @@ #define MBED_PROFILING_BLOCK_DEVICE_H #include "BlockDevice.h" -#include "mbed.h" /** Block device for measuring storage operations of another block device diff --git a/features/storage/blockdevice/ReadOnlyBlockDevice.cpp b/features/storage/blockdevice/ReadOnlyBlockDevice.cpp index fe6e40c93d5..f67d3738d58 100644 --- a/features/storage/blockdevice/ReadOnlyBlockDevice.cpp +++ b/features/storage/blockdevice/ReadOnlyBlockDevice.cpp @@ -23,7 +23,6 @@ #include "ReadOnlyBlockDevice.h" #include "mbed_error.h" - ReadOnlyBlockDevice::ReadOnlyBlockDevice(BlockDevice *bd) : _bd(bd) { diff --git a/features/storage/blockdevice/SlicingBlockDevice.h b/features/storage/blockdevice/SlicingBlockDevice.h index 611fba2aba1..9c53c49fd0b 100644 --- a/features/storage/blockdevice/SlicingBlockDevice.h +++ b/features/storage/blockdevice/SlicingBlockDevice.h @@ -23,8 +23,7 @@ #define MBED_SLICING_BLOCK_DEVICE_H #include "BlockDevice.h" -#include "mbed.h" - +#include "platform/mbed_assert.h" /** Block device for mapping to a slice of another block device * diff --git a/features/storage/filesystem/fat/FATFileSystem.cpp b/features/storage/filesystem/fat/FATFileSystem.cpp index 38916ba2ba8..806a5a6c01b 100644 --- a/features/storage/filesystem/fat/FATFileSystem.cpp +++ b/features/storage/filesystem/fat/FATFileSystem.cpp @@ -29,6 +29,8 @@ #include ////// Error handling ///// +using namespace mbed; + static int fat_error_remap(FRESULT res) { switch(res) { diff --git a/features/storage/filesystem/littlefs/LittleFileSystem.cpp b/features/storage/filesystem/littlefs/LittleFileSystem.cpp index 8e17af9a2f5..d5d9982cbcc 100644 --- a/features/storage/filesystem/littlefs/LittleFileSystem.cpp +++ b/features/storage/filesystem/littlefs/LittleFileSystem.cpp @@ -20,6 +20,8 @@ #include "lfs_util.h" #include "MbedCRC.h" +using namespace mbed; + extern "C" void lfs_crc(uint32_t *crc, const void *buffer, size_t size) { uint32_t initial_xor = *crc; diff --git a/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp b/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp index a58ae13310f..000c43eebdc 100644 --- a/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp +++ b/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp @@ -510,7 +510,7 @@ static void nvstore_multi_thread_test() if (!threads[i]) { goto mem_fail; } - threads[i]->start(callback(thread_test_worker)); + threads[i]->start(mbed::callback(thread_test_worker)); } wait_ms(thr_test_num_secs * 1000); @@ -635,7 +635,7 @@ static void nvstore_race_test() } delete[] dummy; - threads[i]->start(callback(race_test_worker, (void *) buffs[i])); + threads[i]->start(mbed::callback(race_test_worker, (void *) buffs[i])); threads[i]->join(); }