换血大更新
This commit is contained in:
50
Doc/docbook/bsp___print_art_8cpp_source.xml
Normal file
50
Doc/docbook/bsp___print_art_8cpp_source.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_bsp___print_art_8cpp_source" xml:lang="zh">
|
||||
<title>bsp_PrintArt.cpp</title>
|
||||
<indexterm><primary>D:/gitt/MicrochipFor32/bsp_Device/bsp_PrintArt.cpp</primary></indexterm>
|
||||
浏览该文件的文档.<programlisting linenumbering="unnumbered"><anchor xml:id="_bsp___print_art_8cpp_source_1l00001"/>00001 <emphasis role="comment">/*----------------------------------------------------------------------------------------------------</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00002"/>00002 <emphasis role="comment"> #</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00003"/>00003 <emphasis role="comment"> #  Copyright (c) 2022 Yuankang Liang(XerolySkinner)</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00004"/>00004 <emphasis role="comment"> #</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00005"/>00005 <emphasis role="comment"> #  本软件按原样提供,无任何明示或暗示</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00006"/>00006 <emphasis role="comment"> #  在任何情况下,作者都不承担任何损害赔偿责任</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00007"/>00007 <emphasis role="comment"> #</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00008"/>00008 <emphasis role="comment"> #  使用的许可声明:</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00009"/>00009 <emphasis role="comment"> #  1.  不得歪曲本软件的来源,你不能声称你编写了原始软件.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00010"/>00010 <emphasis role="comment"> #  2.  免费授予以任何目的,前提是版权声明出现在所有副本中.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00011"/>00011 <emphasis role="comment"> #      并且版权声明和许可声明同时出现.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00012"/>00012 <emphasis role="comment"> #  3.  你有使用,复制,修改,分发,和销售本软件的许可.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00013"/>00013 <emphasis role="comment"> #  4.  如果你在产品中使用,产品文档中的声明是赞赏的但不是必须的.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00014"/>00014 <emphasis role="comment"> #  5.  本通知不得从任何来源删除或更改.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00015"/>00015 <emphasis role="comment"> #</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00016"/>00016 <emphasis role="comment"> #  Yuankang Liang(XerolySkinner)</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00017"/>00017 <emphasis role="comment"> #      E-mail:zabbcccbbaz@163.com</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00018"/>00018 <emphasis role="comment"> #      QQ:2715099320</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00019"/>00019 <emphasis role="comment"> #      Mobile Phone:13005636215</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00020"/>00020 <emphasis role="comment"> #</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00021"/>00021 <emphasis role="comment"> #  All rights reserved.</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00022"/>00022 <emphasis role="comment"> */</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00023"/>00023
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00034"/>00034 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00035"/>00035 <emphasis role="comment">//  类声明</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00036"/>00036 <emphasis role="preprocessor">#include "<link linkend="_bsp___print_art_8h">bsp_PrintArt.h</link>"</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00038"/>00038 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00039"/>00039 <emphasis role="comment">//  类函数</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00046"/><link linkend="_classbsp___print_art_1a5b89d4eeaeca9f91f9b554ffeea0d272">00046</link> <emphasis role="comment"></emphasis><emphasis role="keywordtype">int</emphasis> <link linkend="_classbsp___print_art_1a5b89d4eeaeca9f91f9b554ffeea0d272">bsp_PrintArt::print</link>(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">char</emphasis>* format, ...) {
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00047"/>00047     <link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link>* dat = (<link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link>*)malloc(<link linkend="_classbsp___print_art_1a7b7764b6a699a75f10a6caa85330cbe2">Bufflen</link>);                     <emphasis role="comment">//  分配内存</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00048"/>00048     <emphasis role="keywordflow">if</emphasis>(dat==NULL)<emphasis role="keywordflow">return</emphasis> 1;                              <emphasis role="comment">//  判断分配成功与否</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00049"/>00049     <link linkend="_varint_8h_1afaa62991928fb9fb18ff0db62a040aba">u32</link> res;                                            <emphasis role="comment">//  返回状态码</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00050"/>00050     va_list args;                                       <emphasis role="comment">//  不定长变量</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00051"/>00051     va_start(args, format);                             <emphasis role="comment">//  初始化不定长变量</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00052"/>00052     res=vsprintf((<emphasis role="keywordtype">char</emphasis>*)dat,(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">char</emphasis>*)format, args); <emphasis role="comment">//  组合</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00053"/>00053     <link linkend="_classbsp___print_art_1a548aa058fedb64e031d91c48480b527e">Transmit</link>(dat, strlen((<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">char</emphasis>*)dat));            <emphasis role="comment">//  发送</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00054"/>00054     va_end(args);                                       <emphasis role="comment">//  收尸</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00055"/>00055     free(dat);                                          <emphasis role="comment">//  回收内存</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00056"/>00056     <emphasis role="keywordflow">return</emphasis> res;}
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00058"/>00058 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00059"/>00059 <emphasis role="comment">//  构造函数</emphasis>
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00060"/><link linkend="_classbsp___print_art_1a93c7cc212617232dcfd5e57a5d4f3521">00060</link> <link linkend="_classbsp___print_art_1a93c7cc212617232dcfd5e57a5d4f3521">bsp_PrintArt::bsp_PrintArt</link>(<emphasis role="keywordtype">void</emphasis>) {
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00061"/>00061     <link linkend="_classbsp___print_art_1a7b7764b6a699a75f10a6caa85330cbe2">Bufflen</link> = 128;}
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00066"/><link linkend="_classbsp___print_art_1a269df30feafe08cc3803aa9bf88b2a8e">00066</link> <link linkend="_classbsp___print_art_1a93c7cc212617232dcfd5e57a5d4f3521">bsp_PrintArt::bsp_PrintArt</link>(<link linkend="_varint_8h_1afaa62991928fb9fb18ff0db62a040aba">u32</link> len) {
|
||||
<anchor xml:id="_bsp___print_art_8cpp_source_1l00067"/>00067     <link linkend="_classbsp___print_art_1a7b7764b6a699a75f10a6caa85330cbe2">Bufflen</link> = len;}
|
||||
</programlisting></section>
|
||||
Reference in New Issue
Block a user