esp32/esp32s2beta: Extract common SPIRAM options into esp_commmon component

This commit is contained in:
Angus Gratton
2019-06-05 14:34:19 +10:00
committed by suda-morris
parent 06e31e243c
commit ddbd09eb15
28 changed files with 156 additions and 238 deletions

View File

@@ -504,13 +504,13 @@ int pthread_once(pthread_once_t *once_control, void (*init_routine)(void))
}
uint32_t res = 1;
#if defined(CONFIG_ESP32_SPIRAM_SUPPORT)
#if defined(CONFIG_SPIRAM)
if (esp_ptr_external_ram(once_control)) {
uxPortCompareSetExtram((uint32_t *) &once_control->init_executed, 0, &res);
} else {
#endif
uxPortCompareSet((uint32_t *) &once_control->init_executed, 0, &res);
#if defined(CONFIG_ESP32_SPIRAM_SUPPORT)
#if defined(CONFIG_SPIRAM)
}
#endif
// Check if compare and set was successful