APP Team
/
app3
led example with 2 timers
writer.cpp@2:124a066878cc, 2014-02-11 (annotated)
- Committer:
- passelin
- Date:
- Tue Feb 11 04:23:35 2014 +0000
- Revision:
- 2:124a066878cc
- Parent:
- 1:6e31c704f4d6
- Child:
- 3:204e23521e39
23:23
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
passelin | 1:6e31c704f4d6 | 1 | #include "main.h" |
passelin | 1:6e31c704f4d6 | 2 | |
passelin | 1:6e31c704f4d6 | 3 | extern Serial pc; |
passelin | 2:124a066878cc | 4 | extern Queue<string, 16> ReaderQueue; |
passelin | 1:6e31c704f4d6 | 5 | |
passelin | 1:6e31c704f4d6 | 6 | void Writer_init() |
passelin | 1:6e31c704f4d6 | 7 | { |
passelin | 1:6e31c704f4d6 | 8 | |
passelin | 1:6e31c704f4d6 | 9 | } |
passelin | 1:6e31c704f4d6 | 10 | |
passelin | 1:6e31c704f4d6 | 11 | void Writer_thread(void const *args) |
passelin | 1:6e31c704f4d6 | 12 | { |
passelin | 2:124a066878cc | 13 | string *queueItem; |
passelin | 2:124a066878cc | 14 | osEvent evt; |
passelin | 1:6e31c704f4d6 | 15 | Writer_init(); |
passelin | 1:6e31c704f4d6 | 16 | |
passelin | 1:6e31c704f4d6 | 17 | while(1) |
passelin | 1:6e31c704f4d6 | 18 | { |
passelin | 2:124a066878cc | 19 | |
passelin | 2:124a066878cc | 20 | /* evt = ReaderQueue.get(); |
passelin | 2:124a066878cc | 21 | if (evt.status == osEventMessage) |
passelin | 2:124a066878cc | 22 | { |
passelin | 2:124a066878cc | 23 | queueItem = (string*)evt.value.p; |
passelin | 2:124a066878cc | 24 | pc.printf("%s \n\r", queueItem->c_str()); |
passelin | 2:124a066878cc | 25 | } |
passelin | 2:124a066878cc | 26 | */ |
passelin | 1:6e31c704f4d6 | 27 | } |
passelin | 1:6e31c704f4d6 | 28 | } |