Skip to content

Commit

Permalink
implement EspClass::getFreeContStack method (#5133)
Browse files Browse the repository at this point in the history
* implement EspClass::getFreeContStack method

* Remove unneeded extern

* Really remove unneeded extern
  • Loading branch information
devyte authored Sep 13, 2018
1 parent 7e1bdb2 commit 0e0e34c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 0e0e34c

Please sign in to comment.