PM_SetLCDPower


C Specification

#include <nitro/spi.h>

BOOL PM_SetLCDPower( PMLCDPower sw );

Description

This function switches the LCD switch.

The sw argument is the LCD switch. This argument is a PMLCDPower enumerator type that can contain either one of the following values:

When you switch the LCD switch, the LED becomes ON regardless of whether the LED state, sw, is PM_LCD_POWER_ON or PM_LCD_POWER_OFF.

Because of a hardware restriction, you cannot turn the LCD ON unless 100 ms have passed since the LCD was turned OFF. If you attempt to switch the LCD ON before a sufficient amount of time has passed since the last time the LCD was turned OFF, nothing will occur and a value of FALSE will be returned.

After a sufficient amount of time has passed and the LCD can be successfully turned on, a value of TRUE is returned. When you switch from the ON state to the OFF state, this restriction does not apply and the value that is returned is always TRUE.

Before you use this function, initialize the PM library by using the PM_Init() function. The PM_Init() function has to be called only once.

The OS_Init() function is called from within the PM_Init() function. If you need to call the OS_Init() function, you have to call the PM_Init() function only once. There is no need for the OS_Init() function to be called separately.

Internal Operation

The switching of the LCD switch is accessed in the GX_POWCNT register. This function operates the PMIC register PMIC_CTL to control the LED (power lamp).

Arguments

sw LCD switch

Return Values

Returns a value of TRUE if the attempt to turn ON the LCD is successful.

Returns a value of FALSE if the attempt to turn ON the LCD fails. The failure occurs if an attempt is made to turn ON the LCD before 100 ms have elapsed since the LCD was turned OFF.

See Also

PM_Init, PM_GetLCDPower

Revision History

08/17/2004 Changed the description of the LED state
08/07/2004 Initial version