Intermec ck1 Guía De Referencia

Descargar
Página de 390
Chapter 2 — Configuring the CK1 System 
62 
CK1 SDK Programmer’s Reference Manual 
Entering Standby Mode (continued) 
Wait 2 seconds. Applications should write everything to flash disk after 
receiving the signal. 
Flush file system cache buffers to flash disk. 
Enter Standby mode. 
 
Syntax: 
int devApmStandby( void )
 
 On-CK1 Parameters: None 
 
On-CK1 Return: -1 
 Function 
failed 
0 Function 
succeeded 
 On-Host Parameters: None 
 
On-Host Return:  Always return 0 
 
Example:  Sample program to demonstrate how user-space applications deal with the 
signal SIGSLOW. 
#include <signal.h> 
 
static void write_everything(int); 
 
int main (void) 

  // register the signal service routine 
  if (signal(SIGSLOW, write_everything) == SIG_ERR) 
    printf(“
Can’t register write_everything
() to 
SIGUSR
1\n”); 
 
// write your codes below 

 
static void write_everything(int signo) 

  // 
write your codes to write everything to flash disk below
 
  devApmFileCopy(“/var/myfile”, “/home/myfile”); 
Enabling Backlight Control 
 
Purpose:  The APM can control the behavior of the backlight. When you press any 
key, the APM can enable the backlight and turn it off after a few seconds. 
In fact, it depends on the Backlight Off Time you set with 
devApmSetBacklightOffTime(). If the Backlight Off Time equals 0, the 
APM lets the backlight stay on until the APM enters Standby mode. If the 
Backlight Off Time does not equal 0, the APM turns off the backlight 
after Backlight Off Time. 
 
Syntax: 
int devApmBacklightEnable( void )
 
 On-CK1 Parameters: None 
 
On-CK1 Return: -1 
 Function 
failed