mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Add stack repainting call to ESP class (#5221)
Allow the unused stack to be reset to the check value at any time in the application, allowing for delta-stack calculations to be done. Add ESP.resetFreeContStack() class method for general use. Add in some dumping in the BearSSL_Validation example to show the usage for those that care.
This commit is contained in:
committed by
GitHub
parent
d17ffc2874
commit
1b1b0a28a8
@ -38,6 +38,8 @@ void fetchURL(BearSSL::WiFiClientSecure *client, const char *host, const uint16_
|
||||
path = "/";
|
||||
}
|
||||
|
||||
ESP.resetFreeContStack();
|
||||
uint32_t freeStackStart = ESP.getFreeContStack();
|
||||
Serial.printf("Trying: %s:443...", host);
|
||||
client->connect(host, port);
|
||||
if (!client->connected()) {
|
||||
@ -72,7 +74,8 @@ void fetchURL(BearSSL::WiFiClientSecure *client, const char *host, const uint16_
|
||||
} while (millis() < to);
|
||||
}
|
||||
client->stop();
|
||||
Serial.printf("\n-------\n\n");
|
||||
uint32_t freeStackEnd = ESP.getFreeContStack();
|
||||
Serial.printf("\nCONT stack used: %d\n-------\n\n", freeStackStart - freeStackEnd);
|
||||
}
|
||||
|
||||
void fetchNoConfig() {
|
||||
|
Reference in New Issue
Block a user