⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _s_b_c__driver_8h-source.html

📁 基于freescale MC9S12XF512 MCU
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>  <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">  <title></title>  <link href="fs_doxy.css" rel="stylesheet" type="text/css"></head><body onload="OnPageLoaded()"><table border="0" cellpadding="0" cellspacing="0" width="100%">  <tbody>    <tr>      <td><img src="logo_angle2.GIF" alt="Freescale Semiconductor Inc." height="64" width="266"></td>      <td bgcolor="#c2d6eb" nowrap="nowrap"> <br>      </td>      <td bgcolor="#c2d6eb" nowrap="nowrap">&nbsp;</td>      <td bgcolor="#c2d6eb" nowrap="nowrap" width="100%">&nbsp;</td>      <td bgcolor="#c2d6eb" nowrap="nowrap"><img alt="Regional Technical Application Center" src="rtaclogo.PNG" style="width: 117px; height: 64px;"><br>      </td>    </tr>  </tbody></table><p>&nbsp;</p></body></html><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><div class="nav"><a class="el" href="dir_000000.html">D:</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">Profiles</a>&nbsp;/&nbsp;<a class="el" href="dir_000002.html">b05114</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">My Documents</a>&nbsp;/&nbsp;<a class="el" href="dir_000004.html">My Projects</a>&nbsp;/&nbsp;<a class="el" href="dir_000005.html">Veracruz</a>&nbsp;/&nbsp;<a class="el" href="dir_000006.html">SW_release1_0</a>&nbsp;/&nbsp;<a class="el" href="dir_000007.html">EVB9S12XF512E_StandAlone_LS</a>&nbsp;/&nbsp;<a class="el" href="dir_000008.html">Sources</a>&nbsp;/&nbsp;<a class="el" href="dir_000010.html">Drivers</a></div><h1>SBC_driver.h</h1><a href="_s_b_c__driver_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*******************************************************************************/</span>00013 <span class="comment">/*******************************************************************************/</span>00014 <span class="comment">/*                                                                             */</span>00015 <span class="comment">/* All software, source code, included documentation, and any implied know-how */</span>00016 <span class="comment">/* are property of Freescale Semiconductor and therefore considered            */</span> 00017 <span class="comment">/* CONFIDENTIAL INFORMATION.                                                   */</span>00018 <span class="comment">/*                                                                             */</span>00019 <span class="comment">/* This confidential information is disclosed FOR DEMONSTRATION PURPOSES ONLY. */</span>00020 <span class="comment">/*                                                                             */</span>00021 <span class="comment">/* All Confidential Information remains the property of Freescale Semiconductor*/</span>00022 <span class="comment">/* and will not be copied or reproduced without the express written permission */</span>00023 <span class="comment">/* of the Discloser, except for copies that are absolutely necessary in order  */</span>00024 <span class="comment">/* to fulfill the Purpose.                                                     */</span>00025 <span class="comment">/*                                                                             */</span>00026 <span class="comment">/* Services performed by FREESCALE in this matter are performed AS IS and      */</span>00027 <span class="comment">/* without any warranty. CUSTOMER retains the final decision relative to the   */</span>00028 <span class="comment">/* total design and functionality of the end product.                          */</span>00029 <span class="comment">/*                                                                             */</span>00030 <span class="comment">/* FREESCALE neither guarantees nor will be held liable by CUSTOMER for the    */</span>00031 <span class="comment">/* success of this project.                                                    */</span>00032 <span class="comment">/*                                                                             */</span>00033 <span class="comment">/* FREESCALE disclaims all warranties, express, implied or statutory including,*/</span>00034 <span class="comment">/* but not limited to, implied warranty of merchantability or fitness for a    */</span>00035 <span class="comment">/* particular purpose on any hardware, software or advise supplied to the      */</span>00036 <span class="comment">/* project by FREESCALE, and or any product resulting from FREESCALE services. */</span>00037 <span class="comment">/*                                                                             */</span>00038 <span class="comment">/* In no event shall FREESCALE be liable for incidental or consequential       */</span>00039 <span class="comment">/* damages arising out of this agreement. CUSTOMER agrees to hold FREESCALE    */</span>00040 <span class="comment">/* harmless against any and all claims demands or actions by anyone on account */</span>00041 <span class="comment">/* of any damage,or injury, whether commercial, contractual, or tortuous,      */</span>00042 <span class="comment">/* rising directly or indirectly as a result of the advise or assistance       */</span>00043 <span class="comment">/* supplied CUSTOMER in connection with product, services or goods supplied    */</span>00044 <span class="comment">/* under this Agreement.                                                       */</span>00045 <span class="comment">/*                                                                             */</span>00046 <span class="comment">/*******************************************************************************/</span>00047 00048 <span class="preprocessor">#ifndef _SBC_H</span>00049 <span class="preprocessor"></span><span class="preprocessor">#define _SBC_H</span>00050 <span class="preprocessor"></span>00052 <span class="preprocessor">#include "<a class="code" href="typedefs_8h.html">typedefs.h</a>"</span> 00053 00054 <span class="comment">/* Default values for SBC Configuration: */</span>00055 <a name="l00056"></a><a class="code" href="_s_b_c__driver_8h.html#a0">00056</a> <span class="preprocessor">#define SBC_TIM1_INIT   SBC_WDOG_100MS</span>00057 <span class="preprocessor"></span><span class="preprocessor">#define SBC_RCR_INIT    0</span>00058 <span class="preprocessor"></span><span class="preprocessor">#define SBC_CAN_INIT    SBC_SLEWRATE0</span>00059 <span class="preprocessor"></span><span class="preprocessor">#define SBC_IOR_INIT    0</span>00060 <span class="preprocessor"></span><span class="preprocessor">#define SBC_WUR_INIT    SBC_L0L1HIGH|SBC_L2L3BOTH</span>00061 <span class="preprocessor"></span><span class="preprocessor">#define SBC_TIM2_INIT   SBC_CYCLICSENSE_388MS</span>00062 <span class="preprocessor"></span><span class="preprocessor">#define SBC_LPC_INIT    0</span>00063 <span class="preprocessor"></span><span class="preprocessor">#define SBC_INTR_INIT   SBC_CANF|SBC_VDDTEMP|SBC_INTVSUPLOW</span>00064 <span class="preprocessor"></span>00065 <span class="comment">/* Read/ Write bit */</span>00066 <span class="preprocessor">#define SBC_R           0b00000000</span>00067 <span class="preprocessor"></span><span class="preprocessor">#define SBC_W           0b00010000</span>00068 <span class="preprocessor"></span>00069 <span class="comment">/* SBC Register adresses */</span>00070 <span class="preprocessor">#define SBC_MCR         0b00000000</span>00071 <span class="preprocessor"></span><span class="preprocessor">#define SBC_RCR         0b00100000</span>00072 <span class="preprocessor"></span><span class="preprocessor">#define SBC_CAN         0b01000000</span>00073 <span class="preprocessor"></span><span class="preprocessor">#define SBC_IOR         0b01100000</span>00074 <span class="preprocessor"></span><span class="preprocessor">#define SBC_WUR         0b10000000</span>00075 <span class="preprocessor"></span><span class="preprocessor">#define SBC_TIM         0b10100000</span>00076 <span class="preprocessor"></span><span class="preprocessor">#define SBC_LPC         0b11000000</span>00077 <span class="preprocessor"></span><span class="preprocessor">#define SBC_INTR        0b11100000</span>00078 <span class="preprocessor"></span>00079 00080 <span class="comment">/* MCR, Mode Control register */</span>00081         <span class="comment">/* Write */</span>00082 <span class="preprocessor">#define SBC_MCTR2       0b00000100</span>00083 <span class="preprocessor"></span><span class="preprocessor">#define SBC_MCTR1       0b00000010</span>00084 <span class="preprocessor"></span><span class="preprocessor">#define SBC_MCTR0       0b00000001</span>00085 <span class="preprocessor"></span>        <span class="comment">/* Read  */</span>00086 <span class="preprocessor">#define SBC_BATFAIL     0b00001000</span>00087 <span class="preprocessor"></span><span class="preprocessor">#define SBC_VDDPRE      0b00000100</span>00088 <span class="preprocessor"></span><span class="preprocessor">#define SBC_GFAIL       0b00000010</span>00089 <span class="preprocessor"></span><span class="preprocessor">#define SBC_WDRST       0b00000001</span>00090 <span class="preprocessor"></span>        <span class="comment">/* MCR Control Bits */</span>00091 <span class="preprocessor">#define SBC_DEBUGMODE   0x00</span>00092 <span class="preprocessor"></span><span class="preprocessor">#define SBC_NORMAL      SBC_MCTR0</span>00093 <span class="preprocessor"></span><span class="preprocessor">#define SBC_STANDBY     SBC_MCTR1</span>00094 <span class="preprocessor"></span><span class="preprocessor">#define SBC_STOP        SBC_MCTR1|SBC_MCTR0</span>00095 <span class="preprocessor"></span><span class="preprocessor">#define SBC_SLEEP       SBC_MCTR2</span>00096 <span class="preprocessor"></span><span class="preprocessor">#define SBC_DBGNORMAL   SBC_MCTR2|SBC_MCTR0</span>00097 <span class="preprocessor"></span><span class="preprocessor">#define SBC_DBGSTANDBY  SBC_MCTR2|SBC_MCTR1</span>00098 <span class="preprocessor"></span><span class="preprocessor">#define SBC_DBGSTOP     SBC_MCTR2|SBC_MCTR1|SBC_MCTR0</span>00099 <span class="preprocessor"></span>00100 00101   <span class="comment">/* RCR, Reset Control Register */</span>    00102 <span class="preprocessor">#define SBC_WDSTOP      0b00001000</span>00103 <span class="preprocessor"></span><span class="preprocessor">#define SBC_NOSTOP      0b00000100</span>00104 <span class="preprocessor"></span><span class="preprocessor">#define SBC_CANSLEEP    0b00000010</span>00105 <span class="preprocessor"></span><span class="preprocessor">#define SBC_RSTTH       0b00000001</span>00106 <span class="preprocessor"></span>00107 00108 <span class="comment">/* CAN Register */</span>00109 <span class="comment">/* Write */</span>00110 <span class="preprocessor">#define CANCLR          0b00001000</span>00111 <span class="preprocessor"></span><span class="preprocessor">#define SBC_SC1         0b00000100</span>00112 <span class="preprocessor"></span><span class="preprocessor">#define SBC_SC0         0b00000010</span>00113 <span class="preprocessor"></span><span class="preprocessor">#define SBC_MODE        0b00000001</span>00114 <span class="preprocessor"></span>        <span class="comment">/* Read */</span>00115 <span class="preprocessor">#define SBC_CANWU       0b00001000</span>00116 <span class="preprocessor"></span><span class="preprocessor">#define SBC_CAN_F       0b00000100</span>00117 <span class="preprocessor"></span><span class="preprocessor">#define SBC_CAN_UF      0b00000010</span>00118 <span class="preprocessor"></span><span class="preprocessor">#define SBC_THERM_CUR   0b00000001</span>00119 <span class="preprocessor"></span><span class="comment">/* High Speed Can Transceiver Modes */</span>00120 <span class="preprocessor">#define SBC_SLEWRATE0           0x00</span>00121 <span class="preprocessor"></span><span class="preprocessor">#define SBC_SLEWRATE1           SBC_SC0</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -