MCPcopy Create free account
hub / github.com/SmingHub/Sming / showInfo

Function showInfo

samples/Basic_Ota/app/application.cpp:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void showInfo()
113{
114 Serial.println();
115 Serial << _F("SDK: v") << system_get_sdk_version() << endl;
116 Serial << _F("Free Heap: ") << system_get_free_heap_size() << endl;
117 Serial << _F("CPU Frequency: ") << system_get_cpu_freq() << " MHz" << endl;
118 Serial << _F("System Chip ID: ") << String(system_get_chip_id(), HEX) << endl;
119 Serial << _F("SPI Flash ID: ") << String(Storage::spiFlash->getId(), HEX) << endl;
120 Serial << _F("SPI Flash Size: ") << String(Storage::spiFlash->getSize(), HEX) << endl;
121
122 auto before = ota.getRunningPartition();
123 auto after = ota.getNextBootPartition();
124
125 Serial << _F("Current ") << before.name() << " @ 0x" << String(before.address(), HEX) << ", future " << after.name()
126 << " @ 0x" << String(after.address(), HEX) << endl;
127}
128
129void showPrompt()
130{

Callers 1

handleCommandFunction · 0.70

Calls 12

printlnMethod · 0.80
addressMethod · 0.80
system_get_sdk_versionFunction · 0.50
system_get_cpu_freqFunction · 0.50
StringClass · 0.50
system_get_chip_idFunction · 0.50
getIdMethod · 0.45
getSizeMethod · 0.45
getRunningPartitionMethod · 0.45
getNextBootPartitionMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected