![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
main.cpp@46:ffac07bff0d8, 2018-05-02 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed May 02 15:04:28 2018 +0000
- Revision:
- 46:ffac07bff0d8
- Parent:
- 44:bb1d9d8a9fe4
- Child:
- 47:2d877f01ca7b
Aanpassingen LEDDriver klasse
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 | 30:996da48a265c | 11 | receiver.start(); |
KlaasGovaerts | 30:996da48a265c | 12 | } |
KlaasGovaerts | 30:996da48a265c | 13 | |
KlaasGovaerts | 46:ffac07bff0d8 | 14 | /* |
albireo987 | 26:29948b116e82 | 15 | void LEDStart(Queue<int,8>* queue) |
albireo987 | 26:29948b116e82 | 16 | { |
KlaasGovaerts | 43:b69c7baa5d31 | 17 | printf("LEDStart executed.\r\n"); |
albireo987 | 26:29948b116e82 | 18 | LEDDriver driver = LEDDriver(queue); |
albireo987 | 26:29948b116e82 | 19 | driver.run(8); |
KlaasGovaerts | 46:ffac07bff0d8 | 20 | } */ |
albireo987 | 32:537005b4a065 | 21 | |
KlaasGovaerts | 3:1c9645acea2f | 22 | int main (void){ |
KlaasGovaerts | 43:b69c7baa5d31 | 23 | printf("main executed.\r\n"); |
KlaasGovaerts | 31:915f6cb7ffa5 | 24 | Queue<int,8> queue; |
KlaasGovaerts | 46:ffac07bff0d8 | 25 | //Thread threadeth; |
KlaasGovaerts | 44:bb1d9d8a9fe4 | 26 | //Thread driverThread; |
KlaasGovaerts | 46:ffac07bff0d8 | 27 | |
KlaasGovaerts | 46:ffac07bff0d8 | 28 | //(true){ |
KlaasGovaerts | 46:ffac07bff0d8 | 29 | //threadeth.start(receive,&queue); |
KlaasGovaerts | 46:ffac07bff0d8 | 30 | //driverThread.start(LEDStart,&queue); |
KlaasGovaerts | 46:ffac07bff0d8 | 31 | //} |
KlaasGovaerts | 44:bb1d9d8a9fe4 | 32 | |
KlaasGovaerts | 46:ffac07bff0d8 | 33 | Ticker ticker; |
KlaasGovaerts | 46:ffac07bff0d8 | 34 | printf("Ticker created.\r\n"); |
KlaasGovaerts | 46:ffac07bff0d8 | 35 | LEDDriver driver(&queue); |
KlaasGovaerts | 46:ffac07bff0d8 | 36 | printf("Driver created.\r\n"); |
KlaasGovaerts | 46:ffac07bff0d8 | 37 | driver.run(&ticker); |
KlaasGovaerts | 46:ffac07bff0d8 | 38 | printf("Past driver run.\r\n"); |
KlaasGovaerts | 46:ffac07bff0d8 | 39 | |
KlaasGovaerts | 46:ffac07bff0d8 | 40 | receive(&queue); |
KlaasGovaerts | 4:0d013b7e4dea | 41 | } |