Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 338a288

Browse files
author
Offir Kochalsky
committed
Fix undefined macro in ARM compiler
1 parent d53abc2 commit 338a288

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

QSPIFBlockDevice.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ using namespace mbed;
2929
#define QSPIF_DEFAULT_PAGE_SIZE 256
3030
#define QSPIF_DEFAULT_SE_SIZE 4096
3131
#define QSPI_MAX_STATUS_REGISTER_SIZE 2
32+
#ifndef UINT64_MAX
33+
#define UINT64_MAX -1
34+
#endif
3235
#define QSPI_NO_ADDRESS_COMMAND UINT64_MAX
3336
// Status Register Bits
3437
#define QSPIF_STATUS_BIT_WIP 0x1 //Write In Progress
@@ -669,7 +672,10 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(uint32_t basic_table_addr, s
669672
if (true == shouldSetQuadEnable) {
670673
// Set Quad Enable and QPI Bus modes if Supported
671674
tr_info("INFO: init - Setting Quad Enable");
672-
_sfdp_set_quad_enabled(param_table);
675+
if (0 != _sfdp_set_quad_enabled(param_table)) {
676+
tr_error("ERROR: Device supports Quad bus, but Quad Enable Failed");
677+
return -1;
678+
}
673679
if (true == is_qpi_mode) {
674680
tr_info("INFO: init - Setting QPI mode");
675681
_sfdp_set_qpi_enabled(param_table);

0 commit comments

Comments
 (0)