RTOS work threads

git-svn-id: svn://db.shs.com.ru/pip@687 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2019-02-05 15:40:22 +00:00
parent b7ef5bfdcb
commit 30973842d1
10 changed files with 128 additions and 20 deletions

View File

@@ -168,7 +168,11 @@ void PIIODevice::_init() {
setOptions(0);
setReopenEnabled(true);
setReopenTimeout(1000);
#ifdef FREERTOS
setThreadedReadBufferSize(512);
#else
setThreadedReadBufferSize(4096);
#endif
timer.setName("__S__reopen_timer");
write_thread.setName("__S__write_thread");
CONNECT2(void, void * , int, &timer, tickEvent, this, check_start);
@@ -251,7 +255,7 @@ void PIIODevice::run() {
return;
}
if (!thread_started_) {
piMSleep(5);
piMSleep(10);
//cout << "not started\n";
return;
}