C Language Development Kit/Functions/Autopowerdown
From OptiWiki
< C Language Development Kit | Functions(Redirected from C Language Development Kit/Functions/autopowerdown)
| Description | Terminals can switch themselves off after a certain, user programmable time. This feature is called automatic power down. Every time when the user presses a key, or when the communications port receives data, the count down for automatic power down is reset.
With the autopowerdown() function some parameters for this feature are controlled. | ||||||||||||
| Syntax | void autopowerdown(int command, unsigned long time); | ||||||||||||
| Arguments | The action that autopowerdown() must perform. One of the following values:
int command
The time before the terminal powers down automatically
unsigned long time | ||||||||||||
| Returns | None | ||||||||||||
| Remarks | time is an unsigned long. The maximum value is 4294967295, approx. 2.5 years. The minimum value is theoretically zero, but the power down time is limited to 3 seconds. The default power down time is different for the various terminals, and is shown below:
On the OPH100x, the power down time can also be configured in the system menu (if the installed application doesn't overrule it). | ||||||||||||
| Example | #include "lib.h" #include <stdio.h> const char string[] = "Hello world"; void main( void ) { char c,*s; autopowerdown(ON,50); cursor(ON); cursor(AUTOWRAP); s = (char*)string; while( (c = *s) != '\0' ) { putchar(c); delay(50); s++; } while( 1 ) idle(); } |
