RTX TINY
57
6
os_wait (K_TMO, 30, 0); /* wait for timeout: 30 ticks
*/
stop = 0; /* green light for walkers
*/
walk = 1;
os_wait (K_TMO, 100, 0); /* wait for timeout: 100 ticks
*/
stop = 1; /* red light for walkers
*/
walk = 0;
}
}
/*****************************************************************************
*/
/* Task 5 'keyread': process key stroke from pedestrian push button
*/
/*****************************************************************************
*/
keyread () _task_ KEYREAD {
while (1) { /* endless loop
*/
if (key) { /* if key pressed
*/
os_send_signal (LIGHTS); /* send signal to task lights
*/
}
os_wait (K_TMO, 2, 0); /* wait for timeout: 2 ticks
*/
}
}
SERIAL.C
/*****************************************************************************
*/
/*
*/
/* SERIAL.C: Interrupt Controlled Serial Interface for RTX-51 tiny
*/
/*
*/
/*****************************************************************************
*/
#include <reg52.h> /* special function register 8052
*/
#include <rtx51tny.h> /* RTX-51 tiny functions & defines
*/
#define OLEN 8 /* size of serial transmission buffer
*/
unsigned char ostart; /* transmission buffer start index
*/
unsigned char oend; /* transmission buffer end index
*/
idata char outbuf[OLEN]; /* storage for transmission buffer
*/
unsigned char otask = 0xff; /* task number of output task
*/
Содержание 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...