Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/platform_config.h @ 0:c59513fd84fb
Initial commit of STM32 test code.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 03 Oct 2011 21:19:15 +1030 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c59513fd84fb |
---|---|
1 /** | |
2 ****************************************************************************** | |
3 * @file USART/Smartcard/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>© 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) | |
33 //#define USE_STM3210B_EVAL | |
34 //#define USE_STM3210E_EVAL | |
35 #define USE_STM3210C_EVAL | |
36 #endif | |
37 | |
38 /* Define the STM32F10x hardware depending on the used evaluation board */ | |
39 #ifdef USE_STM3210B_EVAL | |
40 /* Smartcard Inteface USART pins */ | |
41 #define SC_USART USART3 | |
42 #define SC_USART_GPIO GPIOB | |
43 #define SC_USART_CLK RCC_APB1Periph_USART3 | |
44 #define SC_USART_GPIO_CLK RCC_APB2Periph_GPIOB | |
45 #define SC_USART_TxPin GPIO_Pin_10 | |
46 #define SC_USART_ClkPin GPIO_Pin_12 | |
47 #define SC_USART_IRQn USART3_IRQn | |
48 #define SC_USART_IRQHandler USART3_IRQHandler | |
49 /* Smartcard Inteface GPIO pins */ | |
50 #define SC_3_5V GPIO_Pin_11 /* GPIOD Pin 11 */ | |
51 #define SC_RESET GPIO_Pin_11 /* GPIOB Pin 11 */ | |
52 #define SC_CMDVCC GPIO_Pin_7 /* GPIOE Pin 7 */ | |
53 #define SC_OFF GPIO_Pin_14 /* GPIOE Pin 14 */ | |
54 #define GPIO_3_5V GPIOD | |
55 #define GPIO_RESET GPIOB | |
56 #define GPIO_CMDVCC GPIOE | |
57 #define GPIO_OFF GPIOE | |
58 #define RCC_APB2Periph_3_5V RCC_APB2Periph_GPIOD | |
59 #define RCC_APB2Periph_RESET RCC_APB2Periph_GPIOB | |
60 #define RCC_APB2Periph_CMDVCC RCC_APB2Periph_GPIOE | |
61 #define RCC_APB2Periph_OFF RCC_APB2Periph_GPIOE | |
62 #define SC_EXTI EXTI_Line14 | |
63 #define SC_PortSource GPIO_PortSourceGPIOE | |
64 #define SC_PinSource GPIO_PinSource14 | |
65 #define SC_EXTI_IRQ EXTI15_10_IRQn | |
66 #elif defined USE_STM3210E_EVAL | |
67 /* Smartcard Inteface USART pins */ | |
68 #define SC_USART USART3 | |
69 #define SC_USART_GPIO GPIOB | |
70 #define SC_USART_CLK RCC_APB1Periph_USART3 | |
71 #define SC_USART_GPIO_CLK RCC_APB2Periph_GPIOB | |
72 #define SC_USART_TxPin GPIO_Pin_10 | |
73 #define SC_USART_ClkPin GPIO_Pin_12 | |
74 #define SC_USART_IRQn USART3_IRQn | |
75 #define SC_USART_IRQHandler USART3_IRQHandler | |
76 /* Smartcard Inteface GPIO pins */ | |
77 #define SC_3_5V GPIO_Pin_0 /* GPIOB Pin 0 */ | |
78 #define SC_RESET GPIO_Pin_11 /* GPIOB Pin 11 */ | |
79 #define SC_CMDVCC GPIO_Pin_6 /* GPIOC Pin 6 */ | |
80 #define SC_OFF GPIO_Pin_7 /* GPIOC Pin 7 */ | |
81 #define GPIO_3_5V GPIOB | |
82 #define GPIO_RESET GPIOB | |
83 #define GPIO_CMDVCC GPIOC | |
84 #define GPIO_OFF GPIOC | |
85 #define RCC_APB2Periph_3_5V RCC_APB2Periph_GPIOB | |
86 #define RCC_APB2Periph_RESET RCC_APB2Periph_GPIOB | |
87 #define RCC_APB2Periph_CMDVCC RCC_APB2Periph_GPIOC | |
88 #define RCC_APB2Periph_OFF RCC_APB2Periph_GPIOC | |
89 #define SC_EXTI EXTI_Line7 | |
90 #define SC_PortSource GPIO_PortSourceGPIOC | |
91 #define SC_PinSource GPIO_PinSource7 | |
92 #define SC_EXTI_IRQ EXTI9_5_IRQn | |
93 #elif defined USE_STM3210C_EVAL | |
94 /* Smartcard Inteface USART pins */ | |
95 #define SC_USART USART3 | |
96 #define SC_USART_GPIO GPIOD | |
97 #define SC_USART_CLK RCC_APB1Periph_USART3 | |
98 #define SC_USART_GPIO_CLK RCC_APB2Periph_GPIOD | |
99 #define SC_USART_TxPin GPIO_Pin_8 | |
100 #define SC_USART_ClkPin GPIO_Pin_10 | |
101 #define SC_USART_IRQn USART3_IRQn | |
102 #define SC_USART_IRQHandler USART3_IRQHandler | |
103 /* Smartcard Inteface GPIO pins */ | |
104 #define SC_3_5V GPIO_Pin_0 /* GPIOC Pin 0 */ | |
105 #define SC_RESET GPIO_Pin_9 /* GPIOD Pin 9 */ | |
106 #define SC_CMDVCC GPIO_Pin_7 /* GPIOD Pin 7 */ | |
107 #define SC_OFF GPIO_Pin_7 /* GPIOE Pin 7 */ | |
108 #define GPIO_3_5V GPIOC | |
109 #define GPIO_RESET GPIOD | |
110 #define GPIO_CMDVCC GPIOD | |
111 #define GPIO_OFF GPIOE | |
112 #define RCC_APB2Periph_3_5V RCC_APB2Periph_GPIOC | |
113 #define RCC_APB2Periph_RESET RCC_APB2Periph_GPIOD | |
114 #define RCC_APB2Periph_CMDVCC RCC_APB2Periph_GPIOD | |
115 #define RCC_APB2Periph_OFF RCC_APB2Periph_GPIOE | |
116 #define SC_EXTI EXTI_Line7 | |
117 #define SC_PortSource GPIO_PortSourceGPIOE | |
118 #define SC_PinSource GPIO_PinSource7 | |
119 #define SC_EXTI_IRQ EXTI9_5_IRQn | |
120 #endif /* USE_STM3210B_EVAL */ | |
121 | |
122 /* Exported macro ------------------------------------------------------------*/ | |
123 /* Exported functions ------------------------------------------------------- */ | |
124 | |
125 #endif /* __PLATFORM_CONFIG_H */ | |
126 | |
127 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ |