platform_config.h

00001 /******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
00002 * File Name          : platform_config.h
00003 * Author             : MCD Application Team
00004 * Version            : V2.0.1
00005 * Date               : 06/13/2008
00006 * Description        : Evaluation board specific configuration file.
00007 ********************************************************************************
00008 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00009 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
00010 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
00011 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
00012 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
00013 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00014 *******************************************************************************/
00015 
00016 /* Define to prevent recursive inclusion -------------------------------------*/
00017 #ifndef __PLATFORM_CONFIG_H
00018 #define __PLATFORM_CONFIG_H
00019 
00020 /* Includes ------------------------------------------------------------------*/
00021 /* Exported types ------------------------------------------------------------*/
00022 /* Exported constants --------------------------------------------------------*/
00023 /* Uncomment the line corresponding to the STMicroelectronics evaluation board
00024    used to run the example */
00025 #if !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL)
00026  //#define USE_STM3210B_EVAL
00027  #define USE_STM3210E_EVAL
00028 #endif
00029 
00030 /* Uncomment the line corresponding to the select the USART used to run 
00031    the example */
00032 #define USE_USART1
00033 //#define USE_USART2
00034 //#define USE_USART3
00035 //#define USE_UART4
00036 //#define USE_UART5
00037 
00038 #ifdef USE_USART1
00039   #define  USARTx                     USART1
00040   #define  GPIOx                      GPIOA
00041   #define  RCC_APB2Periph_GPIOx       RCC_APB2Periph_GPIOA
00042   #define  GPIO_RxPin                 GPIO_Pin_10
00043   #define  GPIO_TxPin                 GPIO_Pin_9
00044 #elif defined USE_USART2 && defined USE_STM3210B_EVAL
00045   #define  USARTx                     USART2
00046   #define  RCC_APB1Periph_USARTx      RCC_APB1Periph_USART2
00047   #define  GPIOx                      GPIOD
00048   #define  RCC_APB2Periph_GPIOx       RCC_APB2Periph_GPIOD
00049   #define  GPIO_TxPin                 GPIO_Pin_5
00050   #define  GPIO_RxPin                 GPIO_Pin_6
00051 #elif defined USE_USART2 && defined   USE_STM3210E_EVAL  
00052   #define  USARTx                     USART2
00053   #define  RCC_APB1Periph_USARTx      RCC_APB1Periph_USART2
00054   #define  GPIOx                      GPIOA
00055   #define  RCC_APB2Periph_GPIOx       RCC_APB2Periph_GPIOA
00056   #define  GPIO_TxPin                 GPIO_Pin_2
00057   #define  GPIO_RxPin                 GPIO_Pin_3
00058 #elif defined USE_USART3
00059   #define  USARTx                     USART3
00060   #define  GPIOx                      GPIOB
00061   #define  RCC_APB2Periph_GPIOx       RCC_APB2Periph_GPIOB
00062   #define  RCC_APB1Periph_USARTx      RCC_APB1Periph_USART3
00063   #define  GPIO_RxPin                 GPIO_Pin_11
00064   #define  GPIO_TxPin                 GPIO_Pin_10
00065 #elif defined USE_UART4
00066   #define  USARTx                     UART4
00067   #define  GPIOx                      GPIOC
00068   #define  RCC_APB2Periph_GPIOx       RCC_APB2Periph_GPIOC
00069   #define  RCC_APB1Periph_USARTx      RCC_APB1Periph_UART4
00070   #define  GPIO_RxPin                 GPIO_Pin_11
00071   #define  GPIO_TxPin                 GPIO_Pin_10
00072 #elif defined USE_UART5
00073   #define  USARTx                     UART5
00074   #define  GPIOx                      GPIOC
00075   #define  RCC_APB2Periph_GPIOx       RCC_APB2Periph_GPIOC
00076   #define  RCC_APB1Periph_USARTx      RCC_APB1Periph_UART5
00077   #define  GPIO_RxPin                 GPIO_Pin_2
00078   #define  GPIO_TxPin                 GPIO_Pin_12
00079 #endif
00080 
00081 /* Exported macro ------------------------------------------------------------*/
00082 /* Exported functions ------------------------------------------------------- */
00083 
00084 #endif /* __PLATFORM_CONFIG_H */
00085 
00086 /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/

Generated on Wed Feb 24 13:37:02 2010 for Python-on-a-chip by  doxygen 1.5.9