![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
main.cpp@3:0d013b7e4dea, 2018-03-28 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed Mar 28 12:25:14 2018 +0000
- Revision:
- 3:0d013b7e4dea
- Parent:
- 2:1c9645acea2f
- Parent:
- 1:3e5c46178d7f
- Child:
- 4:0413d42377d1
Work in progress
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 0:98e4994363bf | 1 | #include "mbed.h" |
albireo987 | 1:3e5c46178d7f | 2 | #include "rtos.h" |
KlaasGovaerts | 3:0d013b7e4dea | 3 | #include "Receiver.h" |
KlaasGovaerts | 2:1c9645acea2f | 4 | |
KlaasGovaerts | 2:1c9645acea2f | 5 | int main (void){ |
KlaasGovaerts | 3:0d013b7e4dea | 6 | Mutex* lock=new Mutex(); |
KlaasGovaerts | 3:0d013b7e4dea | 7 | int LED[12]; |
KlaasGovaerts | 3:0d013b7e4dea | 8 | for(int i=0;i<12;i++){ |
KlaasGovaerts | 3:0d013b7e4dea | 9 | LED[i]=0; |
KlaasGovaerts | 3:0d013b7e4dea | 10 | } |
KlaasGovaerts | 3:0d013b7e4dea | 11 | |
KlaasGovaerts | 3:0d013b7e4dea | 12 | Thread receiverThread; |
KlaasGovaerts | 3:0d013b7e4dea | 13 | Receiver receiver(LED,lock); |
KlaasGovaerts | 3:0d013b7e4dea | 14 | receiverThread.start(receiver.run); |
KlaasGovaerts | 2:1c9645acea2f | 15 | |
KlaasGovaerts | 3:0d013b7e4dea | 16 | |
KlaasGovaerts | 3:0d013b7e4dea | 17 | |
KlaasGovaerts | 3:0d013b7e4dea | 18 | //std::thread receiverThread(&Receiver::run, &receiver); |
KlaasGovaerts | 3:0d013b7e4dea | 19 | |
KlaasGovaerts | 3:0d013b7e4dea | 20 | |
KlaasGovaerts | 3:0d013b7e4dea | 21 | /* |
KlaasGovaerts | 3:0d013b7e4dea | 22 | |
KlaasGovaerts | 3:0d013b7e4dea | 23 | Thread ledThread; |
KlaasGovaerts | 3:0d013b7e4dea | 24 | |
KlaasGovaerts | 3:0d013b7e4dea | 25 | receiverThread.start(Receiver); |
KlaasGovaerts | 3:0d013b7e4dea | 26 | */ |
KlaasGovaerts | 3:0d013b7e4dea | 27 | } |