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

Function onDataCallback

samples/Basic_Serial/app/SerialReadingDelegateDemo.cpp:8–12  ·  view source on GitHub ↗

Example of global callback routine

Source from the content-addressed store, hash-verified

6
7//*** Example of global callback routine
8void onDataCallback(Stream& stream, char arrivedChar, unsigned short availableCharsCount)
9{
10 // Note: we're using the global Serial here, but it may not be the same port as stream
11 Serial << "Char: " << uint8_t(arrivedChar) << ", Count: " << availableCharsCount << endl;
12}
13
14void echoCallback(Stream& stream, char arrivedChar, unsigned short availableCharsCount)
15{

Callers 1

onReceiveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected