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

Commit 37e3bcf

Browse files
author
Offir Kochalsky
committed
Fix undefined macro in ARM compiler
1 parent b583788 commit 37e3bcf

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
@@ -668,7 +671,10 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(uint32_t basic_table_addr, s
668671
if (true == shouldSetQuadEnable) {
669672
// Set Quad Enable and QPI Bus modes if Supported
670673
tr_info("INFO: init - Setting Quad Enable");
671-
_sfdp_set_quad_enabled(param_table);
674+
if (0 != _sfdp_set_quad_enabled(param_table)) {
675+
tr_error("ERROR: Device supports Quad bus, but Quad Enable Failed");
676+
return -1;
677+
}
672678
if (true == is_qpi_mode) {
673679
tr_info("INFO: init - Setting QPI mode");
674680
_sfdp_set_qpi_enabled(param_table);

0 commit comments

Comments
 (0)