Skip to content

Commit 8ca0e9f

Browse files
facchinmpennam
authored andcommitted
BlockDevices: specify mbed namespace where needed
1 parent 956b197 commit 8ca0e9f

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class DataFlashBlockDevice : public mbed::BlockDevice {
197197
void _write_enable(bool enable);
198198
int _sync(void);
199199
int _write_page(const uint8_t *buffer, uint32_t addr, uint32_t offset, uint32_t size);
200-
uint32_t _translate_address(bd_addr_t addr);
200+
uint32_t _translate_address(mbed::bd_addr_t addr);
201201

202202
// Mutex for thread safety
203203
mutable PlatformMutex _mutex;

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_I2CEE/include/I2CEE/I2CEEBlockDevice.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class I2CEEBlockDevice : public BlockDevice {
7272
*/
7373
I2CEEBlockDevice(
7474
PinName sda, PinName scl, uint8_t address,
75-
bd_size_t size, bd_size_t block = 32,
75+
mbed::bd_size_t size, mbed::bd_size_t block = 32,
7676
int bus_speed = 400000,
7777
bool address_is_eight_bit = false);
7878

@@ -89,7 +89,7 @@ class I2CEEBlockDevice : public BlockDevice {
8989
*/
9090
I2CEEBlockDevice(
9191
mbed::I2C *i2c_obj, uint8_t address,
92-
bd_size_t size, bd_size_t block = 32,
92+
mbed::bd_size_t size, mbed::bd_size_t block = 32,
9393
bool address_is_eight_bit = false);
9494

9595
/** Destructor of I2CEEBlockDevice
@@ -116,7 +116,7 @@ class I2CEEBlockDevice : public BlockDevice {
116116
* @param size Size to read in bytes, must be a multiple of read block size
117117
* @return 0 on success, negative error code on failure
118118
*/
119-
virtual int read(void *buffer, bd_addr_t addr, bd_size_t size);
119+
virtual int read(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size);
120120

121121
/** Program blocks to a block device
122122
*
@@ -127,7 +127,7 @@ class I2CEEBlockDevice : public BlockDevice {
127127
* @param size Size to write in bytes, must be a multiple of program block size
128128
* @return 0 on success, negative error code on failure
129129
*/
130-
virtual int program(const void *buffer, bd_addr_t addr, bd_size_t size);
130+
virtual int program(const void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size);
131131

132132
/** Erase blocks on a block device
133133
*
@@ -137,33 +137,33 @@ class I2CEEBlockDevice : public BlockDevice {
137137
* @param size Size to erase in bytes, must be a multiple of erase block size
138138
* @return 0 on success, negative error code on failure
139139
*/
140-
virtual int erase(bd_addr_t addr, bd_size_t size);
140+
virtual int erase(mbed::bd_addr_t addr, mbed::bd_size_t size);
141141

142142
/** Get the size of a readable block
143143
*
144144
* @return Size of a readable block in bytes
145145
*/
146-
virtual bd_size_t get_read_size() const;
146+
virtual mbed::bd_size_t get_read_size() const;
147147

148148
/** Get the size of a programable block
149149
*
150150
* @return Size of a programable block in bytes
151151
* @note Must be a multiple of the read size
152152
*/
153-
virtual bd_size_t get_program_size() const;
153+
virtual mbed::bd_size_t get_program_size() const;
154154

155155
/** Get the size of a eraseable block
156156
*
157157
* @return Size of a eraseable block in bytes
158158
* @note Must be a multiple of the program size
159159
*/
160-
virtual bd_size_t get_erase_size() const;
160+
virtual mbed::bd_size_t get_erase_size() const;
161161

162162
/** Get the total size of the underlying device
163163
*
164164
* @return Size of the underlying device in bytes
165165
*/
166-
virtual bd_size_t size() const;
166+
virtual mbed::bd_size_t size() const;
167167

168168
/** Get the BlockDevice class type.
169169
*
@@ -189,7 +189,7 @@ class I2CEEBlockDevice : public BlockDevice {
189189
* @param address An address in the requested page.
190190
* @return The device's I2C address for that page
191191
*/
192-
uint8_t get_paged_device_address(bd_addr_t address);
192+
uint8_t get_paged_device_address(mbed::bd_addr_t address);
193193
};
194194

195195

storage/blockdevice/COMPONENT_OSPIF/include/OSPIF/OSPIFBlockDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
*/
6969
enum ospif_bd_error {
7070
OSPIF_BD_ERROR_OK = 0, /*!< no error */
71-
OSPIF_BD_ERROR_DEVICE_ERROR = BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */
71+
OSPIF_BD_ERROR_DEVICE_ERROR = mbed::BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */
7272
OSPIF_BD_ERROR_PARSING_FAILED = -4002, /* SFDP Parsing failed */
7373
OSPIF_BD_ERROR_READY_FAILED = -4003, /* Wait for Mem Ready failed */
7474
OSPIF_BD_ERROR_WREN_FAILED = -4004, /* Write Enable Failed */
@@ -331,7 +331,7 @@ class OSPIFBlockDevice : public mbed::BlockDevice {
331331
ospi_status_t _ospi_set_frequency(int freq);
332332

333333
// Update the 4-byte addressing extension register with the MSB of the address if it is in use
334-
ospi_status_t _ospi_update_4byte_ext_addr_reg(bd_addr_t addr);
334+
ospi_status_t _ospi_update_4byte_ext_addr_reg(mbed::bd_addr_t addr);
335335

336336
/*********************************/
337337
/* Flash Configuration Functions */

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_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/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class SPIFBlockDevice : public mbed::BlockDevice {
280280
mbed::sfdp_hdr_info _sfdp_info;
281281

282282
unsigned int _page_size_bytes; // Page size - 256 Bytes default
283-
bd_size_t _device_size_bytes;
283+
mbed::bd_size_t _device_size_bytes;
284284

285285
// Bus configuration
286286
unsigned int _address_size; // number of bytes for address

0 commit comments

Comments
 (0)