初始提交卡包 USB 工程

纳入固件源码、屏幕组件、nand_xfer 工具和文档。忽略本机构建产物、sdkconfig,以及含本机路径的依赖锁。

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
zhengxin
2026-10-13 21:54:50 +08:00
co-authored by Cursor
commit 851e347cf5
260 changed files with 269349 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
/*
* Copyright 2024 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/
/*********************
* INCLUDES
*********************/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#include "lvgl.h"
#include "custom.h"
#include "ui.h"
#include "ui_nav.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**
* Create a demo application
*/
void custom_init(lv_ui *ui)
{
/* Add your codes here */
}
static const char * const sortitions[] = {
"桃花满屏", "脱单成功", "良缘天降", "喜结连理", "搭子速配", "知音相伴",
"颜值开挂", "桃花爆仓", "真爱降临", "甜度超标", "脱单快进", "缘分拉满",
"告白必成", "双向奔赴", "桃花朵朵", "缘分爆棚",
"摆烂无罪", "快乐加倍", "烦恼清零", "快乐加载", "懒觉自由", "元气满满",
"美食秒到", "干饭无忧", "脱发退散", "发量暴增", "失眠拜拜", "一夜好眠",
"奶茶自由", "快乐拉满", "追剧无广", "爽感拉满",
"锦鲤附体", "好运炸屏", "欧气护体", "万事开挂", "水逆退散", "好运加载",
"幸运值满", "心想事成", "惊喜盲盒", "好运爆棚", "快乐续费", "好运无限",
"好运拉满", "万事顺遂", "躺赢剧本", "万事开挂",
};
#define SORTITION_COUNT (sizeof(sortitions) / sizeof(sortitions[0]))
void perform_draw(void)
{
static bool seeded = false;
if (!seeded) {
srand((unsigned int)time(NULL));
seeded = true;
}
const char *sortition1 = sortitions[rand() % SORTITION_COUNT];
const char *sortition2 = sortitions[rand() % SORTITION_COUNT];
ui_nav_load_sortition_text_fade();
if (guider_ui.screen_sortition_text_label_sortition1 != NULL &&
lv_obj_is_valid(guider_ui.screen_sortition_text_label_sortition1)) {
lv_label_set_text(guider_ui.screen_sortition_text_label_sortition1, sortition1);
}
if (guider_ui.screen_sortition_text_label_sortition2 != NULL &&
lv_obj_is_valid(guider_ui.screen_sortition_text_label_sortition2)) {
lv_label_set_text(guider_ui.screen_sortition_text_label_sortition2, sortition2);
}
}
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright 2024 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/
#ifndef __CUSTOM_H_
#define __CUSTOM_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "gui_guider.h"
void custom_init(lv_ui *ui);
void perform_draw(void);
#ifdef __cplusplus
}
#endif
#endif /* EVENT_CB_H_ */
+8
View File
@@ -0,0 +1,8 @@
GEN_CSRCS += $(notdir $(wildcard $(PRJ_DIR)/custom/*.c))
DEPPATH += --dep-path $(PRJ_DIR)/custom
VPATH += :$(PRJ_DIR)/custom
CFLAGS += "-I$(PRJ_DIR)/custom"
AFLAGS += "-I$(PRJ_DIR)/custom"
+41
View File
@@ -0,0 +1,41 @@
/*
* Copyright 2024 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/
/*
* lv_conf_ext.h for custom lvconf file.
* example :
* #undef LV_FONT_FMT_TXT_LARGE
* #define LV_FONT_FMT_TXT_LARGE 1
*/
#ifndef LV_CONF_EXT_H
#define LV_CONF_EXT_H
/* common code begin */
/* common code end */
#if LV_USE_GUIDER_SIMULATOR
/* code for simulator begin */
/* code for simulator end */
#else
/* code for board begin */
/* code for board end */
#endif
#endif /* LV_CONF_EXT_H */