mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Added missing check for failure on umm_push_heap calls in Esp.cpp (#7767)
Added lost comments for Esp.h
This commit is contained in:
parent
fd69945abc
commit
9eb618e3af
@ -984,15 +984,20 @@ void EspClass::enableVM()
|
||||
void EspClass::setExternalHeap()
|
||||
{
|
||||
#ifdef UMM_HEAP_EXTERNAL
|
||||
if (vmEnabled)
|
||||
umm_push_heap(UMM_HEAP_EXTERNAL);
|
||||
if (vmEnabled) {
|
||||
if (!umm_push_heap(UMM_HEAP_EXTERNAL)) {
|
||||
panic();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void EspClass::setIramHeap()
|
||||
{
|
||||
#ifdef UMM_HEAP_IRAM
|
||||
umm_push_heap(UMM_HEAP_IRAM);
|
||||
if (!umm_push_heap(UMM_HEAP_IRAM)) {
|
||||
panic();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -215,10 +215,41 @@ class EspClass {
|
||||
#else
|
||||
uint32_t getCycleCount();
|
||||
#endif // !defined(CORE_MOCK)
|
||||
/**
|
||||
* @brief Installs VM exception handler to support External memory (Experimental)
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
void enableVM();
|
||||
/**
|
||||
* @brief Push current Heap selection and set Heap selection to DRAM.
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
void setDramHeap();
|
||||
/**
|
||||
* @brief Push current Heap selection and set Heap selection to IRAM.
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
void setIramHeap();
|
||||
/**
|
||||
* @brief Push current Heap selection and set Heap selection to External. (Experimental)
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
void setExternalHeap();
|
||||
/**
|
||||
* @brief Restores Heap selection back to value present when
|
||||
* setDramHeap, setIramHeap, or setExternalHeap was called.
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
void resetHeap();
|
||||
private:
|
||||
#ifdef UMM_HEAP_EXTERNAL
|
||||
|
Loading…
x
Reference in New Issue
Block a user