Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement EspClass::getFreeContStack method #5133

Merged
merged 3 commits into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cores/esp8266/Esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "interrupts.h"
#include "MD5Builder.h"
#include "umm_malloc/umm_malloc.h"
#include "cont.h"

extern "C" {
#include "user_interface.h"
Expand Down Expand Up @@ -177,6 +178,11 @@ uint16_t EspClass::getMaxFreeBlockSize(void)
return umm_max_block_size();
}

uint32_t EspClass::getFreeContStack()
{
return cont_get_free_stack(g_pcont);
}

uint32_t EspClass::getChipId(void)
{
return system_get_chip_id();
Expand Down
2 changes: 2 additions & 0 deletions cores/esp8266/Esp.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ class EspClass {
uint8_t getHeapFragmentation(); // in %
void getHeapStats(uint32_t* free = nullptr, uint16_t* max = nullptr, uint8_t* frag = nullptr);

uint32_t getFreeContStack();

const char * getSdkVersion();
String getCoreVersion();
String getFullVersion();
Expand Down