Mike Moore
/
transfer
blah
Revision 0:f82994ac4d1b, committed 2013-09-11
- Comitter:
- gatedClock
- Date:
- Wed Sep 11 01:57:42 2013 +0000
- Commit message:
- commit
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r f82994ac4d1b main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Sep 11 01:57:42 2013 +0000 @@ -0,0 +1,36 @@ +#include "mbed.h" + + Queue<int, 1> queueModTotalTime; // message to modify total time. + + + + int dMessage; // message. + + while(1) // thread loop. + { + +//--- // TOTAL TIME CONTROL. + + // encoded integers will be sent, + // not pointers. + + if (gtButtons.cLeftButton) // total time increment button. + { + dMessage = MSG_INC_TIME; // set message. + queueModTotalTime.put((int *) dMessage);// pretend it's a pointer. + gtButtons.cLeftButton = 0; // clear the button state. + } + + + + static int dTotalTime = 0; // total time variable. + int dMessage; // message. + osEvent queueEvent; // queue event. + + while(1) // thread loop. + { + + queueEvent = queueModTotalTime.get(1); // get message. + if (queueEvent.status == osEventMessage) + { + dMessage = (int) queueEvent.value.p; // interpret as integer, not pointer. \ No newline at end of file
diff -r 000000000000 -r f82994ac4d1b mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Sep 11 01:57:42 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9c8f0e3462fb \ No newline at end of file