77 lines
14 KiB
XML
77 lines
14 KiB
XML
<?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___digit_8h_source" xml:lang="zh">
|
|
<title>bsp_Digit.h</title>
|
|
<indexterm><primary>D:/gitt/MicrochipFor32/bsp_Device/bsp_Digit.h</primary></indexterm>
|
|
浏览该文件的文档.<programlisting linenumbering="unnumbered"><anchor xml:id="_bsp___digit_8h_source_1l00001"/>00001 <emphasis role="comment">/*----------------------------------------------------------------------------------------------------</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00002"/>00002 <emphasis role="comment"> #</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00003"/>00003 <emphasis role="comment"> #  Copyright (c) 2022 Yuankang Liang(XerolySkinner)</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00004"/>00004 <emphasis role="comment"> #</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00005"/>00005 <emphasis role="comment"> #  本软件按原样提供,无任何明示或暗示</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00006"/>00006 <emphasis role="comment"> #  在任何情况下,作者都不承担任何损害赔偿责任</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00007"/>00007 <emphasis role="comment"> #</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00008"/>00008 <emphasis role="comment"> #  使用的许可声明:</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00009"/>00009 <emphasis role="comment"> #  1.  不得歪曲本软件的来源,你不能声称你编写了原始软件.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00010"/>00010 <emphasis role="comment"> #  2.  免费授予以任何目的,前提是版权声明出现在所有副本中.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00011"/>00011 <emphasis role="comment"> #      并且版权声明和许可声明同时出现.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00012"/>00012 <emphasis role="comment"> #  3.  你有使用,复制,修改,分发,和销售本软件的许可.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00013"/>00013 <emphasis role="comment"> #  4.  如果你在产品中使用,产品文档中的声明是赞赏的但不是必须的.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00014"/>00014 <emphasis role="comment"> #  5.  本通知不得从任何来源删除或更改.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00015"/>00015 <emphasis role="comment"> #</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00016"/>00016 <emphasis role="comment"> #  Yuankang Liang(XerolySkinner)</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00017"/>00017 <emphasis role="comment"> #      E-mail:zabbcccbbaz@163.com</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00018"/>00018 <emphasis role="comment"> #      QQ:2715099320</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00019"/>00019 <emphasis role="comment"> #      Mobile Phone:13005636215</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00020"/>00020 <emphasis role="comment"> #</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00021"/>00021 <emphasis role="comment"> #  All rights reserved.</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00022"/>00022 <emphasis role="comment"> */</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00023"/>00023
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00034"/>00034 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00035"/>00035 <emphasis role="comment">//  头文件</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00036"/>00036 <emphasis role="preprocessor">#pragma once</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00037"/>00037 <emphasis role="preprocessor">#ifdef __cplusplus</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00038"/>00038 <emphasis role="preprocessor">#include "<link linkend="_varint_8h">varint.h</link>"</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00039"/>00039 <emphasis role="preprocessor">#include "gpio.h"</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00041"/>00041 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00042"/>00042 <emphasis role="comment">//  枚举</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00046"/>00046 <emphasis role="comment"></emphasis><emphasis role="keyword">enum</emphasis> {
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00047"/><link linkend="_bsp___digit_8h_1a06fc87d81c62e9abb8790b6e5713c55ba4c86d712c35fc61b110859b9f8c622f5">00047</link>     <link linkend="_bsp___digit_8h_1a06fc87d81c62e9abb8790b6e5713c55ba4c86d712c35fc61b110859b9f8c622f5">anode</link>,                          
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00048"/>00048     <link linkend="_bsp___digit_8h_1a06fc87d81c62e9abb8790b6e5713c55ba5802523c5519b4792ac2433404f6de26">cathode</link>                         
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00049"/><link linkend="_bsp___digit_8h_1a06fc87d81c62e9abb8790b6e5713c55ba5802523c5519b4792ac2433404f6de26">00049</link>     };
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00051"/>00051 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00052"/>00052 <emphasis role="comment">//  段码表</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00056"/><link linkend="_bsp___digit_8h_1a9c1f3d665aa750ca904e9e547a2c98f8">00056</link> <emphasis role="comment"></emphasis><emphasis role="keyword">static</emphasis> <emphasis role="keyword">const</emphasis> <link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link> <link linkend="_bsp___digit_8h_1a9c1f3d665aa750ca904e9e547a2c98f8">digit_ca</link>[] = {      
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00057"/>00057     0xc0,0xf9,0xa4,0xb0,
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00058"/>00058     0x99,0x92,0x82,0xf8,
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00059"/>00059     0x80,0x90,0x88,0x83,
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00060"/>00060     0xc6,0xa1,0x86,0x8e};
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00062"/>00062 <emphasis role="comment">//----------------------------------------------------------------------------------------------------</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00063"/>00063 <emphasis role="comment">//  类目</emphasis>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00067"/><link linkend="_classbsp___digit">00067</link> <emphasis role="comment"></emphasis><emphasis role="keyword">class </emphasis><link linkend="_classbsp___digit">bsp_Digit</link>{
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00068"/>00068 <emphasis role="keyword">public</emphasis>:
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00069"/>00069     <link linkend="_classbsp___digit">bsp_Digit</link>(
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00070"/>00070         GPIO_TypeDef* <link linkend="_classbsp___digit_1a74829f4e2ae8a7a041b8bd249d93242f">GPIOx_MOSIO</link>, uint16_t <link linkend="_classbsp___digit_1ac3fb901cccd34c97bcdff090060d0eb9">GPIO_Pin_MOSIO</link>,
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00071"/>00071         GPIO_TypeDef* <link linkend="_classbsp___digit_1a128d72d3f9705a6635fd5ba3a8f11219">GPIOx_S_CLK</link>, uint16_t <link linkend="_classbsp___digit_1af642ff2d193c72cd6e44da895997936e">GPIO_Pin_S_CLK</link>,
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00072"/>00072         GPIO_TypeDef* <link linkend="_classbsp___digit_1a35b4df52093b6f34e2bd0e99a6fac473">GPIOx_R_CLK</link>, uint16_t <link linkend="_classbsp___digit_1a3914358421f51f43a9098ddd37d83a59">GPIO_Pin_R_CLK</link>,
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00073"/>00073         <emphasis role="keywordtype">bool</emphasis> <link linkend="_classbsp___digit_1af87156a3cca1c199e469b0ce7b8ce7f9">Polarity</link>
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00074"/>00074     );
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00075"/>00075 <emphasis role="keyword">public</emphasis>:
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00076"/>00076     <emphasis role="keywordtype">void</emphasis> <link linkend="_classbsp___digit_1a9f91f206f32eef69e91c5975ad12db6b">DatCom</link>(<link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link> SendVal,<link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link> cha);     
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00077"/>00077     <emphasis role="keywordtype">void</emphasis> <link linkend="_classbsp___digit_1a37e6984660f0b60322d420c766107b40">num</link>(<link linkend="_varint_8h_1ace9d960e74685e2cd84b36132dbbf8aa">u16</link> <link linkend="_classbsp___digit_1a37e6984660f0b60322d420c766107b40">num</link>);                  
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00078"/><link linkend="_classbsp___digit_1a26571e190c198e068d6aa92af584352d">00078</link>     <link linkend="_varint_8h_1ace9d960e74685e2cd84b36132dbbf8aa">u16</link> <link linkend="_classbsp___digit_1a26571e190c198e068d6aa92af584352d">division</link>;                       
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00079"/>00079     <emphasis role="keywordtype">void</emphasis> <link linkend="_classbsp___digit_1a1b609eee1a20e598fdb7090b8a0b0524">dop</link>(<link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link> cha);                   
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00080"/>00080     <emphasis role="keywordtype">void</emphasis> <link linkend="_classbsp___digit_1a7bde5d953a88e04dae985b3ce82a386e">numdop</link>(<link linkend="_varint_8h_1ace9d960e74685e2cd84b36132dbbf8aa">u16</link> <link linkend="_classbsp___digit_1a37e6984660f0b60322d420c766107b40">num</link>,<link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link> cha);        
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00081"/>00081 <emphasis role="keyword">protected</emphasis>:
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00082"/>00082     <emphasis role="keywordtype">void</emphasis> <link linkend="_classbsp___digit_1a0608eae8fc20fea488b578b4440a5973">dat</link>(<link linkend="_varint_8h_1a92c50087ca0e64fa93fc59402c55f8ca">u8</link> SendVal);
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00083"/>00083     <emphasis role="keywordtype">void</emphasis> <link linkend="_classbsp___digit_1a8362aa8c9725ab2000e4b1f3c816de8b">com</link>(<emphasis role="keywordtype">void</emphasis>);
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00084"/>00084 <emphasis role="keyword">private</emphasis>:
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00085"/><link linkend="_classbsp___digit_1af87156a3cca1c199e469b0ce7b8ce7f9">00085</link>     <emphasis role="keywordtype">bool</emphasis>            <link linkend="_classbsp___digit_1af87156a3cca1c199e469b0ce7b8ce7f9">Polarity</link>;           
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00086"/><link linkend="_classbsp___digit_1a74829f4e2ae8a7a041b8bd249d93242f">00086</link>     GPIO_TypeDef*   <link linkend="_classbsp___digit_1a74829f4e2ae8a7a041b8bd249d93242f">GPIOx_MOSIO</link>;
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00087"/><link linkend="_classbsp___digit_1ac3fb901cccd34c97bcdff090060d0eb9">00087</link>     uint16_t        <link linkend="_classbsp___digit_1ac3fb901cccd34c97bcdff090060d0eb9">GPIO_Pin_MOSIO</link>;
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00088"/><link linkend="_classbsp___digit_1a128d72d3f9705a6635fd5ba3a8f11219">00088</link>     GPIO_TypeDef*   <link linkend="_classbsp___digit_1a128d72d3f9705a6635fd5ba3a8f11219">GPIOx_S_CLK</link>;
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00089"/><link linkend="_classbsp___digit_1af642ff2d193c72cd6e44da895997936e">00089</link>     uint16_t        <link linkend="_classbsp___digit_1af642ff2d193c72cd6e44da895997936e">GPIO_Pin_S_CLK</link>;
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00090"/><link linkend="_classbsp___digit_1a35b4df52093b6f34e2bd0e99a6fac473">00090</link>     GPIO_TypeDef*   <link linkend="_classbsp___digit_1a35b4df52093b6f34e2bd0e99a6fac473">GPIOx_R_CLK</link>;
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00091"/><link linkend="_classbsp___digit_1a3914358421f51f43a9098ddd37d83a59">00091</link>     uint16_t        <link linkend="_classbsp___digit_1a3914358421f51f43a9098ddd37d83a59">GPIO_Pin_R_CLK</link>;
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00092"/>00092     };
|
|
<anchor xml:id="_bsp___digit_8h_source_1l00094"/>00094 <emphasis role="preprocessor">#endif</emphasis>
|
|
</programlisting></section>
|