STM32 V3.3.0 库请教香主

[复制链接]
 楼主| CreatAll 发表于 2011-7-11 10:05 | 显示全部楼层 |阅读模式

  1. #ifdef STM32L1XX_MD
  2. #include "stm32l1xx.h"
  3. #else
  4. #include "stm32f10x.h"
  5. #endif /* STM32L1XX_MD */


这是 STM32_USB-FS-Device_Lib_V3.3.0库里的定义
=====================================

stm32l1xx.h 和 stm32f10x.h 有啥区别??

库的例子里面用到的是stm32l1xx.h是这个文件(以前我下的程序大部分用的是stm32f10x.h)
香水城 发表于 2011-7-11 10:07 | 显示全部楼层
那里不是有一个 #ifdef 吗?
 楼主| CreatAll 发表于 2011-7-11 10:08 | 显示全部楼层
我知道这句话的意思,也知道现在是用的"stm32l1xx.h"

但我不明白这两个头文件有啥区别???什么时候用这个,什么时候用那个??
 楼主| CreatAll 发表于 2011-7-11 10:11 | 显示全部楼层
定义了 STM32L1XX_MD 的时候用的stm32l1xx.h

可为什么要定义 STM32L1XX_MD  ??
 楼主| CreatAll 发表于 2011-7-11 10:27 | 显示全部楼层
??
香水城 发表于 2011-7-11 10:37 | 显示全部楼层
/* #define STM32F10X_LD */     /*!< STM32F10X_LD: STM32 Low density devices */
  /* #define STM32F10X_LD_VL */  /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */  
  /* #define STM32F10X_MD */     /*!< STM32F10X_MD: STM32 Medium density devices */
  /* #define STM32F10X_MD_VL */  /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */  
  /* #define STM32F10X_HD */     /*!< STM32F10X_HD: STM32 High density devices */
  /* #define STM32F10X_HD_VL */  /*!< STM32F10X_HD_VL: STM32 High density value line devices */  
  /* #define STM32F10X_XL */     /*!< STM32F10X_XL: STM32 XL-density devices */
  /* #define STM32F10X_CL */     /*!< STM32F10X_CL: STM32 Connectivity line devices */
#endif

- Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers
   where the Flash memory density ranges between 16 and 32 Kbytes.
- Low-density value line devices are STM32F100xx microcontrollers where the Flash
   memory density ranges between 16 and 32 Kbytes.
- Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers
   where the Flash memory density ranges between 64 and 128 Kbytes.
- Medium-density value line devices are STM32F100xx microcontrollers where the
   Flash memory density ranges between 64 and 128 Kbytes.   
- High-density devices are STM32F101xx and STM32F103xx microcontrollers where
   the Flash memory density ranges between 256 and 512 Kbytes.
- High-density value line devices are STM32F100xx microcontrollers where the
   Flash memory density ranges between 256 and 512 Kbytes.   
- XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
   the Flash memory density ranges between 512 and 1024 Kbytes.
- Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.

STM32L1XX_MD  对应  Medium-density Low-Power devices: STM32L15xx microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
nongfuxu 发表于 2011-7-11 17:21 | 显示全部楼层
学习了.
anqier1 发表于 2011-7-11 21:24 | 显示全部楼层
过来看一下
anqier1 发表于 2011-7-11 21:24 | 显示全部楼层
:handshake
香水城 发表于 2011-7-20 11:30 | 显示全部楼层
不明白你的意思,楼主位说有STM32L1XX_MD,10楼又说没有??

我在6楼的最后一句话话不是解释了吗?
yinyangdianzi 发表于 2011-7-20 15:59 | 显示全部楼层
:victory:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

117

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部