CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
platform_config.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file USART/Interrupt/platform_config.h
4  * @author MCD Application Team
5  * @version V3.5.0
6  * @date 08-April-2011
7  * @brief Evaluation board specific configuration file.
8  ******************************************************************************
9  * @attention
10  *
11  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17  *
18  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
19  ******************************************************************************
20  */
21 
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __PLATFORM_CONFIG_H
24 #define __PLATFORM_CONFIG_H
25 
26 /* Includes ------------------------------------------------------------------*/
27 
28 /* Exported types ------------------------------------------------------------*/
29 /* Exported constants --------------------------------------------------------*/
30 /* Uncomment the line corresponding to the STMicroelectronics evaluation board
31  used to run the example */
32 #if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && !defined (USE_STM3210C_EVAL) && !defined (USE_STM32100B_EVAL) && !defined (USE_STM32100E_EVAL)
33  //#define USE_STM32100B_EVAL
34  //#define USE_STM3210B_EVAL
35  //#define USE_STM3210E_EVAL
36  //#define USE_STM3210C_EVAL
37  #define USE_STM32100E_EVAL
38 #endif
39 
40 /* Define the STM32F10x hardware depending on the used evaluation board */
41 #ifdef USE_STM3210B_EVAL
42 
43  #define USARTy USART1
44  #define USARTy_GPIO GPIOA
45  #define USARTy_CLK RCC_APB2Periph_USART1
46  #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOA
47  #define USARTy_RxPin GPIO_Pin_10
48  #define USARTy_TxPin GPIO_Pin_9
49  #define USARTy_IRQn USART1_IRQn
50  #define USARTy_IRQHandler USART1_IRQHandler
51 
52  #define USARTz USART2
53  #define USARTz_GPIO GPIOD
54  #define USARTz_CLK RCC_APB1Periph_USART2
55  #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOD
56  #define USARTz_RxPin GPIO_Pin_6
57  #define USARTz_TxPin GPIO_Pin_5
58  #define USARTz_IRQn USART2_IRQn
59  #define USARTz_IRQHandler USART2_IRQHandler
60 
61 #elif defined (USE_STM3210E_EVAL) || defined (USE_STM32100E_EVAL)
62 
63  #define USARTy USART1
64  #define USARTy_GPIO GPIOA
65  #define USARTy_CLK RCC_APB2Periph_USART1
66  #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOA
67  #define USARTy_RxPin GPIO_Pin_10
68  #define USARTy_TxPin GPIO_Pin_9
69  #define USARTy_IRQn USART1_IRQn
70  #define USARTy_IRQHandler USART1_IRQHandler
71 
72  #define USARTz USART2
73  #define USARTz_GPIO GPIOA
74  #define USARTz_CLK RCC_APB1Periph_USART2
75  #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOA
76  #define USARTz_RxPin GPIO_Pin_3
77  #define USARTz_TxPin GPIO_Pin_2
78  #define USARTz_IRQn USART2_IRQn
79  #define USARTz_IRQHandler USART2_IRQHandler
80 
81 #elif defined USE_STM3210C_EVAL
82 
83  #define USARTy USART2
84  #define USARTy_GPIO GPIOD
85  #define USARTy_CLK RCC_APB1Periph_USART2
86  #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOD
87  #define USARTy_RxPin GPIO_Pin_6
88  #define USARTy_TxPin GPIO_Pin_5
89  #define USARTy_IRQn USART2_IRQn
90  #define USARTy_IRQHandler USART2_IRQHandler
91 
92  #define USARTz USART3
93  #define USARTz_GPIO GPIOC
94  #define USARTz_CLK RCC_APB1Periph_USART3
95  #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOC
96  #define USARTz_RxPin GPIO_Pin_11
97  #define USARTz_TxPin GPIO_Pin_10
98  #define USARTz_IRQn USART3_IRQn
99  #define USARTz_IRQHandler USART3_IRQHandler
100 
101 #elif defined USE_STM32100B_EVAL
102 
103  #define USARTy USART1
104  #define USARTy_GPIO GPIOA
105  #define USARTy_CLK RCC_APB2Periph_USART1
106  #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOA
107  #define USARTy_RxPin GPIO_Pin_10
108  #define USARTy_TxPin GPIO_Pin_9
109  #define USARTy_IRQn USART1_IRQn
110  #define USARTy_IRQHandler USART1_IRQHandler
111 
112  #define USARTz USART2
113  #define USARTz_GPIO GPIOD
114  #define USARTz_CLK RCC_APB1Periph_USART2
115  #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOD
116  #define USARTz_RxPin GPIO_Pin_6
117  #define USARTz_TxPin GPIO_Pin_5
118  #define USARTz_IRQn USART2_IRQn
119  #define USARTz_IRQHandler USART2_IRQHandler
120 
121 #endif /* USE_STM3210B_EVAL */
122 
123 /* Exported macro ------------------------------------------------------------*/
124 /* Exported functions ------------------------------------------------------- */
125 
126 #endif /* __PLATFORM_CONFIG_H */
127 
128 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/