// // PowerSaveExampleMacros.txt: // // Macros to demonstrate a power-saving method of turning // the display panel off and have it turn back on when the // user touches the LCD screen. // // The SLCD43 display uses about 230ma in normal operation. // When the panel is turned off with the command "v off", // the current draw drops to about 55ma. // // // enter_power_save: // // This macro could be called by the host controller to put // the display into low-power mode. The screen is cleared, // a special hotspot is drawn (covering the entire screen // area), the special hotspot is assigned to a macro to be // callled when the user presses any location on the screen, // and then the display panel is turned off. // #define enter_power_save // Clear the screen z // define a special hotspot covering the entire screen // (this example assumes an SLCD43 module) xs 135 0 0 480 272 // map hotspot press to exit_power_save macro. the host // notification could be used to tell the application when // the user wants the screen to wake up. use the 'quiet' // mode of the xa command (xaq) to skip the host notification, // but then the host controller needs some other method of // knowing when the user touches the screen. xa 135 p exit_power_save //xaq 135 p exit_power_save // turn screen off v off #end // // exit_power_save: // // The macro called in response to a hotspot press. Could // also be called by the host controller. Turns the panel // back on, removes the special hotspot and then ... // #define exit_power_save // turn screen back on v on // remove special hotspot z // redraw the main screen (or maybe the host controller // handles this in response to the x135 message from the // hotspot press). if the hotspot is in quiet mode, this // would be where you could send a custom message to the // host controller. t "Main screen active" 100 100 #end