打印

STM32 V3.3.0 库请教香主

[复制链接]
3209|10
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
CreatAll|  楼主 | 2011-7-11 10:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
 
#ifdef STM32L1XX_MD
#include "stm32l1xx.h"
#else
#include "stm32f10x.h"
#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  ??

使用特权

评论回复
5
CreatAll|  楼主 | 2011-7-11 10:27 | 只看该作者
??

使用特权

评论回复
6
香水城| | 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.

使用特权

评论回复
7
nongfuxu| | 2011-7-11 17:21 | 只看该作者
学习了.

使用特权

评论回复
8
anqier1| | 2011-7-11 21:24 | 只看该作者
过来看一下

使用特权

评论回复
9
anqier1| | 2011-7-11 21:24 | 只看该作者
:handshake

使用特权

评论回复
10
香水城| | 2011-7-20 11:30 | 只看该作者
不明白你的意思,楼主位说有STM32L1XX_MD,10楼又说没有??

我在6楼的最后一句话话不是解释了吗?

使用特权

评论回复
11
yinyangdianzi| | 2011-7-20 15:59 | 只看该作者
:victory:

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

117

帖子

1

粉丝