MCPcopy Create free account
hub / github.com/SmingHub/Sming / __noinline parseOsMessage

Function __noinline parseOsMessage

samples/LiveDebug/app/application.cpp:424–436  ·  view source on GitHub ↗

* @brief See if the OS debug message is something we're interested in. * @param msg * @retval bool true if we want to report this */

Source from the content-addressed store, hash-verified

422 * @retval bool true if we want to report this
423 */
424bool __noinline parseOsMessage(OsMessage& msg)
425{
426 m_printf(_F("[OS] %s\r\n"), msg.getBuffer());
427 if(msg.startsWith(_F("E:M "))) {
428 Serial.println(_F("** OS Memory Error **"));
429 return true;
430 } else if(msg.contains(_F(" assert "))) {
431 Serial.println(_F("** OS Assert **"));
432 return true;
433 } else {
434 return false;
435 }
436}
437
438/**
439 * @brief Called when the OS outputs a debug message using os_printf, etc.

Callers

nothing calls this directly

Calls 5

m_printfFunction · 0.85
printlnMethod · 0.80
getBufferMethod · 0.45
startsWithMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected