@@ -241,7 +241,7 @@ int QSPIFBlockDevice::init()
241
241
242
242
/* *************************** Parse Basic Parameters Table ***********************************/
243
243
if (_sfdp_parse_basic_param_table (callback (this , &QSPIFBlockDevice::_qspi_send_read_sfdp_command),
244
- _sfdp_info. bptbl . addr , _sfdp_info. bptbl . size ) < 0 ) {
244
+ _sfdp_info) < 0 ) {
245
245
tr_error (" Init - Parse Basic Param Table Failed" );
246
246
status = QSPIF_BD_ERROR_PARSING_FAILED;
247
247
goto exit_point;
@@ -616,11 +616,11 @@ int QSPIFBlockDevice::remove_csel_instance(PinName csel)
616
616
/* ********* SFDP Parsing and Detection Functions *********/
617
617
/* ********************************************************/
618
618
int QSPIFBlockDevice::_sfdp_parse_basic_param_table (Callback<int (bd_addr_t , void *, bd_size_t )> sfdp_reader,
619
- uint32_t basic_table_addr, size_t basic_table_size )
619
+ sfdp_hdr_info &sfdp_info )
620
620
{
621
621
uint8_t param_table[SFDP_BASIC_PARAMS_TBL_SIZE]; /* Up To 20 DWORDS = 80 Bytes */
622
622
623
- int status = sfdp_reader (basic_table_addr , param_table, basic_table_size );
623
+ int status = sfdp_reader (sfdp_info. bptbl . addr , param_table, sfdp_info. bptbl . size );
624
624
if (status != QSPI_STATUS_OK) {
625
625
tr_error (" Init - Read SFDP First Table Failed" );
626
626
return -1 ;
@@ -640,7 +640,7 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(Callback<int(bd_addr_t, void
640
640
_device_size_bytes = (density_bits + 1 ) / 8 ;
641
641
642
642
// Set Page Size (QSPI write must be done on Page limits)
643
- _page_size_bytes = sfdp_detect_page_size (param_table, basic_table_size );
643
+ _page_size_bytes = sfdp_detect_page_size (param_table, sfdp_info. bptbl . size );
644
644
645
645
if (_sfdp_detect_reset_protocol_and_reset (param_table) != QSPIF_BD_ERROR_OK) {
646
646
tr_error (" Init - Detecting reset protocol/resetting failed" );
@@ -657,7 +657,7 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(Callback<int(bd_addr_t, void
657
657
}
658
658
659
659
// Detect and Set fastest Bus mode (default 1-1-1)
660
- _sfdp_detect_best_bus_read_mode (param_table, basic_table_size , shouldSetQuadEnable, is_qpi_mode);
660
+ _sfdp_detect_best_bus_read_mode (param_table, sfdp_info. bptbl . size , shouldSetQuadEnable, is_qpi_mode);
661
661
if (true == shouldSetQuadEnable) {
662
662
if (_needs_fast_mode) {
663
663
_enable_fast_mode ();
@@ -677,7 +677,7 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(Callback<int(bd_addr_t, void
677
677
#ifndef TARGET_NORDIC
678
678
// 4 byte addressing is not currently supported with the Nordic QSPI controller
679
679
if (_attempt_4_byte_addressing) {
680
- if (_sfdp_detect_and_enable_4byte_addressing (param_table, basic_table_size ) != QSPIF_BD_ERROR_OK) {
680
+ if (_sfdp_detect_and_enable_4byte_addressing (param_table, sfdp_info. bptbl . size ) != QSPIF_BD_ERROR_OK) {
681
681
tr_error (" Init - Detecting/enabling 4-byte addressing failed" );
682
682
return -1 ;
683
683
}
0 commit comments