Example of global callback routine
| 6 | |
| 7 | //*** Example of global callback routine |
| 8 | void 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 | |
| 14 | void echoCallback(Stream& stream, char arrivedChar, unsigned short availableCharsCount) |
| 15 | { |