• 大小: 2.92MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-13
  • 语言: 其他
  • 标签: GD32F450  LittlevGL  

资源简介

GD32F450移植LittlevGL 5.2 代码, 双显示缓存设置在外部SDRAM中

资源截图

代码片段和文件信息

/**
 * @file demo.c
 *
 */

/*********************
 *      INCLUDES
 *********************/
#include “demo.h“
#if USE_LV_DEMO

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/
static void write_create(lv_obj_t * parent);
static lv_res_t keyboard_open_close(lv_obj_t * ta);
static lv_res_t keyboard_hide_action(lv_obj_t * keyboard);
static void list_create(lv_obj_t * parent);
static void chart_create(lv_obj_t * parent);
static lv_res_t slider_action(lv_obj_t * slider);
static lv_res_t list_btn_action(lv_obj_t * slider);
#if LV_DEMO_SLIDE_SHOW
static void tab_switcher(void * tv);
#endif

/**********************
 *  STATIC VARIABLES
 **********************/
static lv_obj_t * chart;
static lv_obj_t * ta;
static lv_obj_t * kb;

static lv_style_t style_kb;
static lv_style_t style_kb_rel;
static lv_style_t style_kb_pr;

#if LV_DEMO_WALLPAPER
LV_IMG_DECLARE(img_bubble_pattern);
#endif

/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/

/**
 * Create a demo application
 */
void demo_create(void)
{

#if LV_DEMO_WALLPAPER
    lv_obj_t * wp = lv_img_create(lv_scr_act() NULL);
    lv_img_set_src(wp &img_bubble_pattern);
    lv_obj_set_width(wp LV_HOR_RES * 4);
    lv_obj_set_protect(wp LV_PROTECT_POS);
#endif

    static lv_style_t style_tv_btn_bg;
    lv_style_copy(&style_tv_btn_bg &lv_style_plain);
    style_tv_btn_bg.body.main_color = LV_COLOR_HEX(0x487fb7);
    style_tv_btn_bg.body.grad_color = LV_COLOR_HEX(0x487fb7);
    style_tv_btn_bg.body.padding.ver = 0;

    static lv_style_t style_tv_btn_rel;
    lv_style_copy(&style_tv_btn_rel &lv_style_btn_rel);
    style_tv_btn_rel.body.empty = 1;
    style_tv_btn_rel.body.border.width = 0;

    static lv_style_t style_tv_btn_pr;
    lv_style_copy(&style_tv_btn_pr &lv_style_btn_pr);
    style_tv_btn_pr.body.radius = 0;
    style_tv_btn_pr.body.opa = LV_OPA_50;
    style_tv_btn_pr.body.main_color = LV_COLOR_WHITE;
    style_tv_btn_pr.body.grad_color = LV_COLOR_WHITE;
    style_tv_btn_pr.body.border.width = 0;
    style_tv_btn_pr.text.color = LV_COLOR_GRAY;

    lv_obj_t * tv = lv_tabview_create(lv_scr_act() NULL);

#if LV_DEMO_WALLPAPER
    lv_obj_set_parent(wp ((lv_tabview_ext_t *) tv->ext_attr)->content);
    lv_obj_set_pos(wp 0 -5);
#endif

    lv_obj_t * tab1 = lv_tabview_add_tab(tv “Write“);
    lv_obj_t * tab2 = lv_tabview_add_tab(tv “List“);
    lv_obj_t * tab3 = lv_tabview_add_tab(tv “Chart“);

#if LV_DEMO_WALLPAPER == 0
    /*Blue bg instead of wallpaper*/
    lv_tabview_set_style(tv LV_TABVIEW_style_BG &style_tv_btn_bg);
#endif
    lv_tabview_set_style(tv LV_TABVIEW_style_BTN_BG &style_tv_btn_bg);
    lv_tabview_set_style(tv LV_TABVIEW_style_INDIC &lv_style_plain);
    lv_tabview_set_style(tv LV_TABVIEW_style_BTN_REL &style_tv_btn_rel);
    lv_tabvi

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      12502  2019-01-04 15:45  Applications\LittlevGL_Demo_rgb\Configs\lv_conf.h

     文件       7195  2018-10-05 17:24  Applications\LittlevGL_Demo_rgb\Configs\lv_drv_conf.h

     文件       1301  2019-01-04 15:58  Applications\LittlevGL_Demo_rgb\Configs\lv_ex_conf.h

     文件       1973  2019-01-02 15:22  Applications\LittlevGL_Demo_rgb\Configs\st7789_config.h

     文件      13188  2018-10-05 14:32  Applications\LittlevGL_Demo_rgb\demo.c

     文件        749  2018-11-12 13:28  Applications\LittlevGL_Demo_rgb\demo.h

     文件      26756  2019-01-02 11:56  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Include\gd32f4xx.h

     文件      26756  2018-12-26 10:01  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Include\gd32f4xx.h~RF676893.TMP

     文件       2430  2016-09-29 09:14  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Include\system_gd32f4xx.h

     文件      19926  2017-05-09 09:55  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\ARM\startup_gd32f405.s

     文件      20278  2017-05-09 09:55  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\ARM\startup_gd32f407.s

     文件      21836  2017-05-09 09:55  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\ARM\startup_gd32f450.s

     文件      23326  2017-05-09 09:55  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\IAR\startup_gd32f405.s

     文件      23895  2017-05-09 09:55  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\IAR\startup_gd32f407.s

     文件      25988  2017-05-09 09:55  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\IAR\startup_gd32f450.s

     文件      28320  2019-01-02 16:15  Applications\LittlevGL_Demo_rgb\DeviceSupport\GD32F4xx\Source\system_gd32f4xx.c

     文件      14196  2019-01-04 14:18  Applications\LittlevGL_Demo_rgb\exmc_sdram.c

     文件        999  2016-10-19 15:25  Applications\LittlevGL_Demo_rgb\exmc_sdram.h

     文件       2175  2019-01-02 14:25  Applications\LittlevGL_Demo_rgb\gd32f4xx_it.c

     文件        986  2016-11-29 11:16  Applications\LittlevGL_Demo_rgb\gd32f4xx_it.h

     文件       1296  2016-12-08 10:10  Applications\LittlevGL_Demo_rgb\gd32f4xx_libopt.h

     文件      89336  2018-12-26 10:46  Applications\LittlevGL_Demo_rgb\IAR_project\project.ewd

     文件      70193  2019-01-04 15:53  Applications\LittlevGL_Demo_rgb\IAR_project\project.ewp

     文件     150138  2019-01-04 15:53  Applications\LittlevGL_Demo_rgb\IAR_project\project.ewt

     文件        161  2018-12-26 10:46  Applications\LittlevGL_Demo_rgb\IAR_project\project.eww

     文件    6073839  2018-11-12 13:30  Applications\LittlevGL_Demo_rgb\img_bubble_pattern.c

     文件      60610  2019-01-04 15:51  Applications\LittlevGL_Demo_rgb\Keil_project\project.uvopt

     文件      44981  2019-01-04 15:50  Applications\LittlevGL_Demo_rgb\Keil_project\project.uvproj

     文件       4292  2019-01-04 16:31  Applications\LittlevGL_Demo_rgb\main.c

     文件        183  2018-12-26 10:29  Applications\LittlevGL_Demo_rgb\main.h

............此处省略568个文件信息

评论

共有 条评论