1 /*
2 * Copyright (c) 2006-2021, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date Author Notes
8 * 2019-08-28 WillianChan first version
9 */
10
11 #include <rtthread.h>
12 #include <rtdevice.h>
13 #include <board.h>
14 #include <drv_lcd.h>
15 #include "rttlogo.h"
16 #ifdef BSP_USING_LCD_QRCODE
17 #include <lcd_qrcode.h>
18 #endif /* BSP_USING_LCD_QRCODE */
19
lcd_sample(void)20 static int lcd_sample(void)
21 {
22 lcd_clear(WHITE);
23 lcd_show_image(0, 0, 240, 69, image_rttlogo);
24 lcd_set_color(WHITE, BLACK);
25 lcd_show_string(10, 69, 24, "Hello, RT-Thread!");
26 lcd_draw_line(0, 69+24, 240, 69+24);
27 #ifdef BSP_USING_LCD_QRCODE
28 lcd_show_qrcode(54, 69+24+6, 4, ECC_LOW, "https://www.rt-thread.org/", 4);
29 #endif /* BSP_USING_LCD_QRCODE */
30
31 return RT_EOK;
32 }
33 INIT_APP_EXPORT(lcd_sample);
34