Skip to content

Commit 5cb15e8

Browse files
author
Oliver Wildtgrube
committed
Added namespaces in various files
1 parent 47e943a commit 5cb15e8

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

drivers/include/drivers/USBMSD.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class USBMSD: public USBDevice {
7676
* @param product_id Your product_id
7777
* @param product_release Your preoduct_release
7878
*/
79-
USBMSD(BlockDevice *bd, bool connect_blocking = true, uint16_t vendor_id = 0x0703, uint16_t product_id = 0x0104, uint16_t product_release = 0x0001);
79+
USBMSD(mbed::BlockDevice *bd, bool connect_blocking = true, uint16_t vendor_id = 0x0703, uint16_t product_id = 0x0104, uint16_t product_release = 0x0001);
8080

8181
/**
8282
* Fully featured constructor
@@ -95,7 +95,7 @@ class USBMSD: public USBDevice {
9595
* @param product_id Your product_id
9696
* @param product_release Your preoduct_release
9797
*/
98-
USBMSD(USBPhy *phy, BlockDevice *bd, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
98+
USBMSD(USBPhy *phy, mbed::BlockDevice *bd, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
9999

100100
/**
101101
* Destroy this object
@@ -263,7 +263,7 @@ class USBMSD: public USBDevice {
263263
events::Task<void(const setup_packet_t *)> _control_task;
264264
events::Task<void()> _configure_task;
265265

266-
BlockDevice *_bd;
266+
mbed::BlockDevice *_bd;
267267
rtos::Mutex _mutex_init;
268268
rtos::Mutex _mutex;
269269

drivers/source/usb/PolledQueue.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
#include "platform/Callback.h"
2222

2323

24-
PolledQueue::PolledQueue(mbed::Callback<void()> cb): _cb(cb)
24+
events::PolledQueue::PolledQueue(mbed::Callback<void()> cb): _cb(cb)
2525
{
2626

2727
}
2828

29-
PolledQueue::~PolledQueue()
29+
events::PolledQueue::~PolledQueue()
3030
{
3131

3232
}
3333

34-
void PolledQueue::dispatch()
34+
void events::PolledQueue::dispatch()
3535
{
3636
core_util_critical_section_enter();
3737
uint64_t buf[MBED_MAX_TASK_SIZE / sizeof(uint64_t)];
@@ -60,7 +60,7 @@ void PolledQueue::dispatch()
6060
core_util_critical_section_exit();
6161
}
6262

63-
void PolledQueue::attach(mbed::Callback<void()> cb)
63+
void events::PolledQueue::attach(mbed::Callback<void()> cb)
6464
{
6565
core_util_critical_section_enter();
6666

@@ -69,7 +69,7 @@ void PolledQueue::attach(mbed::Callback<void()> cb)
6969
core_util_critical_section_exit();
7070
}
7171

72-
void PolledQueue::post(TaskBase *task)
72+
void events::PolledQueue::post(TaskBase *task)
7373
{
7474
core_util_critical_section_enter();
7575

@@ -83,7 +83,7 @@ void PolledQueue::post(TaskBase *task)
8383
core_util_critical_section_exit();
8484
}
8585

86-
void PolledQueue::cancel(TaskBase *task)
86+
void events::PolledQueue::cancel(TaskBase *task)
8787
{
8888
core_util_critical_section_enter();
8989

drivers/source/usb/TaskBase.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
#include "rtos/Semaphore.h"
2222
#include "platform/mbed_critical.h"
2323

24-
TaskBase::TaskBase(TaskQueue *q)
24+
events::TaskBase::TaskBase(TaskQueue *q)
2525
: _queue(q), _posted(false), _start_count(0), _flush_sem(NULL)
2626
{
2727

2828
}
2929

30-
TaskBase::~TaskBase()
30+
events::TaskBase::~TaskBase()
3131
{
3232
cancel();
3333
wait();
3434
}
3535

36-
void TaskBase::set(TaskQueue *q)
36+
void events::TaskBase::set(TaskQueue *q)
3737
{
3838
core_util_critical_section_enter();
3939

@@ -44,7 +44,7 @@ void TaskBase::set(TaskQueue *q)
4444
core_util_critical_section_exit();
4545
}
4646

47-
void TaskBase::cancel()
47+
void events::TaskBase::cancel()
4848
{
4949
core_util_critical_section_enter();
5050

@@ -57,7 +57,7 @@ void TaskBase::cancel()
5757
core_util_critical_section_exit();
5858
}
5959

60-
void TaskBase::wait()
60+
void events::TaskBase::wait()
6161
{
6262
// Fast path check for finished
6363
core_util_critical_section_enter();
@@ -82,7 +82,7 @@ void TaskBase::wait()
8282
sem.acquire();
8383
}
8484

85-
bool TaskBase::ready()
85+
bool events::TaskBase::ready()
8686
{
8787
core_util_critical_section_enter();
8888

@@ -92,7 +92,7 @@ bool TaskBase::ready()
9292
return is_ready;
9393
}
9494

95-
bool TaskBase::finished()
95+
bool events::TaskBase::finished()
9696
{
9797
core_util_critical_section_enter();
9898

@@ -102,12 +102,12 @@ bool TaskBase::finished()
102102
return is_finished;
103103
}
104104

105-
void TaskBase::finish()
105+
void events::TaskBase::finish()
106106
{
107107
// Nothing to do
108108
}
109109

110-
void TaskBase::post()
110+
void events::TaskBase::post()
111111
{
112112
core_util_critical_section_enter();
113113

@@ -121,7 +121,7 @@ void TaskBase::post()
121121
core_util_critical_section_exit();
122122
}
123123

124-
TaskBase::run_callback_t TaskBase::_start(void *buffer, uint32_t size)
124+
events::TaskBase::run_callback_t events::TaskBase::_start(void *buffer, uint32_t size)
125125
{
126126
// Each call to _start must result in a call to _finish
127127
MBED_ASSERT(_start_count < 0xFFFF);
@@ -131,7 +131,7 @@ TaskBase::run_callback_t TaskBase::_start(void *buffer, uint32_t size)
131131
return start(buffer, size);
132132
}
133133

134-
void TaskBase::_finish()
134+
void events::TaskBase::_finish()
135135
{
136136
// Each call to _finish must be preceded by a call to _start
137137
MBED_ASSERT(_start_count > 0);
@@ -140,7 +140,7 @@ void TaskBase::_finish()
140140
finish();
141141
}
142142

143-
void TaskBase::_wake_check()
143+
void events::TaskBase::_wake_check()
144144
{
145145
if (!finished()) {
146146
return;

drivers/source/usb/USBMSD.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ enum Status {
6565
CSW_ERROR,
6666
};
6767

68-
USBMSD::USBMSD(BlockDevice *bd, bool connect_blocking, uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
68+
USBMSD::USBMSD(mbed::BlockDevice *bd, bool connect_blocking, uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
6969
: USBDevice(get_usb_phy(), vendor_id, product_id, product_release),
7070
_initialized(false), _media_removed(false),
7171
_addr(0), _length(0), _mem_ok(false), _block_size(0), _memory_size(0), _block_count(0),
@@ -81,7 +81,7 @@ USBMSD::USBMSD(BlockDevice *bd, bool connect_blocking, uint16_t vendor_id, uint1
8181
}
8282
}
8383

84-
USBMSD::USBMSD(USBPhy *phy, BlockDevice *bd, uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
84+
USBMSD::USBMSD(USBPhy *phy, mbed::BlockDevice *bd, uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
8585
: USBDevice(phy, vendor_id, product_id, product_release),
8686
_initialized(false), _media_removed(false),
8787
_addr(0), _length(0), _mem_ok(false), _block_size(0), _memory_size(0), _block_count(0),
@@ -230,15 +230,15 @@ bool USBMSD::media_removed()
230230

231231
int USBMSD::disk_read(uint8_t *data, uint64_t block, uint8_t count)
232232
{
233-
bd_addr_t addr = block * _bd->get_erase_size();
234-
bd_size_t size = count * _bd->get_erase_size();
233+
mbed::bd_addr_t addr = block * _bd->get_erase_size();
234+
mbed::bd_size_t size = count * _bd->get_erase_size();
235235
return _bd->read(data, addr, size);
236236
}
237237

238238
int USBMSD::disk_write(const uint8_t *data, uint64_t block, uint8_t count)
239239
{
240-
bd_addr_t addr = block * _bd->get_erase_size();
241-
bd_size_t size = count * _bd->get_erase_size();
240+
mbed::bd_addr_t addr = block * _bd->get_erase_size();
241+
mbed::bd_size_t size = count * _bd->get_erase_size();
242242
int ret = _bd->erase(addr, size);
243243
if (ret != 0) {
244244
return ret;

storage/blockdevice/COMPONENT_FLASHIAP/include/FlashIAP/FlashIAPBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class FlashIAPBlockDevice : public mbed::BlockDevice {
134134
* @param size Size to erase in bytes
135135
* @return True if erase is valid for underlying block device
136136
*/
137-
virtual bool is_valid_erase(bd_addr_t addr, bd_size_t size) const;
137+
virtual bool is_valid_erase(mbed::bd_addr_t addr, mbed::bd_size_t size) const;
138138

139139

140140
private:

storage/blockdevice/COMPONENT_QSPIF/include/QSPIF/QSPIFBlockDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454
enum qspif_bd_error {
5555
QSPIF_BD_ERROR_OK = 0, /*!< no error */
56-
QSPIF_BD_ERROR_DEVICE_ERROR = BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */
56+
QSPIF_BD_ERROR_DEVICE_ERROR = mbed::bd_error::BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */
5757
QSPIF_BD_ERROR_PARSING_FAILED = -4002, /* SFDP Parsing failed */
5858
QSPIF_BD_ERROR_READY_FAILED = -4003, /* Wait for Mem Ready failed */
5959
QSPIF_BD_ERROR_WREN_FAILED = -4004, /* Write Enable Failed */
@@ -289,7 +289,7 @@ class QSPIFBlockDevice : public mbed::BlockDevice {
289289
qspi_status_t _qspi_set_frequency(int freq);
290290

291291
// Update the 4-byte addressing extension register with the MSB of the address if it is in use
292-
qspi_status_t _qspi_update_4byte_ext_addr_reg(bd_addr_t addr);
292+
qspi_status_t _qspi_update_4byte_ext_addr_reg(mbed::bd_addr_t addr);
293293

294294
/*********************************/
295295
/* Flash Configuration Functions */

storage/kvstore/kv_config/source/kv_config.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int _storage_config_filesystem_common();
144144
*
145145
* @returns pointer to other block device.
146146
*/
147-
BlockDevice *get_other_blockdevice();
147+
mbed::BlockDevice *get_other_blockdevice();
148148

149149
static const char *filesystemstore_folder_path = NULL;
150150

@@ -505,10 +505,10 @@ BlockDevice *_get_blockdevice_default(bd_addr_t start_address, bd_size_t size)
505505
* get_other_blockdevice() */
506506
BlockDevice *_get_blockdevice_other(bd_addr_t start_address, bd_size_t size)
507507
{
508-
bd_addr_t aligned_end_address;
509-
bd_addr_t aligned_start_address;
508+
mbed::bd_addr_t aligned_end_address;
509+
mbed::bd_addr_t aligned_start_address;
510510

511-
BlockDevice *bd = get_other_blockdevice();
511+
mbed::BlockDevice *bd = get_other_blockdevice();
512512
if (bd == NULL) {
513513
tr_error("KV Config: \"other\" block device init fail");
514514
return NULL;

0 commit comments

Comments
 (0)