update version to v2.1.7

This commit is contained in:
Artery-MCU
2025-11-27 18:18:48 +08:00
parent f4e3505c4a
commit 256ea4c81b
973 changed files with 4232 additions and 4335 deletions

View File

@@ -0,0 +1,878 @@
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{mso-style-link:"页眉 字符";
margin:0cm;
margin-bottom:.0001pt;
text-align:center;
layout-grid-mode:char;
border:none;
padding:0cm;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{mso-style-link:"页脚 字符";
margin:0cm;
margin-bottom:.0001pt;
layout-grid-mode:char;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"批注框文本 字符";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
span.a
{mso-style-name:"批注框文本 字符";
mso-style-link:;}
span.a0
{mso-style-name:"页眉 字符";
mso-style-link:;}
span.a1
{mso-style-name:"页脚 字符";
mso-style-link:;}
p.Default, li.Default, div.Default
{mso-style-name:Default;
margin:0cm;
margin-bottom:.0001pt;
text-autospace:none;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
color:black;}
.MsoChpDefault
{font-family:"Calibri",sans-serif;}
/* Page Definitions */
@page WordSection1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
</head>
<body lang=ZH-CN style='text-justify-trim:punctuation'>
<div class=WordSection1 style='layout-grid:15.6pt'>
<p class=MsoNormal align=center style='text-align:center;word-break:break-all'><b><i><span
lang=EN-US style='font-size:16.0pt;font-family:"Arial",sans-serif;color:#0070C0'>Release
Notes for </span></i></b></p>
<p class=MsoNormal align=center style='text-align:center;word-break:break-all'><b><i><span
lang=EN-US style='font-size:16.0pt;font-family:"Arial",sans-serif;color:#0070C0'>AT32F413
Firmware Library</span></i></b></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.7-2025/11/24</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>Drivers</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>CRM</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>crm_sysclk_switch()</span><span
style='font-family:宋体'>函数,确保系统时钟切换后系统稳定。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>GPIO</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>gpio_bits_toggle()</span><span
style='font-family:宋体'>函数,操作流程更严谨。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>修正</span><span lang=EN-US>I2C2_GMUX_0010</span><span
style='font-family:宋体'></span><span lang=EN-US>I2C_GMUX_0011</span><span
style='font-family:宋体'>复用功能宏定义值错误。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>USART</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>usart_flag_clear()</span><span
style='font-family:宋体'>函数,调整清除</span><span lang=EN-US>RDBF</span><span
style='font-family:宋体'>标志的方式为读</span><span lang=EN-US>DT</span><span
style='font-family:宋体'>寄存器。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>USB</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>usb_ept_open()</span><span
style='font-family:宋体'>函数,当设置同步</span><span lang=EN-US>IN</span><span
style='font-family:宋体'>传输端点时,默认将端点状态由</span><span lang=EN-US>NAK</span><span
style='font-family:宋体'>改为</span><span lang=EN-US>DISABLE</span><span
style='font-family:宋体'>,解决同步端点在错误的</span><span lang=EN-US>NAK</span><span
style='font-family:宋体'>状态下引起错误。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>TMR</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>tmr_pwm_input_config()</span><span
style='font-family:宋体'></span><span lang=EN-US>tmr_encoder_mode_config()</span><span
style='font-family:宋体'></span><span lang=EN-US>tmr_output_channel_config()</span><span
style='font-family:宋体'>函数。通道模式配置前关闭通道使能,否则通道模式无法切换。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>Middlewares</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>USB</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>keyboard class</span><span
style='font-family:宋体'>,在</span><span lang=EN-US>keyboard_type</span><span
style='font-family:宋体'>结构体中新增成员</span><span lang=EN-US>send_state</span><span
style='font-family:宋体'>用于记录发送状态,并更新函数</span><span lang=EN-US>usb_keyboard_class_send_report</span><span
style='font-family:宋体'>用于发送时的流控处理,避免发送数据出错。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>mouse class</span><span
style='font-family:宋体'>,在</span><span lang=EN-US>mouse_type</span><span
style='font-family:宋体'>结构体中新增成员</span><span lang=EN-US>send_state</span><span
style='font-family:宋体'>用于记录发送状态,并更新函数</span><span lang=EN-US>usb_mouse_class_send_report</span><span
style='font-family:宋体'>用于发送时的流控处理,避免发送数据出错。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>custom class</span><span
style='font-family:宋体'>,在</span><span lang=EN-US>custom_hid_type</span><span
style='font-family:宋体'>结构体中新增成员</span><span lang=EN-US>send_state</span><span
style='font-family:宋体'>用于记录发送状态,并更新函数</span><span lang=EN-US>custom_hid_class_send_report</span><span
style='font-family:宋体'>用于发送时的流控处理,避免发送数据出错。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US> audio class</span><span
style='font-family:宋体'>,修改</span><span lang=EN-US>audio sampling frequency</span><span
style='font-family:宋体'>请求配置,解决部分主机兼容性问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>Demos</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>ADC</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新所有</span><span lang=EN-US>demo</span><span
style='font-family:宋体'></span><span lang=EN-US>ADC</span><span
style='font-family:宋体'>初始化顺序,防止在极端情况下异常。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新有使用</span><span lang=EN-US>DMA</span><span
style='font-family:宋体'>的相关</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>,配置流程中开启</span><span lang=EN-US>DMA</span><span
style='font-family:宋体'>循环模式,功能实现更新为循环触发。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>删除重复的</span><span lang=EN-US> software_trigger_repeat demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>USB</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新所有</span><span lang=EN-US>usb_device demo</span><span
style='font-family:宋体'>的时钟分频配置流程,防止因</span><span lang=EN-US>AHB</span><span
style='font-family:宋体'>分频后导致</span><span lang=EN-US>USB</span><span
style='font-family:宋体'>时钟分频设置错误。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>调整</span><span lang=EN-US>keyboard</span><span
style='font-family:宋体'>中唤醒稳定延时方式。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>调整</span><span lang=EN-US>mouse</span><span
style='font-family:宋体'>中唤醒稳定延时方式。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>msc</span><span
style='font-family:宋体'>中宏定义</span><span lang=EN-US>USB_FLASH_ADDR_OFFSET</span><span
style='font-family:宋体'>值,由</span><span lang=EN-US>0x08005000</span><span
style='font-family:宋体'>改为</span><span lang=EN-US>0x08008000</span><span
style='font-family:宋体'>,解决不同环境下编译范围溢出导致出错问题。</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>virtual_msc_iap demo</span><span
style='font-family:宋体'>中跳转</span><span lang=EN-US>APP</span><span
style='font-family:宋体'>函数,添加编译不优化设定,防止部分跳转优化失败的问题。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>templates</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>eclipse_gcc</span><span
style='font-family:宋体'>中工程配置的</span><span lang=EN-US>include</span><span
style='font-family:宋体'>路径,防止多工程导入时</span><span lang=EN-US>workspace_project_locations</span><span
style='font-family:宋体'>参数错误导致编译报错。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>Board</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>board.c</span><span
style='font-family:宋体'>中部分参数变量的写法,解决新版编译器下编译警告。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>Cortex-m4</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>systick_interrupt</span><span
style='font-family:宋体'>中判断延时的写法由大于改为大于等于,避免翻转</span><span lang=EN-US>IO</span><span
style='font-family:宋体'></span><span lang=EN-US>1ms</span><span
style='font-family:宋体'>问题。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>AT32IDE</span><span
style='font-family:宋体'></span><span lang=EN-US>Eclipse</span><span
style='font-family:宋体'>工程</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>删除工程配置中</span><span lang=EN-US>release</span><span
style='font-family:宋体'>项,只保留</span><span lang=EN-US>debug</span><span
style='font-family:宋体'>项。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span lang=EN-US>IAP</span><span
style='font-family:宋体'>相关</span></p>
<p class=MsoListParagraph style='margin-left:63.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>w<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span><span
style='font-family:宋体'>更新所有</span><span lang=EN-US>IAP_Programmer.exe</span><span
style='font-family:宋体'>应用程序。</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>&nbsp;</span></b></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.6-2025/04/25</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化</span><span lang=EN-US>PWC deepsleep_rtc
demo</span><span style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>调整</span><span lang=EN-US>SPI demo</span><span
style='font-family:宋体'>的代码结构。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>RTC</span><span
style='font-family:宋体'>计数值读取流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>Flash</span><span
style='font-family:宋体'>驱动,优化部分流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>gpio_bits_toggle</span><span
style='font-family:宋体'>函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.5-2024/12/13</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新内核</span><span lang=EN-US>DSP</span><span
style='font-family:宋体'>库。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>CAN</span><span
style='font-family:宋体'>驱动。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>SDIO</span><span
style='font-family:宋体'>协议层驱动,并新增</span><span lang=EN-US>emmc_card demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>SLIB demo</span><span style='font-family:宋体'>新增支持</span><span
lang=EN-US>AT32IDE</span><span style='font-family:宋体'>工程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>USB</span><span
style='font-family:宋体'>驱动。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>I2C eeprom
demo</span><span style='font-family:宋体'>,增加多页写逻辑。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>7.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化</span><span lang=EN-US>PWR</span><span
style='font-family:宋体'>驱动和</span><span lang=EN-US>demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>8.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.4-2024/08/08</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>调整</span><span lang=EN-US>sdio demo</span><span
style='font-family:宋体'>中总线时钟频率。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>i2c_flag_clear</span><span
style='font-family:宋体'></span><span lang=EN-US>i2c_init</span><span
style='font-family:宋体'>函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>msc iap
demo</span><span style='font-family:宋体'>,完善兼容性问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>I2C dma</span><span
style='font-family:宋体'>相关</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>的初始化配置流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正部分</span><span lang=EN-US>demo AC6</span><span
style='font-family:宋体'>环境下编译问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.3-2024/01/26</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新日历闰年计算函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>USB hid report</span><span
style='font-family:宋体'>描述符。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.2-2024/01/05</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>timer</span><span
style='font-family:宋体'></span><span lang=EN-US>input_capture demo</span><span
style='font-family:宋体'>的计数计算方式。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分</span><span lang=EN-US>USB demo
HID</span><span style='font-family:宋体'>识别慢问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>systick interrupt
demo</span><span style='font-family:宋体'></span><span lang=EN-US>systick</span><span
style='font-family:宋体'>的初始化函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>winusb demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'></span><span lang=EN-US>demo</span><span
style='font-family:宋体'>中更新</span><span lang=EN-US>xx_interrupt_flag_get</span><span
style='font-family:宋体'>函数调用方式。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.1-2023/10/26</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>删除</span><span lang=EN-US>SRAM</span><span
style='font-family:宋体'>扩展</span><span lang=EN-US>demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释及</span><span lang=EN-US>readme</span><span
style='font-family:宋体'></span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.1.0-2023/08/04</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>utilities</span><span style='font-family:宋体'>下各</span><span
lang=EN-US>demo</span><span style='font-family:宋体'>增加</span><span lang=EN-US>AT32IDE</span><span
style='font-family:宋体'>工程支持。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>CRC</span><span style='font-family:宋体'>驱动新增多项式及多项式宽度可修改的支持。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>USB</span><span
style='font-family:宋体'>驱动及</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>,完善数据对齐问题,优化代码流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>完善</span><span lang=EN-US>IAR9</span><span
style='font-family:宋体'>使用</span><span lang=EN-US>printf</span><span
style='font-family:宋体'>时的重定向兼容性问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增按</span><span lang=EN-US>FLASH</span><span
style='font-family:宋体'>容量区分的宏定义并更新</span><span lang=EN-US>FLASH demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.9-2023/02/16</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>完善</span><span lang=EN-US>utilities</span><span
style='font-family:宋体'></span><span lang=EN-US>freertos demo</span><span
style='font-family:宋体'></span><span lang=EN-US>AC6</span><span
style='font-family:宋体'>编译问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'></span><span lang=EN-US>at32f413_conf.h</span><span
style='font-family:宋体'>中新增了</span><span lang=EN-US>LEXT_VALUE</span><span
style='font-family:宋体'>宏定义。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'></span><span lang=EN-US>*.ld</span><span
style='font-family:宋体'>文件中新增</span><span lang=EN-US>spim</span><span
style='font-family:宋体'>相关的</span><span lang=EN-US>section</span><span
style='font-family:宋体'>描述,以更好支持</span><span lang=EN-US>gcc</span><span
style='font-family:宋体'></span><span lang=EN-US>spim</span><span
style='font-family:宋体'>地址的链接处理。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.8-2022/11/18</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>移除各文件中文件头部分的版本及日期记录项。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增一份</span><span lang=EN-US>release
notes drivers</span><span style='font-family:宋体'>,单独记录</span><span lang=EN-US>drivers</span><span
style='font-family:宋体'>部分的更新,文件位于</span><span lang=EN-US>libraries\drivers</span><span
style='font-family:宋体'>目录下。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>I2C</span><span
style='font-family:宋体'>中断和</span><span lang=EN-US>DMA demo</span><span
style='font-family:宋体'>为非阻塞方式。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正</span><span lang=EN-US>USB</span><span
style='font-family:宋体'></span><span lang=EN-US>cdc_msc</span><span
style='font-family:宋体'>复合类在</span><span lang=EN-US>linux</span><span
style='font-family:宋体'>失败的问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>USB</span><span
style='font-family:宋体'></span><span lang=EN-US>virtual msc iap demo</span><span
style='font-family:宋体'>以支持</span><span lang=EN-US>linux</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>USB</span><span
style='font-family:宋体'></span><span lang=EN-US>audio</span><span
style='font-family:宋体'>相关内容,以提供更好的兼容性。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>7.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新了</span><span lang=EN-US>IAR_Programmer.exe</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>8.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>USART interrupt demo</span><span
style='font-family:宋体'>的中断函数中,标志位的检测加入了中断使能判断。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>9.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>ADC</span><span style='font-family:宋体'>新增</span><span
lang=EN-US>repeat_conversion_loop_transfer demo</span><span style='font-family:
宋体'>,采用</span><span lang=EN-US>DMA</span><span style='font-family:宋体'>循环取</span><span
lang=EN-US>ADC</span><span style='font-family:宋体'>数据。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.7-2022/08/16</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>I2C eeprom
demo</span><span style='font-family:宋体'>,增加</span><span lang=EN-US>16 </span><span
style='font-family:宋体'>位地址支持。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>template</span><span style='font-family:宋体'>下新增</span><span
lang=EN-US>IAR v9.3</span><span style='font-family:宋体'>的工程</span><span
lang=EN-US>demo</span><span style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正</span><span lang=EN-US>gcc</span><span
style='font-family:宋体'>环境下</span><span lang=EN-US>printf</span><span
style='font-family:宋体'>无法输出的问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>启动文件支持</span><span lang=EN-US>configuration
wizard</span><span style='font-family:宋体'>图形配置。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.6-2022/06/28</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>FLASH</span><span
style='font-family:宋体'>访问保护使能</span><span lang=EN-US>demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>IO toggle
demo</span><span style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化部分</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>及驱动流程,更正注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.5-2022/05/20</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修改</span><span lang=EN-US>USB
virtual msc iap demo</span><span style='font-family:宋体'>的分区表描述符。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>USB
composite_vcp_msc demo</span><span style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修改了</span><span lang=EN-US>SD</span><span
style='font-family:宋体'>卡相关</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>,优化了卡初始化识别流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更正了部分</span><span lang=EN-US>CAN
demo</span><span style='font-family:宋体'>中波特率分频设置。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化部分</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>及驱动流程,更正注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.4-2022/04/02</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>wdt_standby
demo</span><span style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>导入</span><span lang=EN-US>DSP</span><span
style='font-family:宋体'>相关源码及新增</span><span lang=EN-US>cmsis_dsp demo</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化部分</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>及驱动流程,更正注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.3-2022/02/11</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>USB</span><span style='font-family:宋体'>中新增</span><span
lang=EN-US>virtual_comport demo</span><span style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>完善</span><span lang=EN-US>USB msc
iap demo</span><span style='font-family:宋体'>在不同系统下的兼容问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化部分</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>及驱动流程,更正注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.2-2021/12/31</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正中断优先级组参数定义错误的问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>统一</span><span lang=EN-US>printf</span><span
style='font-family:宋体'>的串口初始化及重定向函数到</span><span lang=EN-US>xx_board.c</span><span
style='font-family:宋体'>中,并去除各</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>中的相关内容。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分</span><span lang=EN-US>demo</span><span
style='font-family:宋体'>,以支持</span><span lang=EN-US>AC6</span><span
style='font-family:宋体'></span><span lang=EN-US> O3</span><span
style='font-family:宋体'>优化等级编译。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>USB</span><span style='font-family:宋体'>中新增</span><span
lang=EN-US>composite_audio_hid demo</span><span style='font-family:宋体'>,并完善回馈及同步机制。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.1-2021/12/17</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正各外设的</span><span lang=EN-US>flag</span><span
style='font-family:宋体'>清除函数,防止位域方式下的误操作问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>统一</span><span lang=EN-US>pwc_wakeup_pin_enable</span><span
style='font-family:宋体'>函数接口。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正</span><span lang=EN-US>USB</span><span
style='font-family:宋体'>设备类数组</span><span lang=EN-US>4</span><span
style='font-family:宋体'>字节对齐问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>virtual_msc_iap
demo</span><span style='font-family:宋体'>的虚拟空间大小为</span><span lang=EN-US>100 MB</span><span
style='font-family:宋体'></span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>修正</span><span lang=EN-US>composite_vcp_keyboard
demo</span><span style='font-family:宋体'>中虚拟串口</span><span lang=EN-US>bulk</span><span
style='font-family:宋体'>传输结束问题。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>USB demo</span><span
style='font-family:宋体'></span><span lang=EN-US>keyboard</span><span
style='font-family:宋体'>相关的发送函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>7.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>ADC demo</span><span
style='font-family:宋体'></span><span lang=EN-US>timer</span><span
style='font-family:宋体'>触发</span><span lang=EN-US>adc</span><span
style='font-family:宋体'>转换的定时器频率配置流程。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.0-2021/11/26</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>AT32F413</span><span style='font-family:宋体'>系列固件库初始发布版。</span></p>
</div>
</body>
</html>

View File

@@ -3,7 +3,8 @@
* @file at32f413.h * @file at32f413.h
* @brief at32f413 header file * @brief at32f413 header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -124,7 +125,7 @@ extern "C" {
*/ */
#define __AT32F413_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F413_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */
#define __AT32F413_LIBRARY_VERSION_MIDDLE (0x01) /*!< [23:16] middle version */ #define __AT32F413_LIBRARY_VERSION_MIDDLE (0x01) /*!< [23:16] middle version */
#define __AT32F413_LIBRARY_VERSION_MINOR (0x06) /*!< [15:8] minor version */ #define __AT32F413_LIBRARY_VERSION_MINOR (0x07) /*!< [15:8] minor version */
#define __AT32F413_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F413_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __AT32F413_LIBRARY_VERSION ((__AT32F413_LIBRARY_VERSION_MAJOR << 24) | \ #define __AT32F413_LIBRARY_VERSION ((__AT32F413_LIBRARY_VERSION_MAJOR << 24) | \
(__AT32F413_LIBRARY_VERSION_MIDDLE << 16) | \ (__AT32F413_LIBRARY_VERSION_MIDDLE << 16) | \

View File

@@ -3,7 +3,8 @@
* @file at32f413_conf.h * @file at32f413_conf.h
* @brief at32f413 config header file * @brief at32f413 config header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file system_at32f413.c * @file system_at32f413.c
* @brief contains all the functions for cmsis cortex-m4 system source file * @brief contains all the functions for cmsis cortex-m4 system source file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -143,7 +144,7 @@ void system_core_clock_update(void)
pll_mult += 2U; pll_mult += 2U;
} }
if (pll_clock_source == 0x00) if(pll_clock_source == 0x00)
{ {
/* hick divided by 2 selected as pll clock entry */ /* hick divided by 2 selected as pll clock entry */
system_core_clock = (HICK_VALUE >> 1) * pll_mult; system_core_clock = (HICK_VALUE >> 1) * pll_mult;
@@ -151,7 +152,7 @@ void system_core_clock_update(void)
else else
{ {
/* hext selected as pll clock entry */ /* hext selected as pll clock entry */
if (CRM->cfg_bit.pllhextdiv != RESET) if(CRM->cfg_bit.pllhextdiv != RESET)
{ {
/* hext clock divided by 2 */ /* hext clock divided by 2 */
system_core_clock = (HEXT_VALUE / 2) * pll_mult; system_core_clock = (HEXT_VALUE / 2) * pll_mult;

View File

@@ -3,7 +3,8 @@
* @file system_at32f413.h * @file system_at32f413.h
* @brief cmsis cortex-m4 system header file. * @brief cmsis cortex-m4 system header file.
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -0,0 +1,310 @@
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{mso-style-link:"页眉 字符";
margin:0cm;
margin-bottom:.0001pt;
text-align:center;
layout-grid-mode:char;
border:none;
padding:0cm;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{mso-style-link:"页脚 字符";
margin:0cm;
margin-bottom:.0001pt;
layout-grid-mode:char;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"批注框文本 字符";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
span.a
{mso-style-name:"批注框文本 字符";
mso-style-link:;}
span.a0
{mso-style-name:"页眉 字符";
mso-style-link:;}
span.a1
{mso-style-name:"页脚 字符";
mso-style-link:;}
p.Default, li.Default, div.Default
{mso-style-name:Default;
margin:0cm;
margin-bottom:.0001pt;
text-autospace:none;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
color:black;}
.MsoChpDefault
{font-family:"Calibri",sans-serif;}
/* Page Definitions */
@page WordSection1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
</head>
<body lang=ZH-CN style='text-justify-trim:punctuation'>
<div class=WordSection1 style='layout-grid:15.6pt'>
<p class=MsoNormal align=center style='text-align:center;word-break:break-all'><b><i><span
lang=EN-US style='font-size:16.0pt;font-family:"Arial",sans-serif;color:#0070C0'>Release
Notes for </span></i></b></p>
<p class=MsoNormal align=center style='text-align:center;word-break:break-all'><b><i><span
lang=EN-US style='font-size:16.0pt;font-family:"Arial",sans-serif;color:#0070C0'>AT32F413
Firmware Library Drivers</span></i></b></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.7-2025/11/24</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>CRM</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>crm_sysclk_switch()</span><span
style='font-family:宋体'>函数,确保系统时钟切换后系统稳定。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>GPIO</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>gpio_bits_toggle()</span><span
style='font-family:宋体'>函数,操作流程更严谨。</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>修正</span><span lang=EN-US>I2C2_GMUX_0010</span><span
style='font-family:宋体'></span><span lang=EN-US>I2C_GMUX_0011</span><span
style='font-family:宋体'>复用功能宏定义值错误。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>USART</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>usart_flag_clear()</span><span
style='font-family:宋体'>函数,调整清除</span><span lang=EN-US>RDBF</span><span
style='font-family:宋体'>标志的方式为读</span><span lang=EN-US>DT</span><span
style='font-family:宋体'>寄存器。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>USB</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>usb_ept_open()</span><span
style='font-family:宋体'>函数,当设置同步</span><span lang=EN-US>IN</span><span
style='font-family:宋体'>传输端点时,默认将端点状态由</span><span lang=EN-US>NAK</span><span
style='font-family:宋体'>改为</span><span lang=EN-US>DISABLE</span><span
style='font-family:宋体'>,解决同步端点在错误的</span><span lang=EN-US>NAK</span><span
style='font-family:宋体'>状态下引起错误。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>TMR</span></p>
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
style='font:7.0pt "Times New Roman"'>&nbsp; </span></span><span
style='font-family:宋体'>更新</span><span lang=EN-US>tmr_pwm_input_config()</span><span
style='font-family:宋体'></span><span lang=EN-US>tmr_encoder_mode_config()</span><span
style='font-family:宋体'></span><span lang=EN-US>tmr_output_channel_config()</span><span
style='font-family:宋体'>函数。通道模式配置前关闭通道使能,否则通道模式无法切换。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
word-break:break-all'><span lang=EN-US>6.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>&nbsp;</span></b></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.6-2025/04/25</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>RTC</span><span
style='font-family:宋体'>计数值读取流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>Flash</span><span
style='font-family:宋体'>驱动,优化部分流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>gpio_bits_toggle</span><span
style='font-family:宋体'>函数。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.5-2024/12/13</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>CAN</span><span
style='font-family:宋体'>驱动。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>Flash</span><span
style='font-family:宋体'>驱动。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.4-2024/08/08</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>i2c_flag_clear</span><span
style='font-family:宋体'></span><span lang=EN-US>i2c_init</span><span
style='font-family:宋体'>函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.3-2024/01/05</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>完善部分驱动流程在</span><span lang=EN-US>IAR7.4</span><span
style='font-family:宋体'>下的编译警告。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分函数注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.2-2023/10/26</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'></span><span lang=EN-US>IP</span><span
style='font-family:宋体'>驱动新增</span><span lang=EN-US>interrupt_flag_get</span><span
style='font-family:宋体'>函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>优化系统时钟切换流程。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.1-2023/08/04</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>CRC</span><span style='font-family:宋体'>驱动新增多项式及多项式宽度可修改的支持。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US>FLASH</span><span style='font-family:宋体'>中新增</span><span
lang=EN-US>flash_spim_dummy_read</span><span style='font-family:宋体'></span><span
lang=EN-US>flash_spim_mass_program</span><span style='font-family:宋体'>函数。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新了</span><span lang=EN-US>adc_ordinary_channel_set</span><span
style='font-family:宋体'></span><span lang=EN-US>adc_preempt_channel_set</span><span
style='font-family:宋体'>函数流程。</span></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.0-2022/11/18</span></b></p>
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体'>更新当</span><span lang=EN-US>HICK</span><span
style='font-family:宋体'>作为</span><span lang=EN-US>PLL</span><span
style='font-family:宋体'>时钟源时</span><span lang=EN-US>CRM_HICK48_NODIV</span><span
style='font-family:宋体'>作为默认设置。</span></p>
</div>
</body>
</html>

View File

@@ -3,7 +3,8 @@
* @file at32f413_acc.h * @file at32f413_acc.h
* @brief at32f413 acc header file * @brief at32f413 acc header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_adc.h * @file at32f413_adc.h
* @brief at32f413 adc header file * @brief at32f413 adc header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_bpr.h * @file at32f413_bpr.h
* @brief at32f413 bpr header file * @brief at32f413 bpr header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_can.h * @file at32f413_can.h
* @brief at32f413 can header file * @brief at32f413 can header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_crc.h * @file at32f413_crc.h
* @brief at32f413 crc header file * @brief at32f413 crc header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_crm.h * @file at32f413_crm.h
* @brief at32f413 crm header file * @brief at32f413 crm header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_debug.h * @file at32f413_debug.h
* @brief at32f413 debug header file * @brief at32f413 debug header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_def.h * @file at32f413_def.h
* @brief at32f413 macros header file * @brief at32f413 macros header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_dma.h * @file at32f413_dma.h
* @brief at32f413 dma header file * @brief at32f413 dma header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_exint.h * @file at32f413_exint.h
* @brief at32f413 exint header file * @brief at32f413 exint header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_flash.h * @file at32f413_flash.h
* @brief at32f413 flash header file * @brief at32f413 flash header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_gpio.h * @file at32f413_gpio.h
* @brief at32f413 gpio header file * @brief at32f413 gpio header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -151,9 +152,9 @@ extern "C" {
#define I2C1_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 4, 4, 0x01) /*!< i2c1_scl(pb8), i2c1_sda(pb9) */ #define I2C1_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 4, 4, 0x01) /*!< i2c1_scl(pb8), i2c1_sda(pb9) */
#define I2C1_GMUX_0011 IOMUX_MAKE_VALUE(0x28, 4, 4, 0x03) /*!< i2c1_scl(pf6), i2c1_sda(pf7) */ #define I2C1_GMUX_0011 IOMUX_MAKE_VALUE(0x28, 4, 4, 0x03) /*!< i2c1_scl(pf6), i2c1_sda(pf7) */
#define I2C2_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 8, 4, 0x01) /*!< i2c2_scl(pf6), i2c2_sda(pf7) */ #define I2C2_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 8, 4, 0x01) /*!< i2c2_scl(pa8), i2c2_sda(pc9), i2c2_smba(pa9) */
#define I2C2_GMUX_0010 IOMUX_MAKE_VALUE(0x28, 8, 4, 0x01) /*!< i2c2_scl(pa8), i2c2_sda(pc9) */ #define I2C2_GMUX_0010 IOMUX_MAKE_VALUE(0x28, 8, 4, 0x02) /*!< i2c2_scl(pa8), i2c2_sda(pb4), i2c2_smba(pa9) */
#define I2C2_GMUX_0011 IOMUX_MAKE_VALUE(0x28, 8, 4, 0x01) /*!< i2c2_scl(pa8), i2c2_sda(pb4) */ #define I2C2_GMUX_0011 IOMUX_MAKE_VALUE(0x28, 8, 4, 0x03) /*!< i2c2_scl(pf6), i2c2_sda(pf7), i2c2_smba(pa9) */
#define SPI1_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 16, 4, 0x01) /*!< spi1_cs/i2s1_ws(pa15), spi1_sck/i2s1_ck(pb3), spi1_miso(pb4), spi1_mosi/i2s1_sd(pb5), i2s1_mck(pb6) */ #define SPI1_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 16, 4, 0x01) /*!< spi1_cs/i2s1_ws(pa15), spi1_sck/i2s1_ck(pb3), spi1_miso(pb4), spi1_mosi/i2s1_sd(pb5), i2s1_mck(pb6) */
#define SPI2_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 20, 4, 0x01) /*!< spi2_cs/i2s2_ws(pa15), spi2_sck/i2s2_ck(pb3), spi2_miso(pb4), spi2_mosi/i2s2_sd(pb5), i2s2_mck(pc7) */ #define SPI2_GMUX_0001 IOMUX_MAKE_VALUE(0x28, 20, 4, 0x01) /*!< spi2_cs/i2s2_ws(pa15), spi2_sck/i2s2_ck(pb3), spi2_miso(pb4), spi2_mosi/i2s2_sd(pb5), i2s2_mck(pc7) */

View File

@@ -3,7 +3,8 @@
* @file at32f413_i2c.h * @file at32f413_i2c.h
* @brief at32f413 i2c header file * @brief at32f413 i2c header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_misc.h * @file at32f413_misc.h
* @brief at32f413 misc header file * @brief at32f413 misc header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_pwc.h * @file at32f413_pwc.h
* @brief at32f413 pwc header file * @brief at32f413 pwc header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_rtc.h * @file at32f413_rtc.h
* @brief at32f413 rtc header file * @brief at32f413 rtc header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_sdio.h * @file at32f413_sdio.h
* @brief at32f413 sdio header file * @brief at32f413 sdio header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_spi.h * @file at32f413_spi.h
* @brief at32f413 spi header file * @brief at32f413 spi header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_tmr.h * @file at32f413_tmr.h
* @brief at32f413 tmr header file * @brief at32f413 tmr header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_usart.h * @file at32f413_usart.h
* @brief at32f413 usart header file * @brief at32f413 usart header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_usb.h * @file at32f413_usb.h
* @brief at32f413 usb header file * @brief at32f413 usb header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_wdt.h * @file at32f413_wdt.h
* @brief at32f413 wdt header file * @brief at32f413 wdt header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_wwdt.h * @file at32f413_wwdt.h
* @brief at32f413 wwdt header file * @brief at32f413 wwdt header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_acc.c * @file at32f413_acc.c
* @brief contains all the functions for the acc firmware library * @brief contains all the functions for the acc firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_adc.c * @file at32f413_adc.c
* @brief contains all the functions for the adc firmware library * @brief contains all the functions for the adc firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_bpr.c * @file at32f413_bpr.c
* @brief contains all the functions for the bpr firmware library * @brief contains all the functions for the bpr firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_can.c * @file at32f413_can.c
* @brief contains all the functions for the can firmware library * @brief contains all the functions for the can firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_crc.c * @file at32f413_crc.c
* @brief contains all the functions for the crc firmware library * @brief contains all the functions for the crc firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_crm.c * @file at32f413_crm.c
* @brief contains all the functions for the crm firmware library * @brief contains all the functions for the crm firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -609,8 +610,31 @@ void crm_pll_config(crm_pll_clock_source_type clock_source, crm_pll_mult_type mu
*/ */
void crm_sysclk_switch(crm_sclk_type value) void crm_sysclk_switch(crm_sclk_type value)
{ {
volatile uint32_t i;
volatile uint8_t pwc_state;
if(value == CRM_SCLK_PLL)
{
pwc_state = CRM->apb1en_bit.pwcen;
if(pwc_state == 0)
crm_periph_clock_enable(CRM_PWC_PERIPH_CLOCK, TRUE);
*(__IO uint32_t *)0x40007020 = 0x0A;
for(i = 0; i < 80; i++)
{
__NOP();
}
}
CRM->cfg_bit.sclksel = value; CRM->cfg_bit.sclksel = value;
DUMMY_NOP(); DUMMY_NOP();
if(value == CRM_SCLK_PLL)
{
*(__IO uint32_t *)0x40007020 = 0x00;
for(i = 0; i < 1500; i++)
{
__NOP();
}
if(pwc_state == 0)
crm_periph_clock_enable(CRM_PWC_PERIPH_CLOCK, FALSE);
}
} }
/** /**

View File

@@ -3,7 +3,8 @@
* @file at32f413_debug.c * @file at32f413_debug.c
* @brief contains all the functions for the debug firmware library * @brief contains all the functions for the debug firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_dma.c * @file at32f413_dma.c
* @brief contains all the functions for the dma firmware library * @brief contains all the functions for the dma firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_exint.c * @file at32f413_exint.c
* @brief contains all the functions for the exint firmware library * @brief contains all the functions for the exint firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_flash.c * @file at32f413_flash.c
* @brief contains all the functions for the flash firmware library * @brief contains all the functions for the flash firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_gpio.c * @file at32f413_gpio.c
* @brief contains all the functions for the gpio firmware library * @brief contains all the functions for the gpio firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -369,7 +370,9 @@ void gpio_bits_reset(gpio_type *gpio_x, uint16_t pins)
*/ */
void gpio_bits_toggle(gpio_type *gpio_x, uint16_t pins) void gpio_bits_toggle(gpio_type *gpio_x, uint16_t pins)
{ {
gpio_x->odt ^= pins; uint32_t odt = gpio_x->odt;
gpio_x->scr = ((odt & pins) << 16) | (~odt & pins);
} }
/** /**

View File

@@ -3,7 +3,8 @@
* @file at32f413_i2c.c * @file at32f413_i2c.c
* @brief contains all the functions for the i2c firmware library * @brief contains all the functions for the i2c firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_misc.c * @file at32f413_misc.c
* @brief contains all the functions for the misc firmware library * @brief contains all the functions for the misc firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_pwc.c * @file at32f413_pwc.c
* @brief contains all the functions for the pwc firmware library * @brief contains all the functions for the pwc firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_rtc.c * @file at32f413_rtc.c
* @brief contains all the functions for the rtc firmware library * @brief contains all the functions for the rtc firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_sdio.c * @file at32f413_sdio.c
* @brief contains all the functions for the sdio firmware library * @brief contains all the functions for the sdio firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_spi.c * @file at32f413_spi.c
* @brief contains all the functions for the spi firmware library * @brief contains all the functions for the spi firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_tmr.c * @file at32f413_tmr.c
* @brief contains all the functions for the tmr firmware library * @brief contains all the functions for the tmr firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -339,21 +340,31 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
/* set channel output mode */ /* set channel output mode */
channel = tmr_channel; channel = tmr_channel;
/* reset output channel(complementary) enable bit */
chx_offset = (tmr_channel * 2);
chcx_offset = ((tmr_channel * 2) + 2);
tmr_x->cctrl &= ~(1<<chcx_offset);
tmr_x->cctrl &= ~(1<<chx_offset);
switch(channel) switch(channel)
{ {
case TMR_SELECT_CHANNEL_1: case TMR_SELECT_CHANNEL_1:
tmr_x->cm1_output_bit.c1c = FALSE;
tmr_x->cm1_output_bit.c1octrl = tmr_output_struct->oc_mode; tmr_x->cm1_output_bit.c1octrl = tmr_output_struct->oc_mode;
break; break;
case TMR_SELECT_CHANNEL_2: case TMR_SELECT_CHANNEL_2:
tmr_x->cm1_output_bit.c2c = FALSE;
tmr_x->cm1_output_bit.c2octrl = tmr_output_struct->oc_mode; tmr_x->cm1_output_bit.c2octrl = tmr_output_struct->oc_mode;
break; break;
case TMR_SELECT_CHANNEL_3: case TMR_SELECT_CHANNEL_3:
tmr_x->cm2_output_bit.c3c = FALSE;
tmr_x->cm2_output_bit.c3octrl = tmr_output_struct->oc_mode; tmr_x->cm2_output_bit.c3octrl = tmr_output_struct->oc_mode;
break; break;
case TMR_SELECT_CHANNEL_4: case TMR_SELECT_CHANNEL_4:
tmr_x->cm2_output_bit.c4c = FALSE;
tmr_x->cm2_output_bit.c4octrl = tmr_output_struct->oc_mode; tmr_x->cm2_output_bit.c4octrl = tmr_output_struct->oc_mode;
break; break;
@@ -378,9 +389,6 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
tmr_x->cctrl &= ~(1<<chx_offset); tmr_x->cctrl &= ~(1<<chx_offset);
tmr_x->cctrl |= channel_index; tmr_x->cctrl |= channel_index;
chx_offset = (tmr_channel * 2);
chcx_offset = ((tmr_channel * 2) + 2);
/* get channel enable bit position in cctrl register */ /* get channel enable bit position in cctrl register */
channel_index = (uint16_t)(tmr_output_struct->oc_output_state << (tmr_channel * 2)); channel_index = (uint16_t)(tmr_output_struct->oc_output_state << (tmr_channel * 2));
@@ -388,11 +396,9 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
channel_c_index = (uint16_t)(tmr_output_struct->occ_output_state << ((tmr_channel * 2) + 2)); channel_c_index = (uint16_t)(tmr_output_struct->occ_output_state << ((tmr_channel * 2) + 2));
/* set output channel complementary enable bit */ /* set output channel complementary enable bit */
tmr_x->cctrl &= ~(1<<chcx_offset);
tmr_x->cctrl |= channel_c_index; tmr_x->cctrl |= channel_c_index;
/* set output channel enable bit */ /* set output channel enable bit */
tmr_x->cctrl &= ~(1<<chx_offset);
tmr_x->cctrl |= channel_index; tmr_x->cctrl |= channel_index;
} }
@@ -992,6 +998,8 @@ void tmr_pwm_input_config(tmr_type *tmr_x, tmr_input_config_type *input_struct,
switch(channel) switch(channel)
{ {
case TMR_SELECT_CHANNEL_1: case TMR_SELECT_CHANNEL_1:
tmr_x->cctrl_bit.c1en = FALSE;
tmr_x->cctrl_bit.c2en = FALSE;
if(input_struct->input_polarity_select == TMR_INPUT_RISING_EDGE) if(input_struct->input_polarity_select == TMR_INPUT_RISING_EDGE)
{ {
/* set channel polarity */ /* set channel polarity */
@@ -1035,6 +1043,8 @@ void tmr_pwm_input_config(tmr_type *tmr_x, tmr_input_config_type *input_struct,
break; break;
case TMR_SELECT_CHANNEL_2: case TMR_SELECT_CHANNEL_2:
tmr_x->cctrl_bit.c1en = FALSE;
tmr_x->cctrl_bit.c2en = FALSE;
if(input_struct->input_polarity_select == TMR_INPUT_RISING_EDGE) if(input_struct->input_polarity_select == TMR_INPUT_RISING_EDGE)
{ {
/* set channel polarity */ /* set channel polarity */
@@ -1640,6 +1650,9 @@ void tmr_encoder_mode_config(tmr_type *tmr_x, tmr_encoder_mode_type encoder_mode
{ {
tmr_x->stctrl_bit.smsel = encoder_mode; tmr_x->stctrl_bit.smsel = encoder_mode;
tmr_x->cctrl_bit.c1en = FALSE;
tmr_x->cctrl_bit.c2en = FALSE;
/* set ic1 polarity */ /* set ic1 polarity */
tmr_x->cctrl_bit.c1p = (ic1_polarity & 0x1); tmr_x->cctrl_bit.c1p = (ic1_polarity & 0x1);
tmr_x->cctrl_bit.c1cp = (ic1_polarity >> 1); tmr_x->cctrl_bit.c1cp = (ic1_polarity >> 1);

View File

@@ -3,7 +3,8 @@
* @file at32f413_usart.c * @file at32f413_usart.c
* @brief contains all the functions for the usart firmware library * @brief contains all the functions for the usart firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -549,7 +550,7 @@ void usart_hardware_flow_control_set(usart_type* usart_x,usart_hardware_flow_con
* USART1, USART2, USART3, UART4 or UART5. * USART1, USART2, USART3, UART4 or UART5.
* @param flag: specifies the flag to check. * @param flag: specifies the flag to check.
* this parameter can be one of the following values: * this parameter can be one of the following values:
* - USART_CTSCF_FLAG: cts change flag (not available for UART4,UART5,USART6,UART7 and UART8) * - USART_CTSCF_FLAG: cts change flag (not available for UART4, UART5)
* - USART_BFF_FLAG: break frame flag * - USART_BFF_FLAG: break frame flag
* - USART_TDBE_FLAG: transmit data buffer empty flag * - USART_TDBE_FLAG: transmit data buffer empty flag
* - USART_TDC_FLAG: transmit data complete flag * - USART_TDC_FLAG: transmit data complete flag
@@ -580,7 +581,7 @@ flag_status usart_flag_get(usart_type* usart_x, uint32_t flag)
* USART1, USART2, USART3, UART4, UART5. * USART1, USART2, USART3, UART4, UART5.
* @param flag: specifies the flag to check. * @param flag: specifies the flag to check.
* this parameter can be one of the following values: * this parameter can be one of the following values:
* - USART_CTSCF_FLAG: cts change flag (not available for UART4,UART5) * - USART_CTSCF_FLAG: cts change flag (not available for UART4, UART5)
* - USART_BFF_FLAG: break frame flag * - USART_BFF_FLAG: break frame flag
* - USART_TDBE_FLAG: transmit data buffer empty flag * - USART_TDBE_FLAG: transmit data buffer empty flag
* - USART_TDC_FLAG: transmit data complete flag * - USART_TDC_FLAG: transmit data complete flag
@@ -666,7 +667,6 @@ flag_status usart_interrupt_flag_get(usart_type* usart_x, uint32_t flag)
* - USART_PERR_FLAG, USART_FERR_FLAG, USART_NERR_FLAG, USART_ROERR_FLAG and USART_IDLEF_FLAG are cleared by software * - USART_PERR_FLAG, USART_FERR_FLAG, USART_NERR_FLAG, USART_ROERR_FLAG and USART_IDLEF_FLAG are cleared by software
* sequence: a read operation to usart sts register (usart_flag_get()) * sequence: a read operation to usart sts register (usart_flag_get())
* followed by a read operation to usart dt register (usart_data_receive()). * followed by a read operation to usart dt register (usart_data_receive()).
* - USART_RDBF_FLAG can be also cleared by a read to the usart dt register(usart_data_receive()).
* - USART_TDC_FLAG can be also cleared by software sequence: a read operation to usart sts register (usart_flag_get()) * - USART_TDC_FLAG can be also cleared by software sequence: a read operation to usart sts register (usart_flag_get())
* followed by a write operation to usart dt register (usart_data_transmit()). * followed by a write operation to usart dt register (usart_data_transmit()).
* - USART_TDBE_FLAG is cleared only by a write to the usart dt register(usart_data_transmit()). * - USART_TDBE_FLAG is cleared only by a write to the usart dt register(usart_data_transmit()).
@@ -674,7 +674,7 @@ flag_status usart_interrupt_flag_get(usart_type* usart_x, uint32_t flag)
*/ */
void usart_flag_clear(usart_type* usart_x, uint32_t flag) void usart_flag_clear(usart_type* usart_x, uint32_t flag)
{ {
if(flag & (USART_PERR_FLAG | USART_FERR_FLAG | USART_NERR_FLAG | USART_ROERR_FLAG | USART_IDLEF_FLAG)) if(flag & (USART_PERR_FLAG | USART_FERR_FLAG | USART_NERR_FLAG | USART_ROERR_FLAG | USART_IDLEF_FLAG | USART_RDBF_FLAG))
{ {
UNUSED(usart_x->sts); UNUSED(usart_x->sts);
UNUSED(usart_x->dt); UNUSED(usart_x->dt);

View File

@@ -3,7 +3,8 @@
* @file at32f413_usb.c * @file at32f413_usb.c
* @brief contains the functions for the usb firmware library * @brief contains the functions for the usb firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -197,10 +198,18 @@ void usb_ept_open(usbd_type *usbx, usb_ept_info *ept_info)
/* set endpoint reception status: disable */ /* set endpoint reception status: disable */
USB_SET_RXSTS(ept_info->eptn, USB_RX_DISABLE); USB_SET_RXSTS(ept_info->eptn, USB_RX_DISABLE);
if(ept_info->trans_type == EPT_ISO_TYPE)
{
/* set endpoint transmision status: disable */
USB_SET_TXSTS(ept_info->eptn, USB_TX_DISABLE);
}
else
{
/* set endpoint transmision status: nak */ /* set endpoint transmision status: nak */
USB_SET_TXSTS(ept_info->eptn, USB_TX_NAK); USB_SET_TXSTS(ept_info->eptn, USB_TX_NAK);
} }
} }
}
else else
{ {
if(ept_info->is_double_buffer == 0) if(ept_info->is_double_buffer == 0)

View File

@@ -3,7 +3,8 @@
* @file at32f413_wdt.c * @file at32f413_wdt.c
* @brief contains all the functions for the wdt firmware library * @brief contains all the functions for the wdt firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file at32f413_wwdt.c * @file at32f413_wwdt.c
* @brief contains all the functions for the wwdt firmware library * @brief contains all the functions for the wwdt firmware library
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file i2c_application.c * @file i2c_application.c
* @brief the driver library of the i2c peripheral * @brief the driver library of the i2c peripheral
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file i2c_application.h * @file i2c_application.h
* @brief i2c application libray header file * @brief i2c application libray header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file audio_class.c * @file audio_class.c
* @brief usb audio class type * @brief usb audio class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -417,6 +418,10 @@ static void audio_req_get_cur(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL)
@@ -424,25 +429,64 @@ static void audio_req_get_cur(void *udev, usb_setup_type *setup)
paudio->g_audio_cur[0] = paudio->spk_mute; paudio->g_audio_cur[0] = paudio->spk_mute;
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wValue) == AUDIO_VOLUME_CONTROL)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume; *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume;
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
}
else else
{
usbd_ctrl_unsupport(pudev);
}
}
else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL)
{ {
paudio->g_audio_cur[0] = paudio->mic_mute; paudio->g_audio_cur[0] = paudio->mic_mute;
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wValue) == AUDIO_VOLUME_CONTROL)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume; *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume;
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
}
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
if(HBYTE(setup->wValue) == AUDIO_SAMPLING_FREQ_CONTROL)
{
if(setup->wIndex == USBD_AUDIO_MIC_IN_EPT)
{
*((uint32_t *)paudio->g_audio_cur) = paudio->mic_freq;
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
}
else if(setup->wIndex == USBD_AUDIO_SPK_OUT_EPT)
{
*((uint32_t *)paudio->g_audio_cur) = paudio->spk_freq;
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
}
else
{
usbd_ctrl_unsupport(pudev);
}
}
else
{
usbd_ctrl_unsupport(pudev);
}
break;
default:
usbd_ctrl_unsupport(pudev);
break;
} }
} }
@@ -471,19 +515,35 @@ static void audio_req_set_cur(void *udev, usb_setup_type *setup)
{ {
paudio->request_no = AUDIO_MUTE_CONTROL; paudio->request_no = AUDIO_MUTE_CONTROL;
} }
else else if(HBYTE(setup->wValue) == AUDIO_VOLUME_CONTROL)
{ {
paudio->request_no = AUDIO_VOLUME_CONTROL; paudio->request_no = AUDIO_VOLUME_CONTROL;
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break; break;
case AUDIO_REQ_CONTROL_ENDPOINT: case AUDIO_REQ_CONTROL_ENDPOINT:
if(HBYTE(setup->wValue) == AUDIO_SAMPLING_FREQ_CONTROL)
{
paudio->enpd = setup->wIndex; paudio->enpd = setup->wIndex;
paudio->request_no = AUDIO_FREQ_SET_CONTROL; paudio->request_no = AUDIO_FREQ_SET_CONTROL;
}
else
{
usbd_ctrl_unsupport(pudev);
}
break; break;
default: default:
usbd_ctrl_unsupport(pudev);
break; break;
} }
} }
else
{
usbd_ctrl_unsupport(pudev);
}
} }
/** /**
@@ -496,16 +556,32 @@ static void audio_req_get_min(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[0]; *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[0];
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[0]; *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[0];
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
usbd_ctrl_unsupport(pudev);
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
} }
/** /**
@@ -518,16 +594,32 @@ static void audio_req_get_max(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[1]; *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[1];
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[1]; *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[1];
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
usbd_ctrl_unsupport(pudev);
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
} }
/** /**
@@ -540,16 +632,31 @@ static void audio_req_get_res(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[2]; *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[2];
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[2]; *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[2];
usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
usbd_ctrl_unsupport(pudev);
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
} }
/** /**
@@ -607,7 +714,10 @@ static void audio_get_interface(void *udev, usb_setup_type *setup)
{ {
usbd_ctrl_send(pudev, (uint8_t *)&paudio->mic_alt_setting, 1); usbd_ctrl_send(pudev, (uint8_t *)&paudio->mic_alt_setting, 1);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
} }

View File

@@ -3,7 +3,8 @@
* @file audio_class.h * @file audio_class.h
* @brief usb audio class file * @brief usb audio class file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -74,6 +75,7 @@ extern "C" {
#define AUDIO_MUTE_CONTROL 0x01 #define AUDIO_MUTE_CONTROL 0x01
#define AUDIO_VOLUME_CONTROL 0x02 #define AUDIO_VOLUME_CONTROL 0x02
#define AUDIO_FREQ_SET_CONTROL 0x03 #define AUDIO_FREQ_SET_CONTROL 0x03
#define AUDIO_SAMPLING_FREQ_CONTROL 0x01
/** /**
* @brief audio descriptor type * @brief audio descriptor type

View File

@@ -3,7 +3,8 @@
* @file audio_conf.h * @file audio_conf.h
* @brief usb audio config * @brief usb audio config
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file audio_desc.c * @file audio_desc.c
* @brief usb audio device descriptor * @brief usb audio device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file audio_desc.h * @file audio_desc.h
* @brief usb audio descriptor header file * @brief usb audio descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file audio_conf.h * @file audio_conf.h
* @brief usb audio config * @brief usb audio config
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file audio_class.c * @file audio_class.c
* @brief usb audio class type * @brief usb audio class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -580,6 +581,10 @@ static void audio_req_get_cur(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL)
@@ -587,25 +592,64 @@ static void audio_req_get_cur(void *udev, usb_setup_type *setup)
paudio_hid->g_audio_cur[0] = paudio_hid->spk_mute; paudio_hid->g_audio_cur[0] = paudio_hid->spk_mute;
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wValue) == AUDIO_VOLUME_CONTROL)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume;
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
}
else else
{
usbd_ctrl_unsupport(pudev);
}
}
else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL)
{ {
paudio_hid->g_audio_cur[0] = paudio_hid->mic_mute; paudio_hid->g_audio_cur[0] = paudio_hid->mic_mute;
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wValue) == AUDIO_VOLUME_CONTROL)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume;
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
}
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
if(HBYTE(setup->wValue) == AUDIO_SAMPLING_FREQ_CONTROL)
{
if(setup->wIndex == USBD_AUHID_AUDIO_MIC_IN_EPT)
{
*((uint32_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_freq;
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
}
else if(setup->wIndex == USBD_AUHID_AUDIO_SPK_OUT_EPT)
{
*((uint32_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_freq;
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
}
else
{
usbd_ctrl_unsupport(pudev);
}
}
else
{
usbd_ctrl_unsupport(pudev);
}
break;
default:
usbd_ctrl_unsupport(pudev);
break;
} }
} }
@@ -619,6 +663,7 @@ static void audio_req_set_cur(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata;
if(setup->wLength > 0) if(setup->wLength > 0)
{ {
usbd_ctrl_recv(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_recv(pudev, paudio_hid->g_audio_cur, setup->wLength);
@@ -634,19 +679,35 @@ static void audio_req_set_cur(void *udev, usb_setup_type *setup)
{ {
paudio_hid->request_no = AUDIO_MUTE_CONTROL; paudio_hid->request_no = AUDIO_MUTE_CONTROL;
} }
else else if(HBYTE(setup->wValue) == AUDIO_VOLUME_CONTROL)
{ {
paudio_hid->request_no = AUDIO_VOLUME_CONTROL; paudio_hid->request_no = AUDIO_VOLUME_CONTROL;
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break; break;
case AUDIO_REQ_CONTROL_ENDPOINT: case AUDIO_REQ_CONTROL_ENDPOINT:
if(HBYTE(setup->wValue) == AUDIO_SAMPLING_FREQ_CONTROL)
{
paudio_hid->enpd = setup->wIndex; paudio_hid->enpd = setup->wIndex;
paudio_hid->request_no = AUDIO_FREQ_SET_CONTROL; paudio_hid->request_no = AUDIO_FREQ_SET_CONTROL;
}
else
{
usbd_ctrl_unsupport(pudev);
}
break; break;
default: default:
usbd_ctrl_unsupport(pudev);
break; break;
} }
} }
else
{
usbd_ctrl_unsupport(pudev);
}
} }
/** /**
@@ -659,16 +720,32 @@ static void audio_req_get_min(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[0]; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[0];
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[0]; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[0];
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
usbd_ctrl_unsupport(pudev);
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
} }
/** /**
@@ -681,16 +758,32 @@ static void audio_req_get_max(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[1]; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[1];
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[1]; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[1];
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
usbd_ctrl_unsupport(pudev);
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
} }
/** /**
@@ -703,16 +796,32 @@ static void audio_req_get_res(void *udev, usb_setup_type *setup)
{ {
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata;
switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK)
{
case AUDIO_REQ_CONTROL_INTERFACE:
if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[2]; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[2];
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else else if(HBYTE(setup->wIndex) == AUDIO_MIC_FEATURE_UNIT_ID)
{ {
*((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[2]; *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[2];
usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
break;
case AUDIO_REQ_CONTROL_ENDPOINT:
usbd_ctrl_unsupport(pudev);
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
} }
/** /**
@@ -770,7 +879,10 @@ static void audio_get_interface(void *udev, usb_setup_type *setup)
{ {
usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->mic_alt_setting, 1); usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->mic_alt_setting, 1);
} }
else
{
usbd_ctrl_unsupport(pudev);
}
} }
/** /**

View File

@@ -3,7 +3,8 @@
* @file audio_class.h * @file audio_class.h
* @brief usb audio class file * @brief usb audio class file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -86,6 +87,7 @@ extern "C" {
#define AUDIO_MUTE_CONTROL 0x01 #define AUDIO_MUTE_CONTROL 0x01
#define AUDIO_VOLUME_CONTROL 0x02 #define AUDIO_VOLUME_CONTROL 0x02
#define AUDIO_FREQ_SET_CONTROL 0x03 #define AUDIO_FREQ_SET_CONTROL 0x03
#define AUDIO_SAMPLING_FREQ_CONTROL 0x01
/** /**
* @brief audio descriptor type * @brief audio descriptor type

View File

@@ -3,7 +3,8 @@
* @file audio_desc.c * @file audio_desc.c
* @brief usb audio device descriptor * @brief usb audio device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file audio_desc.h * @file audio_desc.h
* @brief usb audio descriptor header file * @brief usb audio descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_class.c * @file cdc_class.c
* @brief usb cdc class type * @brief usb cdc class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_class.h * @file cdc_class.h
* @brief usb cdc class file * @brief usb cdc class file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_desc.c * @file cdc_desc.c
* @brief usb cdc device descriptor * @brief usb cdc device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_desc.h * @file cdc_desc.h
* @brief usb cdc descriptor header file * @brief usb cdc descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_keyboard_class.c * @file cdc_keyboard_class.c
* @brief usb cdc and keyboard class type * @brief usb cdc and keyboard class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_keyboard_class.h * @file cdc_keyboard_class.h
* @brief usb cdc and keyboard class file * @brief usb cdc and keyboard class file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_keyboard_desc.c * @file cdc_keyboard_desc.c
* @brief usb cdc and keyboard device descriptor * @brief usb cdc and keyboard device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_keyboard_desc.h * @file cdc_keyboard_desc.h
* @brief usb cdc and keyboard descriptor header file * @brief usb cdc and keyboard descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_msc_class.c * @file cdc_msc_class.c
* @brief usb cdc class type * @brief usb cdc class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_msc_class.h * @file cdc_msc_class.h
* @brief usb cdc class file * @brief usb cdc class file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_msc_desc.c * @file cdc_msc_desc.c
* @brief usb cdc device descriptor * @brief usb cdc device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file cdc_msc_desc.h * @file cdc_msc_desc.h
* @brief usb cdc descriptor header file * @brief usb cdc descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file msc_bot_scsi.c * @file msc_bot_scsi.c
* @brief usb mass storage bulk-only transport and scsi command * @brief usb mass storage bulk-only transport and scsi command
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file custom_hid_class.c * @file custom_hid_class.c
* @brief usb custom hid class type * @brief usb custom hid class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -71,7 +72,7 @@ usbd_class_handler custom_hid_class_handler =
* @param udev: to the structure of usbd_core_type * @param udev: to the structure of usbd_core_type
* @retval status of usb_sts_type * @retval status of usb_sts_type
*/ */
usb_sts_type class_init_handler(void *udev) static usb_sts_type class_init_handler(void *udev)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_OK;
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
@@ -91,6 +92,8 @@ usb_sts_type class_init_handler(void *udev)
/* set out endpoint to receive status */ /* set out endpoint to receive status */
usbd_ept_recv(pudev, USBD_CUSTOM_HID_OUT_EPT, pcshid->g_rxhid_buff, USBD_CUSTOM_OUT_MAXPACKET_SIZE); usbd_ept_recv(pudev, USBD_CUSTOM_HID_OUT_EPT, pcshid->g_rxhid_buff, USBD_CUSTOM_OUT_MAXPACKET_SIZE);
pcshid->send_state = 0;
return status; return status;
} }
@@ -246,7 +249,10 @@ static usb_sts_type class_ept0_rx_handler(void *udev)
static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) static usb_sts_type class_in_handler(void *udev, uint8_t ept_num)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_OK;
usbd_core_type *pudev = (usbd_core_type *)udev;
custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata;
pcshid->send_state = 0;
/* ...user code... /* ...user code...
trans next packet data trans next packet data
*/ */
@@ -332,12 +338,16 @@ static usb_sts_type class_event_handler(void *udev, usbd_event_type event)
*/ */
usb_sts_type custom_hid_class_send_report(void *udev, uint8_t *report, uint16_t len) usb_sts_type custom_hid_class_send_report(void *udev, uint8_t *report, uint16_t len)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_FAIL;
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata;
if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED && pcshid->send_state == 0)
{
pcshid->send_state = 1;
usbd_ept_send(pudev, USBD_CUSTOM_HID_IN_EPT, report, len); usbd_ept_send(pudev, USBD_CUSTOM_HID_IN_EPT, report, len);
status = USB_OK;
}
return status; return status;
} }
@@ -391,7 +401,7 @@ static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len)
{ {
pcshid->g_txhid_buff[i_index] = report[i_index]; pcshid->g_txhid_buff[i_index] = report[i_index];
} }
usbd_ept_send(pudev, USBD_CUSTOM_HID_IN_EPT, pcshid->g_txhid_buff, len); custom_hid_class_send_report(pudev, pcshid->g_txhid_buff, len);
break; break;
default: default:
break; break;

View File

@@ -3,7 +3,8 @@
* @file custom_hid_class.h * @file custom_hid_class.h
* @brief usb custom hid header file * @brief usb custom hid header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -77,6 +78,7 @@ typedef struct
uint8_t hid_set_report[64]; uint8_t hid_set_report[64];
uint8_t hid_get_report[64]; uint8_t hid_get_report[64];
uint8_t hid_state; uint8_t hid_state;
uint8_t send_state;
}custom_hid_type; }custom_hid_type;
/** /**

View File

@@ -3,7 +3,8 @@
* @file custom_hid_desc.c * @file custom_hid_desc.c
* @brief usb hid device descriptor * @brief usb hid device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file custom_hid_desc.h * @file custom_hid_desc.h
* @brief usb custom hid descriptor header file * @brief usb custom hid descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file hid_iap_class.c * @file hid_iap_class.c
* @brief usb hid iap class type * @brief usb hid iap class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file hid_iap_class.h * @file hid_iap_class.h
* @brief usb hid iap header file * @brief usb hid iap header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file hid_iap_desc.c * @file hid_iap_desc.c
* @brief usb hid device descriptor * @brief usb hid device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file hid_iap_desc.h * @file hid_iap_desc.h
* @brief usb hid descriptor header file * @brief usb hid descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file keyboard_class.c * @file keyboard_class.c
* @brief usb hid keyboard class type * @brief usb hid keyboard class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -217,6 +218,7 @@ static usb_sts_type class_init_handler(void *udev)
usbd_ept_open(pudev, USBD_KEYBOARD_IN_EPT, EPT_INT_TYPE, USBD_KEYBOARD_IN_MAXPACKET_SIZE); usbd_ept_open(pudev, USBD_KEYBOARD_IN_EPT, EPT_INT_TYPE, USBD_KEYBOARD_IN_MAXPACKET_SIZE);
pkeyboard->g_u8tx_completed = 1; pkeyboard->g_u8tx_completed = 1;
pkeyboard->send_state = 0;
return status; return status;
} }
@@ -373,6 +375,7 @@ static usb_sts_type class_in_handler(void *udev, uint8_t ept_num)
trans next packet data trans next packet data
*/ */
pkeyboard->g_u8tx_completed = 1; pkeyboard->g_u8tx_completed = 1;
pkeyboard->send_state = 0;
return status; return status;
} }
@@ -446,11 +449,16 @@ static usb_sts_type class_event_handler(void *udev, usbd_event_type event)
*/ */
usb_sts_type usb_keyboard_class_send_report(void *udev, uint8_t *report, uint16_t len) usb_sts_type usb_keyboard_class_send_report(void *udev, uint8_t *report, uint16_t len)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_FAIL;
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata;
if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED && pkeyboard->send_state == 0)
{
pkeyboard->send_state = 1;
usbd_ept_send(pudev, USBD_KEYBOARD_IN_EPT, report, len); usbd_ept_send(pudev, USBD_KEYBOARD_IN_EPT, report, len);
status = USB_OK;
}
return status; return status;
} }

