FreeCalypso > hg > freecalypso-tools
comparison target-utils/lunadrv/sleep.c @ 865:57f7db8c4f45
lunadrv: add reset-suspend command
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 24 Mar 2022 06:39:13 +0000 |
parents | a66095c7f35f |
children |
comparison
equal
deleted
inserted
replaced
864:82d4a7438639 | 865:57f7db8c4f45 |
---|---|
23 { | 23 { |
24 LCD_REG_WR(0x0010, 0); /* out of suspend */ | 24 LCD_REG_WR(0x0010, 0); /* out of suspend */ |
25 wait_ARM_cycles(DELAY_1MS * 50); | 25 wait_ARM_cycles(DELAY_1MS * 50); |
26 LCD_REG_WR(0x0007, 0x1017); /* display on */ | 26 LCD_REG_WR(0x0007, 0x1017); /* display on */ |
27 } | 27 } |
28 | |
29 /* | |
30 * If we wish to run sans-UI firmware on an LCD-equipped board, | |
31 * we would like to put the ILI9225G controller into its lowest | |
32 * power mode, without doing anything else to it. The following | |
33 * reset-suspend command prototypes this functionality. | |
34 */ | |
35 | |
36 void | |
37 cmd_reset_suspend() | |
38 { | |
39 /* reset pulse */ | |
40 CNTL_RST_REG |= EXT_RESET; | |
41 wait_ARM_cycles(DELAY_1MS * 10); | |
42 CNTL_RST_REG &= ~EXT_RESET; | |
43 /* datasheet says it needs 50 ms */ | |
44 wait_ARM_cycles(DELAY_1MS * 50); | |
45 /* and straight into suspend mode */ | |
46 LCD_REG_WR(0x0010, 1); | |
47 } |