A code sample showing the use of the asynchronous Serial APIs.

Dependencies:   mbed

Beware: this example is only compatible with boards supporting the asynchronous APIs!

Information

All examples in this repo are considered EXPERIMENTAL QUALITY, meaning this code has been created as one-off proof-of-concept and is suitable as a demonstration for experimental purposes only. This code will not be regularly maintained by Silicon Labs and there is no guarantee that these projects will work across all environments, SDK versions and hardware.

Revision:
5:997e92a78a3b
Parent:
4:bbf422ee69e4
--- a/main.cpp	Wed Jun 24 07:28:48 2015 +0000
+++ b/main.cpp	Mon Aug 10 07:51:09 2015 +0000
@@ -58,6 +58,12 @@
     LED = !LED;
 }
 
+/**
+* This is a callback! Do not call frequency-dependent operations here.
+*
+* For a more thorough explanation, go here: 
+* https://developer.mbed.org/teams/SiliconLabs/wiki/Using-the-improved-mbed-sleep-API#mixing-sleep-with-synchronous-code
+**/
 void serialCb(int events) {
     /* Something triggered the callback, either buffer is full or 'S' is received */
     unsigned char i;