USART/Smartcard/platform_config.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    USART/Smartcard/platform_config.h 
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    10/15/2010
00007   * @brief   Evaluation board specific configuration file.
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
00019   */ 
00020 
00021 /* Define to prevent recursive inclusion -------------------------------------*/
00022 #ifndef __PLATFORM_CONFIG_H
00023 #define __PLATFORM_CONFIG_H
00024 
00025 /* Includes ------------------------------------------------------------------*/
00026 
00027 /* Exported types ------------------------------------------------------------*/
00028 /* Exported constants --------------------------------------------------------*/
00029 /* Uncomment the line corresponding to the STMicroelectronics evaluation board
00030    used to run the example */
00031 #if !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL) &&  !defined (USE_STM3210C_EVAL)
00032  //#define USE_STM3210B_EVAL
00033  //#define USE_STM3210E_EVAL
00034  #define USE_STM3210C_EVAL 
00035 #endif
00036 
00037 /* Define the STM32F10x hardware depending on the used evaluation board */
00038 #ifdef USE_STM3210B_EVAL
00039   /* Smartcard Inteface USART pins */
00040   #define SC_USART                 USART3
00041   #define SC_USART_GPIO            GPIOB
00042   #define SC_USART_CLK             RCC_APB1Periph_USART3
00043   #define SC_USART_GPIO_CLK        RCC_APB2Periph_GPIOB
00044   #define SC_USART_TxPin           GPIO_Pin_10
00045   #define SC_USART_ClkPin          GPIO_Pin_12
00046   #define SC_USART_IRQn            USART3_IRQn
00047   #define SC_USART_IRQHandler      USART3_IRQHandler  
00048   /* Smartcard Inteface GPIO pins */
00049   #define SC_3_5V                  GPIO_Pin_11 /* GPIOD Pin 11 */
00050   #define SC_RESET                 GPIO_Pin_11 /* GPIOB Pin 11 */
00051   #define SC_CMDVCC                GPIO_Pin_7  /* GPIOE Pin 7  */
00052   #define SC_OFF                   GPIO_Pin_14 /* GPIOE Pin 14 */
00053   #define GPIO_3_5V                GPIOD
00054   #define GPIO_RESET               GPIOB
00055   #define GPIO_CMDVCC              GPIOE
00056   #define GPIO_OFF                 GPIOE
00057   #define RCC_APB2Periph_3_5V      RCC_APB2Periph_GPIOD
00058   #define RCC_APB2Periph_RESET     RCC_APB2Periph_GPIOB
00059   #define RCC_APB2Periph_CMDVCC    RCC_APB2Periph_GPIOE
00060   #define RCC_APB2Periph_OFF       RCC_APB2Periph_GPIOE
00061   #define SC_EXTI                  EXTI_Line14
00062   #define SC_PortSource            GPIO_PortSourceGPIOE
00063   #define SC_PinSource             GPIO_PinSource14
00064   #define SC_EXTI_IRQ              EXTI15_10_IRQn
00065 #elif defined USE_STM3210E_EVAL
00066   /* Smartcard Inteface USART pins */
00067   #define SC_USART                 USART3
00068   #define SC_USART_GPIO            GPIOB
00069   #define SC_USART_CLK             RCC_APB1Periph_USART3
00070   #define SC_USART_GPIO_CLK        RCC_APB2Periph_GPIOB
00071   #define SC_USART_TxPin           GPIO_Pin_10
00072   #define SC_USART_ClkPin          GPIO_Pin_12
00073   #define SC_USART_IRQn            USART3_IRQn 
00074   #define SC_USART_IRQHandler      USART3_IRQHandler    
00075   /* Smartcard Inteface GPIO pins */
00076   #define SC_3_5V                  GPIO_Pin_0  /* GPIOB Pin 0 */
00077   #define SC_RESET                 GPIO_Pin_11 /* GPIOB Pin 11 */
00078   #define SC_CMDVCC                GPIO_Pin_6  /* GPIOC Pin 6  */
00079   #define SC_OFF                   GPIO_Pin_7  /* GPIOC Pin 7 */ 
00080   #define GPIO_3_5V                GPIOB
00081   #define GPIO_RESET               GPIOB
00082   #define GPIO_CMDVCC              GPIOC
00083   #define GPIO_OFF                 GPIOC
00084   #define RCC_APB2Periph_3_5V      RCC_APB2Periph_GPIOB
00085   #define RCC_APB2Periph_RESET     RCC_APB2Periph_GPIOB
00086   #define RCC_APB2Periph_CMDVCC    RCC_APB2Periph_GPIOC
00087   #define RCC_APB2Periph_OFF       RCC_APB2Periph_GPIOC
00088   #define SC_EXTI                  EXTI_Line7
00089   #define SC_PortSource            GPIO_PortSourceGPIOC
00090   #define SC_PinSource             GPIO_PinSource7
00091   #define SC_EXTI_IRQ              EXTI9_5_IRQn
00092 #elif defined USE_STM3210C_EVAL
00093   /* Smartcard Inteface USART pins */
00094   #define SC_USART                 USART3
00095   #define SC_USART_GPIO            GPIOD
00096   #define SC_USART_CLK             RCC_APB1Periph_USART3
00097   #define SC_USART_GPIO_CLK        RCC_APB2Periph_GPIOD
00098   #define SC_USART_TxPin           GPIO_Pin_8
00099   #define SC_USART_ClkPin          GPIO_Pin_10
00100   #define SC_USART_IRQn            USART3_IRQn 
00101   #define SC_USART_IRQHandler      USART3_IRQHandler    
00102   /* Smartcard Inteface GPIO pins */
00103   #define SC_3_5V                  GPIO_Pin_0  /* GPIOC Pin 0 */
00104   #define SC_RESET                 GPIO_Pin_9  /* GPIOD Pin 9 */
00105   #define SC_CMDVCC                GPIO_Pin_7  /* GPIOD Pin 7  */
00106   #define SC_OFF                   GPIO_Pin_7  /* GPIOE Pin 7 */ 
00107   #define GPIO_3_5V                GPIOC
00108   #define GPIO_RESET               GPIOD
00109   #define GPIO_CMDVCC              GPIOD
00110   #define GPIO_OFF                 GPIOE
00111   #define RCC_APB2Periph_3_5V      RCC_APB2Periph_GPIOC
00112   #define RCC_APB2Periph_RESET     RCC_APB2Periph_GPIOD
00113   #define RCC_APB2Periph_CMDVCC    RCC_APB2Periph_GPIOD
00114   #define RCC_APB2Periph_OFF       RCC_APB2Periph_GPIOE
00115   #define SC_EXTI                  EXTI_Line7
00116   #define SC_PortSource            GPIO_PortSourceGPIOE
00117   #define SC_PinSource             GPIO_PinSource7
00118   #define SC_EXTI_IRQ              EXTI9_5_IRQn  
00119 #endif /* USE_STM3210B_EVAL */
00120 
00121 /* Exported macro ------------------------------------------------------------*/
00122 /* Exported functions ------------------------------------------------------- */
00123 
00124 #endif /* __PLATFORM_CONFIG_H */
00125 
00126 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32