1. <th id="uou7b"></th>
        2. <tbody id="uou7b"></tbody>
          <tbody id="uou7b"></tbody>
        3. <span id="uou7b"></span>

          <tbody id="uou7b"></tbody>
          <em id="uou7b"></em>

          專注電子技術學習與研究
          當前位置:單片機教程網 >> STM32 >> 瀏覽文章

          DEFINE:STM32F10X_HD,USE_STDPERIPH_DRIVER的原因

          作者:佚名   來源:本站原創   點擊數:  更新時間:2014年08月19日   【字體:

          庫V3.5 main等源文件中不再直接包含stm32f10x_conf.h,而是stm32f10x.h,主程序第一句話就是#include“stm32f10x.h”。而stm32f10x_conf.h被包含在了stm32f10x.h中,間接包含進了用戶主程序文件。stm32f10x.h則定義了啟動設置,以及所有寄存器宏定義,此文件中需要注意的有:

          設備(device)

          #if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL) 
               
               
               
               
               
               
               
               
          #endif
          判斷是否選擇了設備(device),取消下面任何一個注釋,可以進行默認設備
           
           
          #if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL)
           #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
          #endif
          未選擇任何設備時,將會報錯,所以在這之前的地“open for targe->C++”中需要預定義設備,我自己的是STM32F10X_HD。
           
           
          #if !defined  USE_STDPERIPH_DRIVER
           
          #endif

          #ifdef USE_STDPERIPH_DRIVER
            #include "stm32f10x_conf.h"
          #endif
           
          所以也要對USE_STDPERIPH_DRIVER進行預定義,否則我們將無法使用庫件庫
          關閉窗口
          日日噜噜夜夜狠狠久久无码区

              1. <th id="uou7b"></th>
              2. <tbody id="uou7b"></tbody>
                <tbody id="uou7b"></tbody>
              3. <span id="uou7b"></span>

                <tbody id="uou7b"></tbody>
                <em id="uou7b"></em>