Phonetics 5100 Home Security System User Manual


 
101
Chapter 8: C Programming
RELOAD
Summary:
int reload();
Description:
The reload function returns the reload rate in seconds of the C program. There are no
parameters.
Return value:
The reload rate in seconds of the C program.
Example:
This program will use the reload rate to update a seconds down-timer. When the
timer hits zero, it will turn output number 1 on.
main()
{
rate=reload();
if (timer>0)
{
timer=timer-rate;
}
if (timer<=0)
{
output(1,1);
}
else
{
output(1,0);
}
}