FreeRTOS console and io devices support for compile

git-svn-id: svn://db.shs.com.ru/pip@688 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2019-02-06 13:04:25 +00:00
parent 30973842d1
commit 283da5b602
17 changed files with 185 additions and 63 deletions

View File

@@ -91,12 +91,16 @@ PIConsole::PIConsole(bool startNow, PIKbdListener::KBFunc slot): PIThread() {
GetConsoleMode(PRIVATE->hOut, &PRIVATE->smode);
GetConsoleCursorInfo(PRIVATE->hOut, &PRIVATE->curinfo);
#else
# ifdef FREERTOS
width = 80;
height = 24;
# else
winsize ws;
ioctl(0, TIOCGWINSZ, &ws);
width = ws.ws_col;
height = ws.ws_row;
# endif
#endif
tabs.reserve(16);
addTab("main");
listener = new PIKbdListener(key_event, this);
peer_timer = new PITimer();
@@ -544,10 +548,15 @@ void PIConsole::run() {
width = PRIVATE->sbi.srWindow.Right - PRIVATE->sbi.srWindow.Left;
height = PRIVATE->sbi.srWindow.Bottom - PRIVATE->sbi.srWindow.Top;
#else
# ifdef FREERTOS
width = 80;
height = 24;
# else
winsize ws;
ioctl(0, TIOCGWINSZ, &ws);
width = ws.ws_col;
height = ws.ws_row;
# endif
#endif
//fflush(0); return;
PICout::__mutex__().lock();
@@ -634,10 +643,15 @@ void PIConsole::fillLabels() {
width = PRIVATE->sbi.srWindow.Right - PRIVATE->sbi.srWindow.Left;
height = PRIVATE->sbi.srWindow.Bottom - PRIVATE->sbi.srWindow.Top;
#else
# ifdef FREERTOS
width = 80;
height = 24;
# else
winsize ws;
ioctl(0, TIOCGWINSZ, &ws);
width = ws.ws_col;
height = ws.ws_row;
# endif
#endif
max_y = 0;
col_cnt = columns().size();