![Keil RTX51 Скачать руководство пользователя страница 53](http://html1.mh-extra.com/html/keil/rtx51/rtx51_manual_3913946053.webp)
RTX TINY
53
6
unsigned char args; /* number of arguments
*/
rtime.sec = 0; /* preset second
*/
args = sscanf (buffer, "%bd:%bd:%bd", /* scan input line for
*/
&rtime.hour, /* hour, minute and second
*/
&rtime.min,
&rtime.sec);
if (rtime.hour > 23 || rtime.min > 59 || /* check for valid inputs
*/
rtime.sec > 59 || args < 2 || args == EOF) {
printf ("\n*** ERROR: INVALID TIME FORMAT\n");
return (0);
}
return (1);
}
#define ESC 0x1B /* ESCAPE character code
*/
bit escape; /* flag: mark ESCAPE character entered
*/
/*****************************************************************************
*/
/* Task 6 'get_escape': check if ESC (escape character) was entered
*/
/*****************************************************************************
*/
get_escape () _task_ GET_ESC {
while (1) { /* endless loop
*/
if (_getkey () == ESC) escape = 1; /* set flag if ESC entered
*/
if (escape) { /* if escape flag send signal
*/
os_send_signal (COMMAND); /* to task 'command'
*/
}
}
}
/*****************************************************************************
*/
/* Task 1 'command': command processor */
/*****************************************************************************
*/
command () _task_ COMMAND {
unsigned char i;
printf (menu); /* display command menu
*/
while (1) { /* endless loop
*/
printf ("\nCommand: "); /* display prompt
*/
Содержание RTX51
Страница 4: ......
Страница 6: ......
Страница 20: ......
Страница 24: ......
Страница 39: ...RTX Tiny 39 4...
Страница 40: ......
Страница 44: ...44 RTX51 Tiny Specifications 5...
Страница 68: ...RTX51 TINY REAL TIME OPERATING SYSTEM User s Guide 2 95...