Add two threads into the IOT WIFIDemo for test_JacobShi
Dependencies: C12832 HTTPClient wifiontros wifirtos mbed
Fork of frdm_rtos by
sysinterface.cpp@3:5f921ff0868d, 2014-11-28 (annotated)
- Committer:
- shiyilei
- Date:
- Fri Nov 28 12:52:56 2014 +0000
- Revision:
- 3:5f921ff0868d
- Child:
- 4:242715d40e54
Add two threads into the IOT WIFIDemo for test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shiyilei | 3:5f921ff0868d | 1 | |
shiyilei | 3:5f921ff0868d | 2 | #include "sysinterface.h" |
shiyilei | 3:5f921ff0868d | 3 | //GLOBAL_DATA globaldata; |
shiyilei | 3:5f921ff0868d | 4 | void send_task(void const *args) |
shiyilei | 3:5f921ff0868d | 5 | { |
shiyilei | 3:5f921ff0868d | 6 | |
shiyilei | 3:5f921ff0868d | 7 | while(1) |
shiyilei | 3:5f921ff0868d | 8 | { |
shiyilei | 3:5f921ff0868d | 9 | // if(globaldata.send_ready==1) |
shiyilei | 3:5f921ff0868d | 10 | // { |
shiyilei | 3:5f921ff0868d | 11 | // globaldata.send_ready=0; |
shiyilei | 3:5f921ff0868d | 12 | // int idx=baselevel_send_data(globaldata.send_buffer,globaldata.send_length); |
shiyilei | 3:5f921ff0868d | 13 | // globaldata.send_length_over=idx; |
shiyilei | 3:5f921ff0868d | 14 | // globaldata.send_completed=1; |
shiyilei | 3:5f921ff0868d | 15 | // } |
shiyilei | 3:5f921ff0868d | 16 | int a=0; |
shiyilei | 3:5f921ff0868d | 17 | Thread::wait(40); |
shiyilei | 3:5f921ff0868d | 18 | } |
shiyilei | 3:5f921ff0868d | 19 | } |
shiyilei | 3:5f921ff0868d | 20 | |
shiyilei | 3:5f921ff0868d | 21 | void recv_task(void const *args) |
shiyilei | 3:5f921ff0868d | 22 | { |
shiyilei | 3:5f921ff0868d | 23 | while(1) |
shiyilei | 3:5f921ff0868d | 24 | { |
shiyilei | 3:5f921ff0868d | 25 | int b=0; |
shiyilei | 3:5f921ff0868d | 26 | Thread::wait(40); |
shiyilei | 3:5f921ff0868d | 27 | } |
shiyilei | 3:5f921ff0868d | 28 | |
shiyilei | 3:5f921ff0868d | 29 | } |