File tree 2 files changed +39
-3
lines changed
2 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -984,15 +984,20 @@ void EspClass::enableVM()
984
984
void EspClass::setExternalHeap ()
985
985
{
986
986
#ifdef UMM_HEAP_EXTERNAL
987
- if (vmEnabled)
988
- umm_push_heap (UMM_HEAP_EXTERNAL);
987
+ if (vmEnabled) {
988
+ if (!umm_push_heap (UMM_HEAP_EXTERNAL)) {
989
+ panic ();
990
+ }
991
+ }
989
992
#endif
990
993
}
991
994
992
995
void EspClass::setIramHeap ()
993
996
{
994
997
#ifdef UMM_HEAP_IRAM
995
- umm_push_heap (UMM_HEAP_IRAM);
998
+ if (!umm_push_heap (UMM_HEAP_IRAM)) {
999
+ panic ();
1000
+ }
996
1001
#endif
997
1002
}
998
1003
Original file line number Diff line number Diff line change @@ -215,10 +215,41 @@ class EspClass {
215
215
#else
216
216
uint32_t getCycleCount ();
217
217
#endif // !defined(CORE_MOCK)
218
+ /* *
219
+ * @brief Installs VM exception handler to support External memory (Experimental)
220
+ *
221
+ * @param none
222
+ * @return none
223
+ */
218
224
void enableVM ();
225
+ /* *
226
+ * @brief Push current Heap selection and set Heap selection to DRAM.
227
+ *
228
+ * @param none
229
+ * @return none
230
+ */
219
231
void setDramHeap ();
232
+ /* *
233
+ * @brief Push current Heap selection and set Heap selection to IRAM.
234
+ *
235
+ * @param none
236
+ * @return none
237
+ */
220
238
void setIramHeap ();
239
+ /* *
240
+ * @brief Push current Heap selection and set Heap selection to External. (Experimental)
241
+ *
242
+ * @param none
243
+ * @return none
244
+ */
221
245
void setExternalHeap ();
246
+ /* *
247
+ * @brief Restores Heap selection back to value present when
248
+ * setDramHeap, setIramHeap, or setExternalHeap was called.
249
+ *
250
+ * @param none
251
+ * @return none
252
+ */
222
253
void resetHeap ();
223
254
private:
224
255
#ifdef UMM_HEAP_EXTERNAL
You can’t perform that action at this time.
0 commit comments