Skip to content

Commit

Permalink
Merge pull request #3890 from GUVWAF/rp2040heap
Browse files Browse the repository at this point in the history
RP2040: Add `getFreeHeap()` and `getHeapSize()` support
  • Loading branch information
caveman99 authored May 14, 2024
2 parents 3b5d4e9 + 1f9ff68 commit c12b9b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/memGet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ uint32_t MemGet::getFreeHeap()
return ESP.getFreeHeap();
#elif defined(ARCH_NRF52)
return dbgHeapFree();
#elif defined(ARCH_RP2040)
return rp2040.getFreeHeap();
#else
// this platform does not have heap management function implemented
return UINT32_MAX;
Expand All @@ -38,6 +40,8 @@ uint32_t MemGet::getHeapSize()
return ESP.getHeapSize();
#elif defined(ARCH_NRF52)
return dbgHeapTotal();
#elif defined(ARCH_RP2040)
return rp2040.getTotalHeap();
#else
// this platform does not have heap management function implemented
return UINT32_MAX;
Expand Down

0 comments on commit c12b9b9

Please sign in to comment.