library to modify and read program variable in runtime from a serial console. You can reset as well the mbed from the console without pushing buttons. Handy for debugging from the online compiler as you can change the behavior of the program without need to recompile each time.
Revision 10:34d368966675, committed 2014-08-26
- Comitter:
- julmbed
- Date:
- Tue Aug 26 06:44:16 2014 +0000
- Parent:
- 9:d081aa4e4418
- Child:
- 11:a3af7a5e03d2
- Commit message:
- converted worker2 from friend to static private to avoid clutter in namespace;
Changed in this revision
VarStore.cpp | Show annotated file Show diff for this revision Revisions of this file |
VarStore.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/VarStore.cpp Mon Aug 25 20:44:39 2014 +0000 +++ b/VarStore.cpp Tue Aug 26 06:44:16 2014 +0000 @@ -112,9 +112,8 @@ * ********************************/ -void Worker2(); -void Worker2() +void VarStore::Worker2() { static char c, *ret=STR_OK;// not NULL to start in no error state @@ -161,7 +160,7 @@ // cuidado puts VarStore::MyThis->pc->(" hi worker 1\n"); - VarStore::MyThis->pc->attach(&Worker2); + VarStore::MyThis->pc->attach(&VarStore::Worker2); while(1) { Thread::wait(1000);
--- a/VarStore.h Mon Aug 25 20:44:39 2014 +0000 +++ b/VarStore.h Tue Aug 26 06:44:16 2014 +0000 @@ -14,7 +14,7 @@ { -friend void Worker2(); +// friend void Worker2(); public: /******************************* * @@ -87,7 +87,7 @@ *Para hacer gestión via interrupciones. * ********************************/ - // static void Worker2(); + static void Worker2(); /******************************* *