本帖最后由 Chaos_zc 于 2011-8-6 00:51 编辑
- 00061 /* Uncomment the line below according to the target STM32 device used in your
- 00062 application
- 00063 */
- 00064
- 00065 #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)
- 00066 /* #define STM32F10X_LD */ /*!< STM32F10X_LD: STM32 Low density devices */
- 00067 /* #define STM32F10X_LD_VL */ /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */
- 00068 /* #define STM32F10X_MD */ /*!< STM32F10X_MD: STM32 Medium density devices */
- 00069 /* #define STM32F10X_MD_VL */ /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
- 00070 /* #define STM32F10X_HD */ /*!< STM32F10X_HD: STM32 High density devices */
- 00071 /* #define STM32F10X_HD_VL */ /*!< STM32F10X_HD_VL: STM32 High density value line devices */
- 00072 /* #define STM32F10X_XL */ /*!< STM32F10X_XL: STM32 XL-density devices */
- 00073 /* #define STM32F10X_CL */ /*!< STM32F10X_CL: STM32 Connectivity line devices */
- 00074 #endif
- 00075 /* Tip: To avoid modifying this file each time you need to switch between these
- 00076 devices, you can define the device in your toolchain compiler preprocessor.
看库里面的stm32f10x.h文件,里面很多内容与系统时钟的配置有关。该文件会根据选择的芯片类型来进行时钟配置,要在此位置将选用的芯片类型去掉注释符。当然不想每次修改此文件,比较方便的方法就是你所说是在编译器的target options选项框中define。。。效果一样。
|