Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832 HTTPClient wifiontros wifirtos mbed
Fork of frdm_rtos by
sysinterface.cpp
- Committer:
- shiyilei
- Date:
- 2014-12-05
- Revision:
- 4:242715d40e54
- Parent:
- 3:5f921ff0868d
File content as of revision 4:242715d40e54:
#include "sysinterface.h" PUBLICDATA globaldata; DigitalOut threadled(LED1); void send_task(void const *args) { while(1) { if(globaldata.send_ready==1) { globaldata.send_ready=0; short idx=baselevel_send_data(globaldata.send_buffer,globaldata.send_length); globaldata.send_length_over=idx; globaldata.send_completed=1; } threadled=!threadled; Thread::wait(20); } } void recv_task(void const *args) { int lengthtemp; while(1) { //recv_app(); if(globaldata.receive_start==1) { globaldata.receive_length=baselevel_receive_data(globaldata.receive_buffer,globaldata.need_receive); if(globaldata.receive_length>0) { globaldata.receive_start=0; globaldata.receive_completed=1; } } Thread::wait(20); } }