Syntax
void dipoweroff(
unsigned short sw
);
Parameters
- sw
-
[in] Specifies enable/disable of power off.
Value Description TRUE Power off is disabled. FALSE Power off is enabled.
Return value
None
Remarks
Sets the enable/disable of power off.
Power off by key operation and enable/disable power off with AutoPowerDown.
Power off by key operation and enable/disable power off with AutoPowerDown.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
#include <stdio.h>
#include "lib.h"
const char string[] = "Hello, world";
void main(void)
{
char c,*s;
AutoPowerDown(APD_ON,TIME_100MS*100);
dipoweroff(TRUE);
Cursor(ON);
Cursor(AUTOWRAP);
s = (char*)string;
while((c = *s)!= '\0')
{
putchar(c);
Delay(TIME_100MS*10);
s++;
}
dipoweroff(FALSE);
for(;;)
{
Idle();
}
}
Last updated: 2020/10/07