platform_config.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __PLATFORM_CONFIG_H
00018 #define __PLATFORM_CONFIG_H
00019
00020
00021
00022
00023
00024
00025 #if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL)
00026
00027 #define USE_STM3210E_EVAL
00028 #endif
00029
00030
00031
00032 #define USE_USART1
00033
00034
00035
00036
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
00082
00083
00084 #endif
00085
00086