AmbiqSuiteSDK
AmbiqSuiteSDK copied to clipboard
apollo3.h conflict with #define OVERFLOW
trafficstars
Some type definitions in apollo3.h use the identifier OVERFLOW however when it has already been defined as a numeric constant (for example by math library headers) this error arises:
error: expected unqualified-id before numeric constant
One potential solution is to undefine OVERFLOW if it is defined when apollo3.h is included.
This solution may have been instituted in the past: e346c6f
However that solution left OVERFLOW undefined. The new solution in 2.4.2-patch-fullduplex-spi stores the previous value of OVERFLOW and restores it at the end of the file
This issue persists in AmbiqSuite SDK 2.5.1 and has a corresponding patch branch