@@ -608,7 +608,7 @@ int QSPIFBlockDevice::_sfdp_parse_sfdp_headers(uint32_t &basic_table_addr, size_
608
608
size_t data_length = QSPIF_SFDP_HEADER_SIZE;
609
609
bd_addr_t addr = 0x0 ;
610
610
611
- qspi_status_t status = _qspi_send_read_sfdp_command (addr, (char *) sfdp_header, data_length);
611
+ qspi_status_t status = _qspi_send_read_sfdp_command (addr, (char *) sfdp_header, data_length);
612
612
if (status != QSPI_STATUS_OK) {
613
613
tr_error (" Init - Read SFDP Failed" );
614
614
return -1 ;
@@ -668,7 +668,7 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(uint32_t basic_table_addr, s
668
668
{
669
669
uint8_t param_table[SFDP_DEFAULT_BASIC_PARAMS_TABLE_SIZE_BYTES]; /* Up To 16 DWORDS = 64 Bytes */
670
670
671
- qspi_status_t status = _qspi_send_read_sfdp_command (basic_table_addr, (char *) param_table, basic_table_size);
671
+ qspi_status_t status = _qspi_send_read_sfdp_command (basic_table_addr, (char *) param_table, basic_table_size);
672
672
if (status != QSPI_STATUS_OK) {
673
673
tr_error (" Init - Read SFDP First Table Failed" );
674
674
return -1 ;
@@ -684,7 +684,7 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(uint32_t basic_table_addr, s
684
684
uint32_t density_bits = ((param_table[7 ] << 24 ) |
685
685
(param_table[6 ] << 16 ) |
686
686
(param_table[5 ] << 8 ) |
687
- param_table[4 ]);
687
+ param_table[4 ]);
688
688
_device_size_bytes = (density_bits + 1 ) / 8 ;
689
689
690
690
// Set Page Size (QSPI write must be done on Page limits)
@@ -1091,7 +1091,7 @@ int QSPIFBlockDevice::_sfdp_detect_reset_protocol_and_reset(uint8_t *basic_param
1091
1091
// Issue instruction 66h to enable resets on the device
1092
1092
// Then issue instruction 99h to reset the device
1093
1093
qspi_status_t qspi_status = _qspi_send_general_command (0x66 , QSPI_NO_ADDRESS_COMMAND, // Send reset enable instruction
1094
- NULL , 0 , NULL , 0 );
1094
+ NULL , 0 , NULL , 0 );
1095
1095
if (qspi_status == QSPI_STATUS_OK) {
1096
1096
qspi_status = _qspi_send_general_command (0x99 , QSPI_NO_ADDRESS_COMMAND, // Send reset instruction
1097
1097
NULL , 0 , NULL , 0 );
@@ -1102,7 +1102,7 @@ int QSPIFBlockDevice::_sfdp_detect_reset_protocol_and_reset(uint8_t *basic_param
1102
1102
status = QSPIF_BD_ERROR_PARSING_FAILED;
1103
1103
}
1104
1104
1105
- if (status == QSPIF_BD_ERROR_OK){
1105
+ if (status == QSPIF_BD_ERROR_OK) {
1106
1106
if (false == _is_mem_ready ()) {
1107
1107
tr_error (" Device not ready, reset failed" );
1108
1108
status = QSPIF_BD_ERROR_READY_FAILED;
@@ -1181,8 +1181,8 @@ int QSPIFBlockDevice::_clear_block_protection()
1181
1181
1182
1182
/* Read Manufacturer ID (1byte), and Device ID (2bytes) */
1183
1183
qspi_status_t status = _qspi_send_general_command (QSPIF_INST_RDID, QSPI_NO_ADDRESS_COMMAND,
1184
- NULL , 0 ,
1185
- (char *) vendor_device_ids, QSPI_RDID_DATA_LENGTH);
1184
+ NULL , 0 ,
1185
+ (char *) vendor_device_ids, QSPI_RDID_DATA_LENGTH);
1186
1186
if (QSPI_STATUS_OK != status) {
1187
1187
tr_error (" Read Vendor ID Failed" );
1188
1188
return -1 ;
@@ -1468,7 +1468,7 @@ qspi_status_t QSPIFBlockDevice::_qspi_send_read_sfdp_command(bd_addr_t addr, voi
1468
1468
// SFDP read instruction requires 1-1-1 bus mode with 8 dummy cycles and a 3-byte address
1469
1469
_qspi.configure_format (QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_SINGLE, QSPI_CFG_ADDR_SIZE_24, QSPI_CFG_BUS_SINGLE,
1470
1470
QSPI_CFG_ALT_SIZE_8, QSPI_CFG_BUS_SINGLE, QSPIF_RSFDP_DUMMY_CYCLES);
1471
- qspi_status_t status = _qspi.read (QSPIF_INST_RSFDP, -1 , (unsigned int ) addr, (char *) rx_buffer, &rx_len);
1471
+ qspi_status_t status = _qspi.read (QSPIF_INST_RSFDP, -1 , (unsigned int ) addr, (char *) rx_buffer, &rx_len);
1472
1472
// All commands other than Read and RSFDP use default 1-1-1 bus mode (Program/Erase are constrained by flash memory performance more than bus performance)
1473
1473
_qspi.configure_format (QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_SINGLE, _address_size, QSPI_CFG_BUS_SINGLE,
1474
1474
QSPI_CFG_ALT_SIZE_8, QSPI_CFG_BUS_SINGLE, 0 );
@@ -1484,8 +1484,8 @@ qspi_status_t QSPIFBlockDevice::_qspi_read_status_registers(uint8_t *reg_buffer)
1484
1484
{
1485
1485
// Read Status Register 1
1486
1486
qspi_status_t status = _qspi_send_general_command (QSPIF_INST_RSR1, QSPI_NO_ADDRESS_COMMAND,
1487
- NULL , 0 ,
1488
- (char *) ®_buffer[0 ], 1 );
1487
+ NULL , 0 ,
1488
+ (char *) ®_buffer[0 ], 1 );
1489
1489
if (QSPI_STATUS_OK == status) {
1490
1490
tr_debug (" Reading Status Register 1 Success: value = 0x%x" , (int ) reg_buffer[0 ]);
1491
1491
} else {
0 commit comments