Basic example showing the Queue API with a producer in an ISR and a consumer in a normal thread.
mbed 2 and mbed OS 5
This is an mbed 2 example. mbed OS 5 has integrated the mbed library with mbed-rtos. For an mbed-os example, please see:
Import programrtos_isr
isr example
Revision 2:3ded4c6c9dff, committed 2012-11-23
- Comitter:
- emilmont
- Date:
- Fri Nov 23 10:45:41 2012 +0000
- Parent:
- 1:3043ec651794
- Child:
- 3:b3d67501ac55
- Commit message:
- update libraries
Changed in this revision
--- a/main.cpp Fri Jul 13 11:48:28 2012 +0000 +++ b/main.cpp Fri Nov 23 10:45:41 2012 +0000 @@ -10,7 +10,7 @@ myled = !myled; } -void queue_thread(void const *argument) { +void queue_thread(void const *args) { while (true) { queue.put((uint32_t*)1); Thread::wait(1000);
--- a/mbed-rtos.lib Fri Jul 13 11:48:28 2012 +0000 +++ b/mbed-rtos.lib Fri Nov 23 10:45:41 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#01158bb7600c +http://mbed.org/users/mbed_official/code/mbed-rtos/#80173c64d05d
--- a/mbed.bld Fri Jul 13 11:48:28 2012 +0000 +++ b/mbed.bld Fri Nov 23 10:45:41 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/10b9abbe79a6 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/3d775a932e1d \ No newline at end of file