Сделана документация на то, что есть сейчас

This commit is contained in:
2024-10-16 16:03:37 +03:00
parent 6a08b0462d
commit 8939ab257f
750 changed files with 10725 additions and 350180 deletions

View File

@@ -5,7 +5,7 @@
<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>
<title>STM MATLAB Simulator: F:/Work/Projects/MATLAB/matlab_stm_emulate/MCU_STM32F4xx_Matlab/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>
@@ -14,6 +14,7 @@
<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>
<script type="text/javascript" src="darkmode_toggle.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
@@ -76,58 +77,80 @@ $(function() { codefold.init(0); });
<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>
<li class="navelem"><a class="el" href="dir_9609623a411adcd586e91350a30aa9d5.html">MCU_STM32F4xx_Matlab</a></li><li class="navelem"><a class="el" href="dir_df8c7f866fb3beabf246989867a8aa90.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>
<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="comment">/**</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">**************************************************************************</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">* @file stm32f4xx_matlab_rcc.h</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">* @brief Заголовочный файл для симулятора клока.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">**************************************************************************</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">@details</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">Данный файл содержит объявления всякого для симуляции клока STM32F407xx.</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">**************************************************************************/</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#ifndef _MATLAB_RCC_H_</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#define _MATLAB_RCC_H_</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</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="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"></span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">/**</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> * @addtogroup RCC_SIMULATOR RCC Simulator</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * @ingroup MAIN_SIMULATOR</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * @brief Симулятор для RCC и часов таймера</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> * @details Определ¤ет параметры тактирования МК.</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment"> Содержит дефайны дл¤ скипа бесконечных циклов ожидающих выставление флагов</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment"> * @{</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment"> */</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</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="l00025" name="l00025"></a><span class="lineno"> 25</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="l00026" name="l00026"></a><span class="lineno"> 26</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="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<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#ga28d73042ad2f34965a12d5dca1c72c7d"> 28</a></span><span class="preprocessor">#define HCLK_Value (double)72000000;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gabce7fd8ef9ea39fb4f77b5a0016338ea"> 29</a></span><span class="preprocessor">#define ABP1_Value (double)72000000;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga516b1b0b440a3d8a0a97f99dcccfd631"> 30</a></span><span class="preprocessor">#define ABP1_TIMS_Value (double)72000000;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga142081f515cc585408786f7745733ef5"> 31</a></span><span class="preprocessor">#define ABP2_Value (double)72000000;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gab8af0c48743a9c568167d7d99c377861"> 32</a></span><span class="preprocessor">#define ABP2_TIMS_Value (double)72000000;</span></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 class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="comment">/* Эти дефайны добавлены в код stm32f4xx_hal_rcc.c, чтобы не попасть в бесконечный цикл */</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment">/* Мб перенести в MCU_Periph_Simulation(), но чет не хочется нагружать симуляцию этой херней */</span></div>
<div class="foldopen" id="foldopen00036" data-start="" data-end="">
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gae06dd862c75ec6de931ae3c350d61325"> 36</a></span><span class="preprocessor">#define _RCC_SET_FLAG(__FLAG__) \</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</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="l00038" name="l00038"></a><span class="lineno"> 38</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="l00039" name="l00039"></a><span class="lineno"> 39</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="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">else RCC-&gt;CIR |= (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 class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="foldopen" id="foldopen00042" data-start="" data-end="">
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gafedee1520e942548e0b8818122ecef97"> 42</a></span><span class="preprocessor">#define _RCC_CLEAR_FLAG(__FLAG__) \</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</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="l00044" name="l00044"></a><span class="lineno"> 44</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="l00045" name="l00045"></a><span class="lineno"> 45</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="l00046" name="l00046"></a><span class="lineno"> 46</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="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 class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="foldopen" id="foldopen00048" data-start="" data-end="">
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#gadf8f9d228ec9091df7d092a298f11b17"> 48</a></span><span class="preprocessor">#define Set_Flag_If_Its_Expected(_flag_, _condition_) \</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor">if(_condition_) _RCC_CLEAR_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 class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="foldopen" id="foldopen00051" data-start="" data-end="">
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="group___r_c_c___s_i_m_u_l_a_t_o_r.html#ga5dc1d225a53e67cc732ca9069ffb1f0d"> 51</a></span><span class="preprocessor">#define Clear_Flag_If_Its_Expected(_flag_, _condition_) \</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor">if(_condition_) _RCC_SET_FLAG(_flag_)</span></div>
</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment"></span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/** RCC_SIMULATOR</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment"> * @}</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment"> */</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</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 class="ttdoc">Заголовочный файл для оболочки МК.</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>