mirror of https://github.com/ARMmbed/mbed-os.git
Storage: Add required header file and namespace element instead add all
parent
8b623156e5
commit
8642ece022
|
@ -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>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "ChainingBlockDevice.h"
|
||||
#include "mbed_critical.h"
|
||||
#include "platform/mbed_critical.h"
|
||||
|
||||
|
||||
ChainingBlockDevice::ChainingBlockDevice(BlockDevice **bds, size_t bd_count)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#define MBED_MBR_BLOCK_DEVICE_H
|
||||
|
||||
#include "BlockDevice.h"
|
||||
#include "mbed.h"
|
||||
|
||||
|
||||
/** Additional error codes used for MBR records
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "ReadOnlyBlockDevice.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
|
||||
ReadOnlyBlockDevice::ReadOnlyBlockDevice(BlockDevice *bd)
|
||||
: _bd(bd)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <errno.h>
|
||||
////// Error handling /////
|
||||
|
||||
using namespace mbed;
|
||||
|
||||
static int fat_error_remap(FRESULT res)
|
||||
{
|
||||
switch(res) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue