From 8ca0e9f1610500b71d41d87cd81e8eadfbd9661d Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 4 Oct 2019 15:52:47 +0200 Subject: [PATCH] BlockDevices: specify mbed namespace where needed --- .../include/DataFlash/DataFlashBlockDevice.h | 2 +- .../include/FlashIAP/FlashIAPBlockDevice.h | 2 +- .../include/I2CEE/I2CEEBlockDevice.h | 20 +++++++++---------- .../include/OSPIF/OSPIFBlockDevice.h | 4 ++-- .../include/QSPIF/QSPIFBlockDevice.h | 4 ++-- .../include/SPIF/SPIFBlockDevice.h | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h b/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h index 215f8594c0..53dd0f17ae 100644 --- a/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h +++ b/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h @@ -197,7 +197,7 @@ private: void _write_enable(bool enable); int _sync(void); int _write_page(const uint8_t *buffer, uint32_t addr, uint32_t offset, uint32_t size); - uint32_t _translate_address(bd_addr_t addr); + uint32_t _translate_address(mbed::bd_addr_t addr); // Mutex for thread safety mutable PlatformMutex _mutex; diff --git a/storage/blockdevice/COMPONENT_FLASHIAP/include/FlashIAP/FlashIAPBlockDevice.h b/storage/blockdevice/COMPONENT_FLASHIAP/include/FlashIAP/FlashIAPBlockDevice.h index 1ba0e986fe..4a44a27f4e 100644 --- a/storage/blockdevice/COMPONENT_FLASHIAP/include/FlashIAP/FlashIAPBlockDevice.h +++ b/storage/blockdevice/COMPONENT_FLASHIAP/include/FlashIAP/FlashIAPBlockDevice.h @@ -134,7 +134,7 @@ public: * @param size Size to erase in bytes * @return True if erase is valid for underlying block device */ - virtual bool is_valid_erase(bd_addr_t addr, bd_size_t size) const; + virtual bool is_valid_erase(mbed::bd_addr_t addr, mbed::bd_size_t size) const; private: diff --git a/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h b/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h index 8bc1368211..09cc12775c 100644 --- a/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h +++ b/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h @@ -72,7 +72,7 @@ public: */ I2CEEBlockDevice( PinName sda, PinName scl, uint8_t address, - bd_size_t size, bd_size_t block = 32, + mbed::bd_size_t size, mbed::bd_size_t block = 32, int bus_speed = 400000, bool address_is_eight_bit = false); @@ -89,7 +89,7 @@ public: */ I2CEEBlockDevice( mbed::I2C *i2c_obj, uint8_t address, - bd_size_t size, bd_size_t block = 32, + mbed::bd_size_t size, mbed::bd_size_t block = 32, bool address_is_eight_bit = false); /** Destructor of I2CEEBlockDevice @@ -116,7 +116,7 @@ public: * @param size Size to read in bytes, must be a multiple of read block size * @return 0 on success, negative error code on failure */ - virtual int read(void *buffer, bd_addr_t addr, bd_size_t size); + virtual int read(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size); /** Program blocks to a block device * @@ -127,7 +127,7 @@ public: * @param size Size to write in bytes, must be a multiple of program block size * @return 0 on success, negative error code on failure */ - virtual int program(const void *buffer, bd_addr_t addr, bd_size_t size); + virtual int program(const void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size); /** Erase blocks on a block device * @@ -137,33 +137,33 @@ public: * @param size Size to erase in bytes, must be a multiple of erase block size * @return 0 on success, negative error code on failure */ - virtual int erase(bd_addr_t addr, bd_size_t size); + virtual int erase(mbed::bd_addr_t addr, mbed::bd_size_t size); /** Get the size of a readable block * * @return Size of a readable block in bytes */ - virtual bd_size_t get_read_size() const; + virtual mbed::bd_size_t get_read_size() const; /** Get the size of a programable block * * @return Size of a programable block in bytes * @note Must be a multiple of the read size */ - virtual bd_size_t get_program_size() const; + virtual mbed::bd_size_t get_program_size() const; /** Get the size of a eraseable block * * @return Size of a eraseable block in bytes * @note Must be a multiple of the program size */ - virtual bd_size_t get_erase_size() const; + virtual mbed::bd_size_t get_erase_size() const; /** Get the total size of the underlying device * * @return Size of the underlying device in bytes */ - virtual bd_size_t size() const; + virtual mbed::bd_size_t size() const; /** Get the BlockDevice class type. * @@ -189,7 +189,7 @@ private: * @param address An address in the requested page. * @return The device's I2C address for that page */ - uint8_t get_paged_device_address(bd_addr_t address); + uint8_t get_paged_device_address(mbed::bd_addr_t address); }; diff --git a/storage/blockdevice/COMPONENT_OSPIF/include/OSPIF/OSPIFBlockDevice.h b/storage/blockdevice/COMPONENT_OSPIF/include/OSPIF/OSPIFBlockDevice.h index 98b0873265..b61f0ebb1e 100644 --- a/storage/blockdevice/COMPONENT_OSPIF/include/OSPIF/OSPIFBlockDevice.h +++ b/storage/blockdevice/COMPONENT_OSPIF/include/OSPIF/OSPIFBlockDevice.h @@ -68,7 +68,7 @@ */ enum ospif_bd_error { OSPIF_BD_ERROR_OK = 0, /*!< no error */ - OSPIF_BD_ERROR_DEVICE_ERROR = BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */ + OSPIF_BD_ERROR_DEVICE_ERROR = mbed::BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */ OSPIF_BD_ERROR_PARSING_FAILED = -4002, /* SFDP Parsing failed */ OSPIF_BD_ERROR_READY_FAILED = -4003, /* Wait for Mem Ready failed */ OSPIF_BD_ERROR_WREN_FAILED = -4004, /* Write Enable Failed */ @@ -331,7 +331,7 @@ private: ospi_status_t _ospi_set_frequency(int freq); // Update the 4-byte addressing extension register with the MSB of the address if it is in use - ospi_status_t _ospi_update_4byte_ext_addr_reg(bd_addr_t addr); + ospi_status_t _ospi_update_4byte_ext_addr_reg(mbed::bd_addr_t addr); /*********************************/ /* Flash Configuration Functions */ diff --git a/storage/blockdevice/COMPONENT_QSPIF/include/QSPIF/QSPIFBlockDevice.h b/storage/blockdevice/COMPONENT_QSPIF/include/QSPIF/QSPIFBlockDevice.h index 44e5a85551..1aae02bf4c 100644 --- a/storage/blockdevice/COMPONENT_QSPIF/include/QSPIF/QSPIFBlockDevice.h +++ b/storage/blockdevice/COMPONENT_QSPIF/include/QSPIF/QSPIFBlockDevice.h @@ -53,7 +53,7 @@ */ enum qspif_bd_error { QSPIF_BD_ERROR_OK = 0, /*!< no error */ - QSPIF_BD_ERROR_DEVICE_ERROR = BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */ + QSPIF_BD_ERROR_DEVICE_ERROR = mbed::BD_ERROR_DEVICE_ERROR, /*!< device specific error -4001 */ QSPIF_BD_ERROR_PARSING_FAILED = -4002, /* SFDP Parsing failed */ QSPIF_BD_ERROR_READY_FAILED = -4003, /* Wait for Mem Ready failed */ QSPIF_BD_ERROR_WREN_FAILED = -4004, /* Write Enable Failed */ @@ -289,7 +289,7 @@ private: qspi_status_t _qspi_set_frequency(int freq); // Update the 4-byte addressing extension register with the MSB of the address if it is in use - qspi_status_t _qspi_update_4byte_ext_addr_reg(bd_addr_t addr); + qspi_status_t _qspi_update_4byte_ext_addr_reg(mbed::bd_addr_t addr); /*********************************/ /* Flash Configuration Functions */ diff --git a/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h b/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h index 23da6f6f4a..13b7bfd851 100644 --- a/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h +++ b/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h @@ -280,7 +280,7 @@ private: mbed::sfdp_hdr_info _sfdp_info; unsigned int _page_size_bytes; // Page size - 256 Bytes default - bd_size_t _device_size_bytes; + mbed::bd_size_t _device_size_bytes; // Bus configuration unsigned int _address_size; // number of bytes for address