Keil RTX51 Manual page 55

Table of Contents

Advertisement

RTX TINY
end.min
end.sec
}
break;
case 'S':
if (readtime (&inline[i+1]))
*/
start.hour = rtime.hour;
*/
start.min
start.sec
}
break;
default:
*/
printf (menu);
*/
break;
}
}
}
/*****************************************************************************
*/
/*
*/
/*****************************************************************************
*/
bit signalon ()
if (memcmp (&start, &end, sizeof (struct time)) < 0)
if (memcmp (&start, &ctime, sizeof (struct time)) < 0
memcmp (&ctime, &end,
}
else
{
if (memcmp (&end,
memcmp (&ctime, &start, sizeof (start)) > 0)
}
return (0);
*/
}
/*****************************************************************************
*/
/*
*/
/*****************************************************************************
*/
blinking () _task_ BLINKING
*/
red
= 0;
*/
yellow = 0;
green
= 0;
stop
= 0;
walk
= 0;
while (1)
*/
= rtime.min;
= rtime.sec;
= rtime.min;
= rtime.sec;
signalon:
check
{
sizeof (struct time)) < 0)
&ctime, sizeof (start)) > 0
Task 3 'blinking': runs if current time is outside start & end time
{
{
/* Set Start Time Command */
{
/* read time input and
/* display command menu
if
clock
time
is
between
{
&&
return (1);
/* signal off, blinking on
/* blink yellow light
/* store in 'start'
/* Error Handling
start
and
end
&&
return (1);
/* all lights off
/* endless loop
55
6

Advertisement

Table of Contents
loading

Table of Contents