APP Team
/
app3
led example with 2 timers
writer.cpp@1:6e31c704f4d6, 2014-02-10 (annotated)
- Committer:
- passelin
- Date:
- Mon Feb 10 16:33:35 2014 +0000
- Revision:
- 1:6e31c704f4d6
- Child:
- 2:124a066878cc
in progress..
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 | 1:6e31c704f4d6 | 4 | extern Queue<char, 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 | 1:6e31c704f4d6 | 13 | char queueItem = NULL; |
passelin | 1:6e31c704f4d6 | 14 | Writer_init(); |
passelin | 1:6e31c704f4d6 | 15 | |
passelin | 1:6e31c704f4d6 | 16 | while(1) |
passelin | 1:6e31c704f4d6 | 17 | { |
passelin | 1:6e31c704f4d6 | 18 | ReaderQueue.get(queueItem); |
passelin | 1:6e31c704f4d6 | 19 | pc.putc(queueItem); |
passelin | 1:6e31c704f4d6 | 20 | //Thread::yield(); |
passelin | 1:6e31c704f4d6 | 21 | } |
passelin | 1:6e31c704f4d6 | 22 | } |