platform: provide free ram metrics

This commit is contained in:
Torrie Fischer 2023-02-18 15:43:15 +01:00
parent 2a602225d2
commit 56e2e76954
2 changed files with 9 additions and 0 deletions

View File

@ -68,6 +68,14 @@ Platform::version()
#endif
}
int
Platform::freeRam()
{
#ifdef BOARD_ESP8266
return ESP.getFreeHeap();
#endif
}
void
Platform::preSetup()
{

View File

@ -32,6 +32,7 @@ class Platform : public Task {
void loop() override;
static bool getLocalTime(struct tm* timedata);
static const char* deviceID();
static int freeRam();
struct TaskRegistration {
Task* task = 0;