matlab_stm_emulate/DOCS/html/stm32f4xx__matlab__rcc_8h_source.html

138 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>STM MATLAB Simulator: F:/Work/Projects/MATLAB/matlab_stm_emulate/MCU_STM32F4xx_Matlab/Drivers/STM32F4xx_SIMULINK/stm32f4xx_matlab_rcc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">STM MATLAB Simulator
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_9609623a411adcd586e91350a30aa9d5.html">MCU_STM32F4xx_Matlab</a></li><li class="navelem"><a class="el" href="dir_afe59ba76eea2f90e4e37233dbf4f6f2.html">Drivers</a></li><li class="navelem"><a class="el" href="dir_3a36e4bca13e6b41578f51df425c6641.html">STM32F4xx_SIMULINK</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">stm32f4xx_matlab_rcc.h</div></div>
</div><!--header-->
<div class="contents">
<a href="stm32f4xx__matlab__rcc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef _MATLAB_RCC_H_</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define _MATLAB_RCC_H_</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;<a class="code" href="mcu__wrapper__conf_8h.html">mcu_wrapper_conf.h</a>&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">//#define SYSLCK_Value ((RCC-&gt;PLLCFGR &amp; RCC_PLLCFGR_PLLN) &gt;&gt; RCC_PLLCFGR_PLLN_Pos)</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//#define AHB_Prescaler ((RCC-&gt;PLLCFGR &amp; RCC_PLLCFGR_PLLN) &gt;&gt; RCC_PLLCFGR_PLLN_Pos)</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">//#define AHB_Prescaler ((RCC-&gt;CFGR &amp; RCC_CFGR_HPRE) &gt;&gt; RCC_CFGR_HPRE_Pos)</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga28d73042ad2f34965a12d5dca1c72c7d"> 20</a></span><span class="preprocessor">#define HCLK_Value (double)72000000;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gabce7fd8ef9ea39fb4f77b5a0016338ea"> 21</a></span><span class="preprocessor">#define ABP1_Value (double)72000000;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga516b1b0b440a3d8a0a97f99dcccfd631"> 22</a></span><span class="preprocessor">#define ABP1_TIMS_Value (double)72000000;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga142081f515cc585408786f7745733ef5"> 23</a></span><span class="preprocessor">#define ABP2_Value (double)72000000;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gab8af0c48743a9c568167d7d99c377861"> 24</a></span><span class="preprocessor">#define ABP2_TIMS_Value (double)72000000;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">/* Эти дефайны добавлены в код stm32f4xx_hal_rcc.c, чтобы не попасть в бесконечный цикл */</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">/* Мб перенести в MCU_Periph_Simulation(), но чет не хочется нагружать симуляцию этой херней*/</span></div>
<div class="foldopen" id="foldopen00028" data-start="" data-end="">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gae06dd862c75ec6de931ae3c350d61325"> 28</a></span><span class="preprocessor">#define _RCC_SET_FLAG(__FLAG__) \</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">if(((__FLAG__) &gt;&gt; 5U) == 1U) RCC-&gt;CR |= (1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK)); \</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">else if(((__FLAG__) &gt;&gt; 5U) == 2U) RCC-&gt;BDCR |= (1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK)); \</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">else if(((__FLAG__) &gt;&gt; 5U) == 3U) RCC-&gt;CSR |= (1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK)); \</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">else RCC-&gt;CIR |= (1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK))</span></div>
</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="foldopen" id="foldopen00034" data-start="" data-end="">
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gafedee1520e942548e0b8818122ecef97"> 34</a></span><span class="preprocessor">#define _RCC_CLEAR_FLAG(__FLAG__) \</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">if(((__FLAG__) &gt;&gt; 5U) == 1U) RCC-&gt;CR &amp;= ~(1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK)); \</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">else if(((__FLAG__) &gt;&gt; 5U) == 2U) RCC-&gt;BDCR &amp;= ~(1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK)); \</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">else if(((__FLAG__) &gt;&gt; 5U) == 3U) RCC-&gt;CSR &amp;= ~(1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK)); \</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">else RCC-&gt;CIR &amp;= ~(1U &lt;&lt; ((__FLAG__) &amp; RCC_FLAG_MASK))</span></div>
</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="foldopen" id="foldopen00040" data-start="" data-end="">
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gadf8f9d228ec9091df7d092a298f11b17"> 40</a></span><span class="preprocessor">#define Set_Flag_If_Its_Expected(_flag_, _condition_) \</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">if(_condition_) _RCC_CLEAR_FLAG(_flag_)</span></div>
</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="foldopen" id="foldopen00043" data-start="" data-end="">
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga5dc1d225a53e67cc732ca9069ffb1f0d"> 43</a></span><span class="preprocessor">#define Clear_Flag_If_Its_Expected(_flag_, _condition_) \</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">if(_condition_) _RCC_SET_FLAG(_flag_)</span></div>
</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#endif </span><span class="comment">// _MATLAB_RCC_H_</span></div>
<div class="ttc" id="amcu__wrapper__conf_8h_html"><div class="ttname"><a href="mcu__wrapper__conf_8h.html">mcu_wrapper_conf.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>