Storage: Add required header file and namespace element instead add all

pull/8002/head
Deepika 2018-09-05 10:27:13 -05:00 committed by deepikabhavnani
parent 8b623156e5
commit 8642ece022
17 changed files with 28 additions and 29 deletions

View File

@ -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 <algorithm>
#include <string.h>

View File

@ -15,7 +15,7 @@
*/
#include "ChainingBlockDevice.h"
#include "mbed_critical.h"
#include "platform/mbed_critical.h"
ChainingBlockDevice::ChainingBlockDevice(BlockDevice **bds, size_t bd_count)

View File

@ -23,8 +23,8 @@
#define MBED_CHAINING_BLOCK_DEVICE_H
#include "BlockDevice.h"
#include "mbed.h"
#include "platform/mbed_assert.h"
#include <stdlib.h>
/** 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 @@ protected:
bool _is_initialized;
};
#endif

View File

@ -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)

View File

@ -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 <algorithm>
#include <stdlib.h>
#include <string.h>

View File

@ -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)

View File

@ -23,8 +23,9 @@
#define MBED_MEM_BLOCK_DEVICE_H
#include "BlockDevice.h"
#include "mbed.h"
#include "platform/mbed_assert.h"
#include <string.h>
#include <stdlib.h>
/** Lazily allocated heap-backed block device
*

View File

@ -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 <algorithm>
#include <string.h>
// On disk structures, all entries are little endian
MBED_PACKED(struct) mbr_entry {

View File

@ -23,7 +23,6 @@
#define MBED_MBR_BLOCK_DEVICE_H
#include "BlockDevice.h"
#include "mbed.h"
/** Additional error codes used for MBR records

View File

@ -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<void(BlockDevice *)> cb)
void ObservingBlockDevice::attach(mbed::Callback<void(BlockDevice *)> cb)
{
_change = cb;
}

View File

@ -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

View File

@ -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

View File

@ -23,7 +23,6 @@
#include "ReadOnlyBlockDevice.h"
#include "mbed_error.h"
ReadOnlyBlockDevice::ReadOnlyBlockDevice(BlockDevice *bd)
: _bd(bd)
{

View File

@ -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
*

View File

@ -29,6 +29,8 @@
#include <errno.h>
////// Error handling /////
using namespace mbed;
static int fat_error_remap(FRESULT res)
{
switch(res) {

View File

@ -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;

View File

@ -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();
}