2025-04-23 17:54:31 +08:00
<!DOCTYPE html> < html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "zh-cn" lang = "zh-cn" data-whc_version = "26.1" >
< head > < meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" / > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" / > < meta http-equiv = "X-UA-Compatible" content = "IE=edge" / > < meta name = "description" content = "ArtInChip 平台支持 SDCard / Udisk 烧录时显示进度条和数字百分比。进度条和数字百分比通过 CPU 进行绘制。 进度条默认居中,显示蓝绿两种颜色。数字百分比通过 fb console 实现, fb console 默认支持 32x32 点阵字体, ASCII 32 - 127。 执行下列步骤,可在烧录时显示进度条和数字百分比: 在 Luban-Lite 根目录下执行 scons ..." / > < meta name = "DC.rights.owner" content = "(C) 版权 2025" / > < meta name = "copyright" content = "(C) 版权 2025" / > < meta name = "generator" content = "DITA-OT" / > < meta name = "DC.type" content = "topic" / > < meta name = "DC.relation" content = "../../../topics/sdk/display/display_user_guide.html" / > < meta name = "DC.relation" content = "../../../topics/sdk/display/display_color_property_lite.html" / > < meta name = "DC.relation" content = "../../../topics/sdk/display/display_blending.html" / > < meta name = "DC.contributor" content = "yan.wang" / > < meta name = "DC.contributor" content = "yan.wang" / > < meta name = "DC.date.modified" content = "2025-04-09" / > < meta name = "DC.format" content = "HTML5" / > < meta name = "DC.identifier" content = "id" / > < meta name = "DC.language" content = "zh-CN" / > < title > 烧录进度条< / title > < meta name = "wh-path2root" content = "../../../" / > < meta name = "wh-toc-id" content = "id-d3703e4293" / > < meta name = "wh-source-relpath" content = "topics/sdk/display/display_burn_process.dita" / > < meta name = "wh-out-relpath" content = "topics/sdk/display/display_burn_process.html" / >
2025-01-23 16:37:00 +08:00
2025-04-23 17:54:31 +08:00
< link rel = "stylesheet" type = "text/css" href = "../../../webhelp/app/commons.css?buildId=2024041900" / >
< link rel = "stylesheet" type = "text/css" href = "../../../webhelp/app/topic.css?buildId=2024041900" / >
2025-01-23 16:37:00 +08:00
2025-04-23 17:54:31 +08:00
< script src = "../../../webhelp/app/options/properties.js?buildId=20250409170918" > < / script >
< script src = "../../../webhelp/app/localization/strings.js?buildId=2024041900" > < / script >
< script src = "../../../webhelp/app/search/index/keywords.js?buildId=20250409170918" > < / script >
< script defer = "defer" src = "../../../webhelp/app/commons.js?buildId=2024041900" > < / script >
< script defer = "defer" src = "../../../webhelp/app/topic.js?buildId=2024041900" > < / script >
< link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/aic-styles-web-internal.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/notes.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/aic-common.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/aic-images.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/footnote.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/aic-highlight-changes.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/search-in-header.css?buildId=2024041900" / > < link rel = "stylesheet" type = "text/css" href = "../../../webhelp/template/css/topic-body-list.css?buildId=2024041900" / > < / head >
2025-01-23 16:37:00 +08:00
< body id = "id" class = "wh_topic_page frmBody" >
< a href = "#wh_topic_body" class = "sr-only sr-only-focusable" >
跳转到主要内容
< / a >
< header class = "navbar navbar-default wh_header" >
< div class = "container-fluid" >
2025-04-23 17:54:31 +08:00
< div xmlns:whc = "http://www.oxygenxml.com/webhelp/components" class = "wh_header_flex_container navbar-nav navbar-expand-md navbar-dark" >
2025-01-23 16:37:00 +08:00
< div class = "wh_logo_and_publication_title_container" >
< div class = "wh_logo_and_publication_title" >
2025-04-23 17:54:31 +08:00
< a href = "https://www.artinchip.com" class = " wh_logo d-none d-sm-block " > < img src = "../../../company-logo.png" alt = " RTOS SDK 使用指南 SDK 指南文件 " / > < / a >
< div class = " wh_publication_title " > < a href = "../../../index.html" > < span class = "booktitle" > < span class = "ph mainbooktitle" > RTOS SDK 使用指南< / span > < span class = "ph booktitlealt" > SDK 指南文件< / span > < / span > < / a > < / div >
2025-01-23 16:37:00 +08:00
< / div >
< / div >
< div class = "wh_top_menu_and_indexterms_link collapse navbar-collapse" id = "wh_top_menu_and_indexterms_link" >
< / div >
< div class = " wh_search_input navbar-form wh_topic_page_search search " role = "form" >
< form id = "searchForm" method = "get" role = "search" action = "../../../search.html" > < div > < input type = "search" placeholder = "搜索 " class = "wh_search_textfield" id = "textToSearch" name = "searchQuery" aria-label = "搜索查询" required = "required" / > < button type = "submit" class = "wh_search_button" aria-label = "搜索" > < span class = "search_input_text" > 搜索< / span > < / button > < / div > < / form >
2025-04-23 17:54:31 +08:00
< / div > < / div >
< / div >
< / header >
2025-01-23 16:37:00 +08:00
< div class = "container-fluid" id = "wh_topic_container" >
< div class = "row" >
< nav class = "wh_tools d-print-none navbar-expand-md" aria-label = "Tools" >
2025-04-23 17:54:31 +08:00
< div data-tooltip-position = "bottom" class = " wh_breadcrumb " > < ol class = "d-print-none" > < li > < span class = "home" > < a href = "../../../index.html" > < span > 主页< / span > < / a > < / span > < / li > < li > < div class = "topicref" data-id = "id" > < div class = "title" > < a href = "../../../topics/sdk/chapter-advanced-app.html" > 高级应用< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > 系统、存储、多媒体、接口、安全等模块的详细配置和设计说明。< / p > < / div > < / div > < / div > < / li > < li > < div class = "topicref" data-id = "concept_mcc_32s_nbc" > < div class = "title" > < a href = "../../../topics/chapter-title/chapter-multi-media-sdk.html" > 多媒体< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > GE、VE、Display、DVP、MPP、MPP 播放器等多媒体模块的介绍和使用说明。< / p > < / div > < / div > < / div > < / li > < li > < div class = "topicref" data-id = "id" > < div class = "title" > < a href = "../../../topics/sdk/display/display_user_guide.html" > Display 使用指南< / a > < / div > < / div > < / li > < li class = "active" > < div class = "topicref" data-id = "id" > < div class = "title" > < a href = "../../../topics/sdk/display/display_burn_process.html" > 烧录进度条< / a > < / div > < / div > < / li > < / ol > < / div >
2025-01-23 16:37:00 +08:00
< div class = "wh_right_tools" >
< button class = "wh_hide_highlight" aria-label = "切换搜索突出显示" title = "切换搜索突出显示" > < / button >
< button class = "webhelp_expand_collapse_sections" data-next-state = "collapsed" aria-label = "折叠截面" title = "折叠截面" > < / button >
< div class = " wh_navigation_links " > < span id = "topic_navigation_links" class = "navheader" >
< span class = "navprev" > < a class = "- topic/link link" href = "../../../topics/sdk/display/display_color_property_lite.html" title = "色彩调整" aria-label = "上一主题: 色彩调整" rel = "prev" > < / a > < / span >
< span class = "navnext" > < a class = "- topic/link link" href = "../../../topics/sdk/display/display_blending.html" title = "Blending" aria-label = "下一主题: Blending" rel = "next" > < / a > < / span > < / span > < / div >
< div class = " wh_print_link print d-none d-md-inline-block " > < button onClick = "window.print()" title = "打印此页" aria-label = "打印此页" > < / button > < / div >
< button type = "button" id = "wh_toc_button" class = "custom-toggler navbar-toggler collapsed wh_toggle_button navbar-light" aria-expanded = "false" aria-label = "Toggle publishing table of content" aria-controls = "wh_publication_toc" >
< span class = "navbar-toggler-icon" > < / span >
< / button >
< / div >
< / nav >
< / div >
< div class = "wh_content_area" >
< div class = "row" >
< nav id = "wh_publication_toc" class = "col-lg-3 col-md-3 col-sm-12 d-md-block d-none d-print-none" aria-label = "Table of Contents Container" >
< div id = "wh_publication_toc_content" >
2025-04-23 17:54:31 +08:00
< div class = " wh_publication_toc " data-tooltip-position = "right" > < span class = "expand-button-action-labels" > < span id = "button-expand-action" role = "button" aria-label = "Expand" > < / span > < span id = "button-collapse-action" role = "button" aria-label = "Collapse" > < / span > < span id = "button-pending-action" role = "button" aria-label = "Pending" > < / span > < / span > < ul role = "tree" aria-label = "Table of Contents" > < li role = "treeitem" > < div data-tocid = "revinfo_linux-d3703e457" class = "topicref" data-id = "revinfo_linux" data-state = "leaf" > < span role = "button" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/revinfo/revinfo_rtos.html" id = "revinfo_linux-d3703e457-link" > 修订记录< / a > < / div > < / div > < / li > < li role = "treeitem" aria-expanded = "false" > < div data-tocid = "id-d3703e479" class = "topicref" data-id = "id" data-state = "not-ready" > < span role = "button" tabindex = "0" aria-labelledby = "button-expand-action id-d3703e479-link" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/sdk/env/sdk-compile.html" id = "id-d3703e479-link" > SDK 编译< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > 介绍不同编译环境下 SDK 的详细编译流程。< / p > < / div > < / div > < / div > < / li > < li role = "treeitem" aria-expanded = "false" > < div data-tocid = "id-d3703e601" class = "topicref" data-id = "id" data-state = "not-ready" > < span role = "button" tabindex = "0" aria-labelledby = "button-expand-action id-d3703e601-link" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/sdk/advanced/sdk-usage.html" id = "id-d3703e601-link" > 使用指南< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > 命令详解,编译选项,镜像和分区配置,添加应用和驱动等的详细使用说明。< / p > < / div > < / div > < / div > < / li > < li role = "treeitem" aria-expanded = "false" > < div data-tocid = "concept_rcx_czh_pzb-d3703e1001" class = "topicref" data-id = "concept_rcx_czh_pzb" data-state = "not-ready" > < span role = "button" tabindex = "0" aria-labelledby = "button-expand-action concept_rcx_czh_pzb-d3703e1001-link" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/sdk/chapter-app.html" id = "concept_rcx_czh_pzb-d3703e1001-link" > 应用场景< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > 描述了 SDK 在不同应用场景中的配置和使用, 包括系统更新、OTA、安全方案等。< / p > < / div > < / div > < / div > < / li > < li role = "treeitem" aria-expanded = "false" > < div data-tocid = "id-d3703e1841" class = "topicref" data-id = "id" data-state = "not-ready" > < span role = "button" tabindex = "0" aria-labelledby = "button-expand-action id-d3703e1841-link" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/sdk/peripheral/peripheral-intro.html" id = "id-d3703e1841-link" > 外设移植< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > < span class = "ph" > CTP、U 盘、SD 卡、有线和无线网络< / span > 等外设的介绍和使用说明。< / p > < / div > < / div > < / div > < / li > < li role = "treeitem" aria-expanded = "false" > < div data-tocid = "id-d3703e2015" class = "topicref" data-id = "id" data-state = "not-ready" > < span role = "button" tabindex = "0" aria-labelledby = "button-expand-action id-d3703e2015-link" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/sdk/bringup/chapter-bringup.html" id = "id-d3703e2015-link" > BringUp< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > 在硬件上电后快速初始化系统,为操作系统的启动准备好必要的硬件环境。< / p > < / div > < / div > < / div > < / li > < li role = "treeitem" aria-expanded = "true" > < div data-tocid = "id-d3703e2355" class = "topicref" data-id = "id" data-state = "expanded" > < span role = "button" tabindex = "0" aria-labelledby = "button-collapse-action id-d3703e2355-link" class = "wh-expand-btn" > < / span > < div class = "title" > < a href = "../../../topics/sdk/chapter-advanced-app.html" id = "id-d3703e2355-link" > 高级应用< / a > < div class = "wh-tooltip" > < p class = "shortdesc" > 系统、存储、多媒体、接口、安全等模块的详细配置和设计说明。< / p > < / div > < / div > < / div > < ul role = "group" class = "navbar-nav nav-list" > < li role = "treeitem" aria-expanded = "false" > < div data-tocid = "_0-d3703e2372" class = "topicref" data-id = "_0" data-state = "
2025-01-23 16:37:00 +08:00
< / div >
< / nav >
< div class = "col-lg-9 col-md-9 col-sm-12" id = "wh_topic_body" >
< button id = "wh_close_publication_toc_button" class = "close-toc-button d-none" aria-label = "Toggle publishing table of content" aria-controls = "wh_publication_toc" aria-expanded = "true" >
< span class = "close-toc-icon-container" >
< span class = "close-toc-icon" > < / span >
< / span >
< / button >
2025-04-23 17:54:31 +08:00
< div class = " wh_topic_content body " > < main role = "main" > < article class = "- topic/topic topic" role = "article" aria-labelledby = "ariaid-title1" >
< span class = "edit-link" style = "font-size:12px; opacity:0.6; text-align:right; vertical-align:middle" > < a target = "_blank" href = "http://aicdocco/taskstopics/sdk/display/display_burn_process.dita" > Edit online< / a > < / span > < h1 class = "- topic/title title topictitle1" id = "ariaid-title1" > 烧录进度条< / h1 >
< div class = "date inPage" > 9 Apr 2025< / div > < div style = "color: gray;" >
2025-01-23 16:37:00 +08:00
Read time: 4 minute(s)
2025-04-23 17:54:31 +08:00
< / div >
< div class = "- topic/body body" >
< p class = "- topic/p p" data-ofbid = "d129082e28__20250409171045" > ArtInChip 平台支持 SDCard / Udisk 烧录时显示进度条和数字百分比。进度条和数字百分比通过 CPU 进行绘制。
进度条默认居中,显示蓝绿两种颜色。数字百分比通过 fb console 实现, fb console 默认支持 32x32 点阵字体, ASCII 32 - 127。< / p >
< figure class = "- topic/fig fig fignone" id = "id__fig_ynt_zts_2dc" data-ofbid = "id__fig_ynt_zts_2dc" >
< br / > < div class = "imagecenter" > < img class = "- topic/image image imagecenter" id = "id__image_znt_zts_2dc" src = "../../../images/display/display_burn_progress_bar.jpg" alt = "/progress_bar" / > < / div > < br / >
< / figure >
< div class = "- topic/div div section" id = "id__id3" > 执行下列步骤,可在烧录时显示进度条和数字百分比:< ol class = "- topic/ol ol" id = "id__ol_tvb_y5s_2dc" data-ofbid = "id__ol_tvb_y5s_2dc" >
< li class = "- topic/li li" data-ofbid = "d129082e44__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e46__20250409171045" > 在 < span class = "- topic/ph ph" > Luban-Lite< / span > 根目录下执行 < span class = "+ topic/keyword sw-d/cmdname keyword cmdname" > scons --menuconfig< / span > , 进入 BootLoader 工程配置界面。< / p >
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e56__20250409171045" >
< div class = "- topic/p p" data-ofbid = "d129082e58__20250409171045" > 使能 SDCard/ Udisk
2025-01-23 16:37:00 +08:00
烧录功能。< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_zh3_35s_2dc" data-ofbid = "id__codeblock_zh3_35s_2dc" > Bootloader options --->
Upgrading --->
[*] Upgrading by SD Card
[*] Upgrading by UDISK< / pre >
< / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e65__20250409171045" >
< div class = "- topic/p p" data-ofbid = "d129082e67__20250409171045" > 使能 Display Engine
2025-01-23 16:37:00 +08:00
并配置相关参数。< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_kmx_35s_2dc" data-ofbid = "id__codeblock_kmx_35s_2dc" > Board options --->
[*] Using Display Engine (DE)
Display Parameter ---> < / pre >
< / div >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e73__20250409171045" > 配置显示子系统参数,详情参考 < a class = "- topic/xref xref" href = "display_config_lite.html" > Display 配置< / a >
2025-01-23 16:37:00 +08:00
,屏幕参数需要与项目工程保持一致(< strong class = "+ topic/ph hi-d/b ph b" > 背光除外< / strong > )。< div class = "- topic/note note note note_note" id = "id__note_y34_qn3_ddc" data-ofbid = "id__note_y34_qn3_ddc" > < span class = "note__title" > 注:< / span >
2025-04-23 17:54:31 +08:00
< ul class = "- topic/ul ul simple" id = "id__ul_a4t_zts_2dc" data-ofbid = "id__ul_a4t_zts_2dc" >
< li class = "- topic/li li" data-ofbid = "d129082e86__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e88__20250409171045" > BootLoader 工程需要 GPIO 控制背光,不支持 PWM
2025-01-23 16:37:00 +08:00
调节亮度,其余屏幕参数需要与项目工程保持一致< / p >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e92__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e94__20250409171045" > framebuffer format 支持 argb8888 和 rgb565, 配置项
2025-01-23 16:37:00 +08:00
< span class = "+ topic/ph ui-d/uicontrol ph uicontrol" > select framebuffer format(rgb565)
---> < / span > , 推荐 < strong class = "+ topic/ph hi-d/b ph b" > rgb565 格式< / strong > ,内存占用小< / p >
2025-04-23 17:54:31 +08:00
< / li >
< / ul >
2025-01-23 16:37:00 +08:00
< / div > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e107__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e109__20250409171045" > 使能烧录进度条命令 < / p >
2025-01-23 16:37:00 +08:00
< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_bjr_j5s_2dc" data-ofbid = "id__codeblock_bjr_j5s_2dc" > Bootloader options --->
Commands --->
[*] boot progress bar
[*] fb console support (NEW)
[ ] only fb console (NEW)< / pre >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e115__20250409171045" > 烧录进度条支持三种场景< ul class = "- topic/ul ul simple" id = "id__ul_c4t_zts_2dc" data-ofbid = "id__ul_c4t_zts_2dc" >
< li class = "- topic/li li" data-ofbid = "d129082e119__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e121__20250409171045" > 同时显示进度条和 fb console< / p >
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e125__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e127__20250409171045" > 只显示进度条< / p >
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e131__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e133__20250409171045" > 只显示 fb console< / p >
< / li >
< / ul > < / div >
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e139__20250409171045" > 如需,可添加< a class = "- topic/xref xref" href = "display_burn_process.html#id__section_ysh_kvs_2dc" > 自定义配置< / a > ,否则可略过。< p class = "- topic/p p" data-ofbid = "d129082e145__20250409171045" > 自定义配置支持修改进度条颜色、进度条宽高、进度条位置、fb console 字体颜色、fb console
字体大小。< / p > < / li >
< / ol > < / div >
< section class = "- topic/section section" id = "id__section_ysh_kvs_2dc" data-ofbid = "id__section_ysh_kvs_2dc" > < h2 class = "- topic/title title sectiontitle" > 自定义配置< / h2 >
2025-01-23 16:37:00 +08:00
2025-04-23 17:54:31 +08:00
< p class = "- topic/p p" data-ofbid = "d129082e154__20250409171045" > 自定义配置支持修改进度条颜色、进度条宽高、进度条位置、fb console 字体颜色、fb console 字体大小。< / p >
< div class = "- topic/p p" data-ofbid = "d129082e157__20250409171045" > 自定义配置需要修改 SDK 源代码,源码路径
< span class = "+ topic/ph sw-d/filepath ph filepath" > application/baremetal/bootloader/cmd/progress_bar.c< / span > : < ul class = "- topic/ul ul" id = "id__ul_q3k_svs_2dc" data-ofbid = "id__ul_q3k_svs_2dc" >
< li class = "- topic/li li" data-ofbid = "d129082e164__20250409171045" >
2025-01-23 16:37:00 +08:00
< div class = "- topic/div div section" id = "id__id5" >
< strong class = "+ topic/ph hi-d/b ph b" > 进度条颜色< / strong >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e171__20250409171045" > 修改宏定义:< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_oy3_k5s_2dc" data-ofbid = "id__codeblock_oy3_k5s_2dc" > #< span class = "hl-directive" > define< / span > BAR_BACKGROUND_COLOR < span class = "hl-number" > 0x00< / span > , < span class = "hl-number" > 0xA2< / span > , < span class = "hl-number" > 0xE9< / span > < em class = "hl-comment" > // r, g, b< / em >
2025-01-23 16:37:00 +08:00
#< span class = "hl-directive" > define< / span > BAR_FILL_COLOR < span class = "hl-number" > 0x18< / span > , < span class = "hl-number" > 0xD4< / span > , < span class = "hl-number" > 0x0A< / span > < / pre > < / div > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e177__20250409171045" >
2025-01-23 16:37:00 +08:00
< div class = "- topic/div div section" id = "id__id6" >
< strong class = "+ topic/ph hi-d/b ph b" > 进度条宽高< / strong >
2025-04-23 17:54:31 +08:00
< ul class = "- topic/ul ul" id = "id__ul_d2h_lyk_ndc" data-ofbid = "id__ul_d2h_lyk_ndc" >
< li class = "- topic/li li" data-ofbid = "d129082e186__20250409171045" >
< div class = "- topic/p p" data-ofbid = "d129082e188__20250409171045" > 进度条高度宏定义,以 pixel
2025-01-23 16:37:00 +08:00
为单位:< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_wnt_k5s_2dc" data-ofbid = "id__codeblock_wnt_k5s_2dc" > #< span class = "hl-directive" > define< / span > BAR_HEIGHT < span class = "hl-number" > 35< / span > < / pre > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e194__20250409171045" >
< div class = "- topic/p p" data-ofbid = "d129082e196__20250409171045" > 进度条宽度宏定义,进度条宽度自适应 LCD 分辨率,默认为 LCD 宽度的
2025-01-23 16:37:00 +08:00
5/6, 配置不同的比例调整进度条宽度: < pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_ohy_k5s_2dc" data-ofbid = "id__codeblock_ohy_k5s_2dc" > #< span class = "hl-directive" > define< / span > WIDTH_SPLIT_NUMERATOR < span class = "hl-number" > 5< / span >
#< span class = "hl-directive" > define< / span > WIDTH_SPLIT_DENOMINATOR < span class = "hl-number" > 6< / span > < / pre > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< / ul > < / div >
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e204__20250409171045" >
2025-01-23 16:37:00 +08:00
< div class = "- topic/div div section" id = "id__id7" >
< strong class = "+ topic/ph hi-d/b ph b" > 进度条位置< / strong >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e211__20250409171045" > 修改进度条绘制逻辑,默认居中显示:< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_bvm_l5s_2dc" data-ofbid = "id__codeblock_bvm_l5s_2dc" > < strong class = "hl-keyword" > void< / strong > aicfb_draw_bar(< strong class = "hl-keyword" > unsigned< / strong > < strong class = "hl-keyword" > int< / strong > value)
2025-01-23 16:37:00 +08:00
{
...
bar_x = (info.width - width) / < span class = "hl-number" > 2< / span > ; < em class = "hl-comment" > // 居中显示< / em >
bar_y = (info.height - height) / < span class = "hl-number" > 2< / span > ;
...
}< / pre > < / div > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e217__20250409171045" >
2025-01-23 16:37:00 +08:00
< div class = "- topic/div div section" id = "id__fb-console" >
< strong class = "+ topic/ph hi-d/b ph b" > fb console 字体颜色< / strong >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e224__20250409171045" > fb console 支持 16
2025-01-23 16:37:00 +08:00
种颜色,通过宏定义指定:< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_fgv_n5s_2dc" data-ofbid = "id__codeblock_fgv_n5s_2dc" > < strong class = "hl-keyword" > enum< / strong > color_idx {
CONSOLE_BLACK = < span class = "hl-number" > 0< / span > ,
CONSOLE_RED,
CONSOLE_GREEN,
CONSOLE_BROWN,
CONSOLE_BLUE,
CONSOLE_MAGENTA,
CONSOLE_CYAN,
CONSOLE_LIGHT_GRAY,
CONSOLE_GRAY,
CONSOLE_LIGHT_RED,
CONSOLE_LIGTH_GREEN,
CONSOLE_YELLOW,
CONSOLE_LIGHT_BLUE,
CONSOLE_LIGHT_MAGENTA,
CONSOLE_LIGHT_CYAN,
CONSOLE_WHITE,
CONSOLE_COLOR_COUNT
2025-04-23 17:54:31 +08:00
};< / pre > < / div > < div class = "- topic/p p" data-ofbid = "d129082e228__20250409171045" > 字体颜色宏定义< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_d22_wvs_2dc" data-ofbid = "id__codeblock_d22_wvs_2dc" > #< span class = "hl-directive" > define< / span > CONSOLE_COLOR_FG CONSOLE_LIGHT_GRAY
2025-01-23 16:37:00 +08:00
#< span class = "hl-directive" > define< / span > CONSOLE_COLOR_BG CONSOLE_BLACK< / pre > < / div > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e234__20250409171045" >
2025-01-23 16:37:00 +08:00
< div class = "- topic/div div section" id = "id__id8" >
< strong class = "+ topic/ph hi-d/b ph b" > fb console 显示位置< / strong >
2025-04-23 17:54:31 +08:00
< p class = "- topic/p p" data-ofbid = "d129082e241__20250409171045" > 修改 fb console
2025-01-23 16:37:00 +08:00
逻辑,默认居中显示< / p > < pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_rrc_p5s_2dc" data-ofbid = "id__codeblock_rrc_p5s_2dc" > < strong class = "hl-keyword" > void< / strong > aicfb_draw_bar(< strong class = "hl-keyword" > unsigned< / strong > < strong class = "hl-keyword" > int< / strong > value)
{
...
console_x = info.width / < span class = "hl-number" > 2< / span > ; < em class = "hl-comment" > // 居中显示< / em >
console_y = bar_y + BAR_HEIGHT + < span class = "hl-number" > 5< / span > ;
...
}< / pre > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e248__20250409171045" >
2025-01-23 16:37:00 +08:00
< div class = "- topic/div div section" id = "id__id9" >
< strong class = "+ topic/ph hi-d/b ph b" > fb console 字体大小< / strong >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e255__20250409171045" > 如需修改 fb console 字体大小:< ol class = "- topic/ol ol" id = "id__ul_nkg_byk_ndc" data-ofbid = "id__ul_nkg_byk_ndc" >
< li class = "- topic/li li" data-ofbid = "d129082e259__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e261__20250409171045" > 提供新的< strong class = "+ topic/ph hi-d/b ph b" > 字体数据源< / strong > 。< / p >
< p class = "- topic/p p" data-ofbid = "d129082e267__20250409171045" > 数据源保存路径
2025-01-23 16:37:00 +08:00
< span class = "+ topic/ph sw-d/filepath ph filepath" > application/baremetal/bootloader/include/video_font_data.h< / span > 。< / p >
2025-04-23 17:54:31 +08:00
< p class = "- topic/p p" data-ofbid = "d129082e273__20250409171045" > 可通过点阵字库工具导出点阵数据,推荐第三方开源工具 < a class = "- topic/xref xref reference external" href = "https://gitee.com/kerndev/FontMaker/tree/master" target = "_blank" rel = "external noopener" > 点阵字库生成工具< / a >
2025-01-23 16:37:00 +08:00
< / p >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e281__20250409171045" >
< div class = "- topic/p p" data-ofbid = "d129082e283__20250409171045" > 将数据源复制到数组中,并修改数据类型,默认数据类型为
2025-01-23 16:37:00 +08:00
< code class = "+ topic/ph pr-d/codeph ph codeph" > uint32_t< / code > 。< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_d2l_r5s_2dc" data-ofbid = "id__codeblock_d2l_r5s_2dc" > < strong class = "hl-keyword" > static< / strong > uint32_t video_fontdata[VIDEO_FONT_SIZE] = {
...
...
};< / pre > < / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e292__20250409171045" >
< div class = "- topic/p p" data-ofbid = "d129082e294__20250409171045" > < strong class = "+ topic/ph hi-d/b ph b" > 修改字体属性< / strong > < pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_ytq_r5s_2dc" data-ofbid = "id__codeblock_ytq_r5s_2dc" > #< span class = "hl-directive" > define< / span > VIDEO_FONT_CHARS < span class = "hl-number" > 96< / span > < em class = "hl-comment" > // 支持的字符个数< / em >
2025-01-23 16:37:00 +08:00
#< span class = "hl-directive" > define< / span > VIDEO_FONT_WIDTH < span class = "hl-number" > 32< / span > < em class = "hl-comment" > // 字体宽度,以 pixel 为单位< / em >
#< span class = "hl-directive" > define< / span > VIDEO_FONT_HEIGHT < span class = "hl-number" > 32< / span > < em class = "hl-comment" > // 字体高度,以 pixel 为单位< / em > < / pre >
< / div >
2025-04-23 17:54:31 +08:00
< / li >
< li class = "- topic/li li" data-ofbid = "d129082e302__20250409171045" >
< p class = "- topic/p p" data-ofbid = "d129082e304__20250409171045" >
2025-01-23 16:37:00 +08:00
< strong class = "+ topic/ph hi-d/b ph b" > 修改 fb console 逻辑< / strong > < / p >
2025-04-23 17:54:31 +08:00
< div class = "- topic/p p" data-ofbid = "d129082e309__20250409171045" > 节选部分代码,需要重新指定数据索引,数据类型和掩码:< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "id__codeblock_gpc_s5s_2dc" data-ofbid = "id__codeblock_gpc_s5s_2dc" > < strong class = "hl-keyword" > static< / strong > < strong class = "hl-keyword" > void< / strong > aicfb_console_putc(< strong class = "hl-keyword" > struct< / strong > aicfb_screeninfo *info,
2025-01-23 16:37:00 +08:00
< strong class = "hl-keyword" > unsigned< / strong > < strong class = "hl-keyword" > int< / strong > x, < strong class = "hl-keyword" > unsigned< / strong > < strong class = "hl-keyword" > int< / strong > y, < strong class = "hl-keyword" > char< / strong > ch)
{
< strong class = "hl-keyword" > int< / strong > pbytes = info-> bits_per_pixel / < span class = "hl-number" > 8< / span > ;
< strong class = "hl-keyword" > int< / strong > i, row;
< strong class = "hl-keyword" > void< / strong > *line;
line = (< strong class = "hl-keyword" > unsigned< / strong > < strong class = "hl-keyword" > char< / strong > *)(info-> framebuffer + y * info-> stride + x * pbytes);
< strong class = "hl-keyword" > for< / strong > (row = < span class = "hl-number" > 0< / span > ; row < VIDEO_FONT_HEIGHT; row++) {
< strong class = "hl-keyword" > unsigned< / strong > < strong class = "hl-keyword" > int< / strong > idx = (ch - < span class = "hl-number" > 32< / span > ) * VIDEO_FONT_HEIGHT + row; < em class = "hl-comment" > // 根据新数据源重新索引< / em >
uint32_t bits = video_fontdata[idx]; < em class = "hl-comment" > // 修改数据类型< / em >
< strong class = "hl-keyword" > switch< / strong > (info-> format) {
< strong class = "hl-keyword" > case< / strong > MPP_FMT_RGB_< span class = "hl-number" > 565< / span > :
{
uint16_t *dst = line;
< strong class = "hl-keyword" > for< / strong > (i = < span class = "hl-number" > 0< / span > ; i < VIDEO_FONT_WIDTH; i++) {
*dst++ = (bits & < span class = "hl-number" > 0x80000000< / span > ) ? colour_fg : colour_bg; < em class = "hl-comment" > // 根据数据类型修改掩码 0x80000000< / em >
bits < < = < span class = "hl-number" > 1< / span > ;
}
< strong class = "hl-keyword" > break< / strong > ;
}
< strong class = "hl-keyword" > case< / strong > MPP_FMT_ARGB_< span class = "hl-number" > 8888< / span > :
{
uint32_t *dst = line;
< strong class = "hl-keyword" > for< / strong > (i = < span class = "hl-number" > 0< / span > ; i < VIDEO_FONT_WIDTH; i++) {
*dst++ = (bits & < span class = "hl-number" > 0x80000000< / span > ) ? colour_fg : colour_bg; < em class = "hl-comment" > // 根据数据类型修改掩码 0x80000000< / em >
bits < < = < span class = "hl-number" > 1< / span > ;
}
< strong class = "hl-keyword" > break< / strong > ;
}
}
}< / pre > < / div >
2025-04-23 17:54:31 +08:00
< p class = "- topic/p p" data-ofbid = "d129082e314__20250409171045" > < / p >
< / li >
< / ol > < / div > < / div >
< / li >
< / ul > < / div >
2025-01-23 16:37:00 +08:00
2025-04-23 17:54:31 +08:00
< / section >
< / div >
< / article > < / main > < / div >
2025-01-23 16:37:00 +08:00
< / div >
< / div >
< / div >
< / div >
< footer class = "navbar navbar-default wh_footer" >
< div class = " footer-container mx-auto " >
< title > footer def< / title >
2025-04-23 17:54:31 +08:00
< style >
2025-01-23 16:37:00 +08:00
.p1 {
font-family: FangZhengShuSong, Times, serif;
}
.p2 {
font-family: Arial, Helvetica, sans-serif;
}
.p3 {
font-family: "Lucida Console", "Courier New", monospace;
}
2025-04-23 17:54:31 +08:00
< / style >
2025-01-23 16:37:00 +08:00
< div class = "webhelp.fragment.footer" >
2025-04-23 17:54:31 +08:00
< p class = "p1" > Copyright © 2019-2025 广东匠芯创科技有限公司. All rights reserved.< / p >
< / div >
< div >
2025-01-23 16:37:00 +08:00
< div class = "generation_time" >
2025-04-23 17:54:31 +08:00
Update Time: 2025-04-09
2025-01-23 16:37:00 +08:00
< / div >
2025-04-23 17:54:31 +08:00
< / div >
2025-01-23 16:37:00 +08:00
< / div >
< / footer >
< div id = "go2top" class = "d-print-none" >
< span class = "oxy-icon oxy-icon-up" > < / span >
< / div >
< div id = "modal_img_large" class = "modal" >
< span class = "close oxy-icon oxy-icon-remove" > < / span >
< div id = "modal_img_container" > < / div >
< div id = "caption" > < / div >
< / div >
< script src = "${pd}/publishing/publishing-styles-AIC-template/js/custom.js" defer = "defer" > < / script >
< / body >
< / html >