Skip to content

Commit 0e0e34c

Browse files
authoredSep 13, 2018
implement EspClass::getFreeContStack method (#5133)
* implement EspClass::getFreeContStack method * Remove unneeded extern * Really remove unneeded extern
1 parent 7e1bdb2 commit 0e0e34c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎cores/esp8266/Esp.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "interrupts.h"
2626
#include "MD5Builder.h"
2727
#include "umm_malloc/umm_malloc.h"
28+
#include "cont.h"
2829

2930
extern "C" {
3031
#include "user_interface.h"
@@ -177,6 +178,11 @@ uint16_t EspClass::getMaxFreeBlockSize(void)
177178
return umm_max_block_size();
178179
}
179180

181+
uint32_t EspClass::getFreeContStack()
182+
{
183+
return cont_get_free_stack(g_pcont);
184+
}
185+
180186
uint32_t EspClass::getChipId(void)
181187
{
182188
return system_get_chip_id();

‎cores/esp8266/Esp.h

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ class EspClass {
110110
uint8_t getHeapFragmentation(); // in %
111111
void getHeapStats(uint32_t* free = nullptr, uint16_t* max = nullptr, uint8_t* frag = nullptr);
112112

113+
uint32_t getFreeContStack();
114+
113115
const char * getSdkVersion();
114116
String getCoreVersion();
115117
String getFullVersion();

0 commit comments

Comments
 (0)
Please sign in to comment.