Skip to content

Commit 6d6c09b

Browse files
committed
blockdevice: fix coding style
1 parent d3e51fc commit 6d6c09b

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

components/storage/blockdevice/COMPONENT_FLASHIAP/FlashIAPBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class FlashIAPBlockDevice : public BlockDevice {
3636
*/
3737
FlashIAPBlockDevice(uint32_t address = MBED_CONF_FLASHIAP_BLOCK_DEVICE_BASE_ADDRESS,
3838
uint32_t size = MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE);
39-
39+
4040
virtual ~FlashIAPBlockDevice();
4141

4242
/** Initialize a block device

components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ enum qspif_polarity_mode {
4343
QSPIF_POLARITY_MODE_1 /* CPOL=1, CPHA=1 */
4444
};
4545

46-
#define QSPIF_MAX_REGIONS 10
46+
#define QSPIF_MAX_REGIONS 10
4747
#define MAX_NUM_OF_ERASE_TYPES 4
4848
#define QSPIF_MAX_ACTIVE_FLASH_DEVICES 10
4949

@@ -121,7 +121,10 @@ class QSPIFBlockDevice : public BlockDevice {
121121

122122
/** Desctruct QSPIFBlockDevie
123123
*/
124-
~QSPIFBlockDevice() {deinit();}
124+
~QSPIFBlockDevice()
125+
{
126+
deinit();
127+
}
125128

126129
/** Read blocks from a block device
127130
*
@@ -227,7 +230,7 @@ class QSPIFBlockDevice : public BlockDevice {
227230
/********************************/
228231
// Send Program => Write command to Driver
229232
qspi_status_t _qspi_send_program_command(unsigned int prog_instruction, const void *buffer, bd_addr_t addr,
230-
bd_size_t *size);
233+
bd_size_t *size);
231234

232235
// Send Read command to Driver
233236
qspi_status_t _qspi_send_read_command(unsigned int read_instruction, void *buffer, bd_addr_t addr, bd_size_t size);
@@ -237,7 +240,7 @@ class QSPIFBlockDevice : public BlockDevice {
237240

238241
// Send Generic command_transfer command to Driver
239242
qspi_status_t _qspi_send_general_command(unsigned int instruction_int, bd_addr_t addr, const char *tx_buffer,
240-
size_t tx_length, const char *rx_buffer, size_t rx_length);
243+
size_t tx_length, const char *rx_buffer, size_t rx_length);
241244

242245
// Send Bus configure_format command to Driver
243246
qspi_status_t _qspi_configure_format(qspi_bus_width_t inst_width, qspi_bus_width_t address_width,
@@ -266,8 +269,8 @@ class QSPIFBlockDevice : public BlockDevice {
266269
/* SFDP Detection and Parsing Functions */
267270
/****************************************/
268271
// Parse SFDP Headers and retrieve Basic Param and Sector Map Tables (if exist)
269-
int _sfdp_parse_sfdp_headers(uint32_t& basic_table_addr, size_t& basic_table_size,
270-
uint32_t& sector_map_table_addr, size_t& sector_map_table_size);
272+
int _sfdp_parse_sfdp_headers(uint32_t &basic_table_addr, size_t &basic_table_size,
273+
uint32_t &sector_map_table_addr, size_t &sector_map_table_size);
271274

272275
// Parse and Detect required Basic Parameters from Table
273276
int _sfdp_parse_basic_param_table(uint32_t basic_table_addr, size_t basic_table_size);
@@ -276,8 +279,8 @@ class QSPIFBlockDevice : public BlockDevice {
276279
int _sfdp_parse_sector_map_table(uint32_t sector_map_table_addr, size_t sector_map_table_size);
277280

278281
// Detect fastest read Bus mode supported by device
279-
int _sfdp_detect_best_bus_read_mode(uint8_t *basic_param_table_ptr, int basic_param_table_size, bool& set_quad_enable,
280-
bool& is_qpi_mode, unsigned int& read_inst);
282+
int _sfdp_detect_best_bus_read_mode(uint8_t *basic_param_table_ptr, int basic_param_table_size, bool &set_quad_enable,
283+
bool &is_qpi_mode, unsigned int &read_inst);
281284

282285
// Enable Quad mode if supported (1-1-4, 1-4-4, 4-4-4 bus modes)
283286
int _sfdp_set_quad_enabled(uint8_t *basic_param_table_ptr);
@@ -290,8 +293,8 @@ class QSPIFBlockDevice : public BlockDevice {
290293

291294
// Detect all supported erase types
292295
int _sfdp_detect_erase_types_inst_and_size(uint8_t *basic_param_table_ptr, int basic_param_table_size,
293-
unsigned int& erase4k_inst,
294-
unsigned int *erase_type_inst_arr, unsigned int *erase_type_size_arr);
296+
unsigned int &erase4k_inst,
297+
unsigned int *erase_type_inst_arr, unsigned int *erase_type_size_arr);
295298

296299
/***********************/
297300
/* Utilities Functions */
@@ -301,7 +304,7 @@ class QSPIFBlockDevice : public BlockDevice {
301304

302305
// Iterate on all supported Erase Types of the Region to which the offset belong to.
303306
// Iterates from highest type to lowest
304-
int _utils_iterate_next_largest_erase_type(uint8_t& bitfield, int size, int offset, int boundry);
307+
int _utils_iterate_next_largest_erase_type(uint8_t &bitfield, int size, int offset, int boundry);
305308

306309
private:
307310
// Internal Members

0 commit comments

Comments
 (0)