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

Function serialCallBack

samples/Basic_Ota/app/application.cpp:218–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218void serialCallBack(Stream& stream, char, uint16_t)
219{
220 switch(commandBuffer.process(stream, Serial)) {
221 case LineBufferBase::Action::submit:
222 if(commandBuffer) {
223 handleCommand(String(commandBuffer));
224 commandBuffer.clear();
225 }
226 showPrompt();
227 break;
228 case LineBufferBase::Action::clear:
229 showPrompt();
230 break;
231 default:;
232 }
233}
234
235} // namespace
236

Callers

nothing calls this directly

Calls 5

handleCommandFunction · 0.70
showPromptFunction · 0.70
StringClass · 0.50
processMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected