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