View File

@@ -3,7 +3,8 @@
* @file keyboard_class.h * @file keyboard_class.h
* @brief usb hid keyboard header file * @brief usb hid keyboard header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -71,6 +72,7 @@ typedef struct
__IO uint8_t hid_suspend_flag; __IO uint8_t hid_suspend_flag;
__IO uint8_t g_u8tx_completed; __IO uint8_t g_u8tx_completed;
uint8_t send_state;
uint8_t hid_state; uint8_t hid_state;
uint8_t temp; uint8_t temp;

View File

@@ -3,7 +3,8 @@
* @file keyboard_desc.c * @file keyboard_desc.c
* @brief usb hid keyboard device descriptor * @brief usb hid keyboard device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file keyboard_desc.h * @file keyboard_desc.h
* @brief usb keyboard descriptor header file * @brief usb keyboard descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file mouse_class.c * @file mouse_class.c
* @brief usb hid mouse class type * @brief usb hid mouse class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -74,6 +75,7 @@ static usb_sts_type class_init_handler(void *udev)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_OK;
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata;
#ifndef USB_EPT_AUTO_MALLOC_BUFFER #ifndef USB_EPT_AUTO_MALLOC_BUFFER
/* use user define buffer address */ /* use user define buffer address */
@@ -83,6 +85,8 @@ static usb_sts_type class_init_handler(void *udev)
/* open hid in endpoint */ /* open hid in endpoint */
usbd_ept_open(pudev, USBD_MOUSE_IN_EPT, EPT_INT_TYPE, USBD_MOUSE_IN_MAXPACKET_SIZE); usbd_ept_open(pudev, USBD_MOUSE_IN_EPT, EPT_INT_TYPE, USBD_MOUSE_IN_MAXPACKET_SIZE);
pmouse->send_state = 0;
return status; return status;
} }
@@ -231,11 +235,13 @@ static usb_sts_type class_ept0_rx_handler(void *udev)
static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) static usb_sts_type class_in_handler(void *udev, uint8_t ept_num)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_OK;
usbd_core_type *pudev = (usbd_core_type *)udev;
mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata;
/* ...user code... /* ...user code...
trans next packet data trans next packet data
*/ */
pmouse->send_state = 0;
return status; return status;
} }
@@ -308,11 +314,16 @@ static usb_sts_type class_event_handler(void *udev, usbd_event_type event)
*/ */
usb_sts_type usb_mouse_class_send_report(void *udev, uint8_t *report, uint16_t len) usb_sts_type usb_mouse_class_send_report(void *udev, uint8_t *report, uint16_t len)
{ {
usb_sts_type status = USB_OK; usb_sts_type status = USB_FAIL;
usbd_core_type *pudev = (usbd_core_type *)udev; usbd_core_type *pudev = (usbd_core_type *)udev;
mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata;
if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED && pmouse->send_state == 0)
{
pmouse->send_state = 1;
usbd_ept_send(pudev, USBD_MOUSE_IN_EPT, report, len); usbd_ept_send(pudev, USBD_MOUSE_IN_EPT, report, len);
status = USB_OK;
}
return status; return status;
} }

