From f5fb8ddff696347ce8c58dfa7d8b1b2db979a39d Mon Sep 17 00:00:00 2001 From: Zhou Yanjie Date: Sat, 20 Jul 2019 13:28:52 +0800 Subject: [PATCH] =?UTF-8?q?X1000:=20board=5Fio.c:=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=BF=9B=E8=A1=8C=E5=A4=8D=E4=BD=8D/Reset=20?= =?UTF-8?q?according=20to=20configuration.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据配置选择是否对LCD或触摸屏进行复位,在未使用LCD或触摸屏时可缩短 系统初始化时间。 Select whether to reset the LCD or touchpad according to the configuration, and shorten the system initialization time when the LCD or touchpad is not used. Signed-off-by: Zhou Yanjie --- bsp/x1000/drivers/board_io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bsp/x1000/drivers/board_io.c b/bsp/x1000/drivers/board_io.c index d4c4289714..3dc10a2fcf 100644 --- a/bsp/x1000/drivers/board_io.c +++ b/bsp/x1000/drivers/board_io.c @@ -132,13 +132,17 @@ int io_realboard_v2(void) gpio_direction_output(AUDIO_SHUTDOWN_PORT,AUDIO_SHUTDOWN_PIN, AUDIO_SHUTDOWN_MUTE); gpio_set_value(AUDIO_SHUTDOWN_PORT,AUDIO_SHUTDOWN_PIN, AUDIO_SHUTDOWN_MUTE); - /* Reset lcd,TP,... */ +#ifdef RT_USING_TOUCH + /* Reset LCD */ gpio_direction_output(LCD_TP_INT_PORT, LCD_TP_INT_PIN,1); _delay_ms(300); +#endif +#ifdef RT_USING_SLCD + /* Reset TP */ gpio_direction_output(LCD_RST_PORT, LCD_RST_PIN,0); _delay_ms(100); gpio_set_value(LCD_RST_PORT, LCD_RST_PIN, 1); - +#endif /* LED */ gpio_direction_output(BLINK_LED0_PORT, BLINK_LED0_PIN,1); @@ -146,7 +150,6 @@ int io_realboard_v2(void) gpio_direction_output(BLINK_LED2_PORT, BLINK_LED2_PIN,1); gpio_direction_output(BLINK_LED3_PORT, BLINK_LED3_PIN,1); - return 0; } INIT_BOARD_EXPORT(io_realboard_v2); -- GitLab