forked from espressif/arduino-esp32
C++23 enable in CMakeLists.txt
This commit is contained in:
@ -25,6 +25,7 @@ set(requires spi_flash mbedtls wifi_provisioning driver)
|
||||
set(priv_requires nvs_flash bootloader_support espcpputils fmt)
|
||||
|
||||
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
|
||||
set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 23)
|
||||
|
||||
if(IDF_TARGET STREQUAL "esp32")
|
||||
target_compile_options(${COMPONENT_TARGET} PUBLIC -DARDUINO=10812 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="esp32" -DESP32)
|
||||
|
@ -1278,7 +1278,7 @@ uint32_t spiFrequencyToClockDiv(uint32_t freq)
|
||||
memcpy(&bestReg, ®, sizeof(bestReg));
|
||||
break;
|
||||
} else if(calFreq < (int32_t) freq) {
|
||||
if(abs(freq - calFreq) < abs(freq - bestFreq)) {
|
||||
if(freq - calFreq < freq - bestFreq) {
|
||||
bestFreq = calFreq;
|
||||
memcpy(&bestReg, ®, sizeof(bestReg));
|
||||
}
|
||||
|
Reference in New Issue
Block a user