mirror of https://github.com/ARMmbed/mbed-os.git
BlockDevices: specify mbed namespace where needed
parent
956b19775c
commit
8ca0e9f161
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue