![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
main.cpp@17:df5bd29cf9a9, 2018-04-18 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed Apr 18 11:49:21 2018 +0000
- Revision:
- 17:df5bd29cf9a9
- Parent:
- 15:ffd311730575
- Child:
- 18:5ee34e60a31d
Versie 13:49
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 | 5:9903a0906a72 | 4 | #include "TCPlistener.h" |
KlaasGovaerts | 2:1c9645acea2f | 5 | |
KlaasGovaerts | 2:1c9645acea2f | 6 | int main (void){ |
KlaasGovaerts | 17:df5bd29cf9a9 | 7 | Receiver receiver; |
KlaasGovaerts | 17:df5bd29cf9a9 | 8 | while(true){ |
KlaasGovaerts | 17:df5bd29cf9a9 | 9 | receiver.executeAll(); |
KlaasGovaerts | 17:df5bd29cf9a9 | 10 | } |
KlaasGovaerts | 17:df5bd29cf9a9 | 11 | |
KlaasGovaerts | 17:df5bd29cf9a9 | 12 | /* |
KlaasGovaerts | 5:9903a0906a72 | 13 | char command[512]; |
KlaasGovaerts | 15:ffd311730575 | 14 | listener.receiveSegment(command,sizeof(command)); |
KlaasGovaerts | 17:df5bd29cf9a9 | 15 | */ |
KlaasGovaerts | 5:9903a0906a72 | 16 | #if 0 |
KlaasGovaerts | 3:0d013b7e4dea | 17 | Mutex* lock=new Mutex(); |
KlaasGovaerts | 3:0d013b7e4dea | 18 | int LED[12]; |
KlaasGovaerts | 3:0d013b7e4dea | 19 | for(int i=0;i<12;i++){ |
KlaasGovaerts | 4:0413d42377d1 | 20 | LED[i]=-1; |
KlaasGovaerts | 3:0d013b7e4dea | 21 | } |
KlaasGovaerts | 3:0d013b7e4dea | 22 | |
KlaasGovaerts | 5:9903a0906a72 | 23 | Receiver receiver(LED,lock); |
KlaasGovaerts | 5:9903a0906a72 | 24 | reciever.init(); |
KlaasGovaerts | 5:9903a0906a72 | 25 | #endif |
KlaasGovaerts | 4:0413d42377d1 | 26 | |
KlaasGovaerts | 4:0413d42377d1 | 27 | /* |
KlaasGovaerts | 3:0d013b7e4dea | 28 | Thread receiverThread; |
KlaasGovaerts | 5:9903a0906a72 | 29 | |
KlaasGovaerts | 3:0d013b7e4dea | 30 | receiverThread.start(receiver.run); |
KlaasGovaerts | 4:0413d42377d1 | 31 | */ |
KlaasGovaerts | 3:0d013b7e4dea | 32 | |
KlaasGovaerts | 3:0d013b7e4dea | 33 | |
KlaasGovaerts | 3:0d013b7e4dea | 34 | //std::thread receiverThread(&Receiver::run, &receiver); |
KlaasGovaerts | 3:0d013b7e4dea | 35 | |
KlaasGovaerts | 3:0d013b7e4dea | 36 | |
KlaasGovaerts | 3:0d013b7e4dea | 37 | /* |
KlaasGovaerts | 3:0d013b7e4dea | 38 | |
KlaasGovaerts | 3:0d013b7e4dea | 39 | Thread ledThread; |
KlaasGovaerts | 3:0d013b7e4dea | 40 | |
KlaasGovaerts | 3:0d013b7e4dea | 41 | receiverThread.start(Receiver); |
KlaasGovaerts | 3:0d013b7e4dea | 42 | */ |
KlaasGovaerts | 3:0d013b7e4dea | 43 | } |