View File

@@ -3,7 +3,8 @@
* @file mouse_class.h * @file mouse_class.h
* @brief usb hid mouse header file * @brief usb hid mouse header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.
@@ -87,6 +88,7 @@ typedef struct
uint8_t mouse_buffer[4]; uint8_t mouse_buffer[4];
uint8_t hid_state; uint8_t hid_state;
__IO uint8_t hid_suspend_flag; __IO uint8_t hid_suspend_flag;
uint8_t send_state;
}mouse_type; }mouse_type;
/** /**

View File

@@ -3,7 +3,8 @@
* @file mouse_desc.c * @file mouse_desc.c
* @brief usb hid mouse device descriptor * @brief usb hid mouse device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file mouse_desc.h * @file mouse_desc.h
* @brief usb mouse descriptor header file * @brief usb mouse descriptor header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file msc_bot_scsi.c * @file msc_bot_scsi.c
* @brief usb mass storage bulk-only transport and scsi command * @brief usb mass storage bulk-only transport and scsi command
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file msc_bot_scsi.h * @file msc_bot_scsi.h
* @brief usb mass storage bulk-only transport and scsi command header file * @brief usb mass storage bulk-only transport and scsi command header file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file msc_class.c * @file msc_class.c
* @brief usb msc class type * @brief usb msc class type
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file msc_class.h * @file msc_class.h
* @brief usb msc class file * @brief usb msc class file
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

View File

@@ -3,7 +3,8 @@
* @file msc_desc.c * @file msc_desc.c
* @brief usb msc device descriptor * @brief usb msc device descriptor
************************************************************************** **************************************************************************
* Copyright notice & Disclaimer *
* Copyright (c) 2025, Artery Technology, All rights reserved.
* *
* The software Board Support Package (BSP) that is made available to * The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery. * download from Artery official website is the copyrighted work of Artery.

Some files were not shown because too many files have changed in this diff Show More