![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
main.cpp@50:c5cd73d93045, 2018-05-09 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed May 09 10:08:32 2018 +0000
- Revision:
- 50:c5cd73d93045
- Parent:
- 49:8fe84f455571
- Child:
- 51:2d592fa1cad5
Backup
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 0:98e4994363bf | 1 | #include "mbed.h" |
KlaasGovaerts | 21:fe6a58e84929 | 2 | #include "rtos.h" |
KlaasGovaerts | 19:5ee34e60a31d | 3 | #include "Interpreter.h" |
KlaasGovaerts | 6:9903a0906a72 | 4 | #include "TCPlistener.h" |
KlaasGovaerts | 30:996da48a265c | 5 | #include "Receiver.h" |
albireo987 | 25:4c673da1a3ae | 6 | #include "LEDDriver.h" |
KlaasGovaerts | 30:996da48a265c | 7 | |
KlaasGovaerts | 31:915f6cb7ffa5 | 8 | void receive(Queue<int,8>* queue){ |
KlaasGovaerts | 43:b69c7baa5d31 | 9 | printf("receive executed.\r\n"); |
KlaasGovaerts | 30:996da48a265c | 10 | Receiver receiver(queue); |
KlaasGovaerts | 50:c5cd73d93045 | 11 | printf("Receiver Object created.\r\n"); |
KlaasGovaerts | 30:996da48a265c | 12 | receiver.start(); |
KlaasGovaerts | 30:996da48a265c | 13 | } |
KlaasGovaerts | 30:996da48a265c | 14 | |
KlaasGovaerts | 47:2d877f01ca7b | 15 | |
KlaasGovaerts | 47:2d877f01ca7b | 16 | void LEDStart(Queue<int,8>* queue,Ticker* ticker) |
albireo987 | 26:29948b116e82 | 17 | { |
KlaasGovaerts | 43:b69c7baa5d31 | 18 | printf("LEDStart executed.\r\n"); |
albireo987 | 26:29948b116e82 | 19 | LEDDriver driver = LEDDriver(queue); |
KlaasGovaerts | 49:8fe84f455571 | 20 | printf("LEDDriver created.\r\n"); |
KlaasGovaerts | 47:2d877f01ca7b | 21 | driver.run(ticker); |
KlaasGovaerts | 47:2d877f01ca7b | 22 | } |
albireo987 | 32:537005b4a065 | 23 | |
KlaasGovaerts | 3:1c9645acea2f | 24 | int main (void){ |
KlaasGovaerts | 43:b69c7baa5d31 | 25 | printf("main executed.\r\n"); |
KlaasGovaerts | 31:915f6cb7ffa5 | 26 | Queue<int,8> queue; |
KlaasGovaerts | 46:ffac07bff0d8 | 27 | //Thread threadeth; |
KlaasGovaerts | 44:bb1d9d8a9fe4 | 28 | //Thread driverThread; |
KlaasGovaerts | 46:ffac07bff0d8 | 29 | |
KlaasGovaerts | 46:ffac07bff0d8 | 30 | //(true){ |
KlaasGovaerts | 46:ffac07bff0d8 | 31 | //threadeth.start(receive,&queue); |
KlaasGovaerts | 46:ffac07bff0d8 | 32 | //driverThread.start(LEDStart,&queue); |
KlaasGovaerts | 46:ffac07bff0d8 | 33 | //} |
KlaasGovaerts | 44:bb1d9d8a9fe4 | 34 | |
KlaasGovaerts | 46:ffac07bff0d8 | 35 | Ticker ticker; |
KlaasGovaerts | 49:8fe84f455571 | 36 | LEDStart(&queue,&ticker); |
KlaasGovaerts | 46:ffac07bff0d8 | 37 | receive(&queue); |
KlaasGovaerts | 4:0d013b7e4dea | 38 | } |