Advertisement
Guest User

platform_config.h

a guest
Apr 24th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. /**
  2. ******************************************************************************
  3. * @file platform_config.h
  4. * @author MCD Application Team, mod. Martin Thomas for Manley EK-STM32F
  5. * @version V3.0.0.1
  6. * @date 04/17/2009
  7. * @brief Evaluation board specific configuration file.
  8. ******************************************************************************
  9. * @copy
  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 2009 STMicroelectronics</center></h2>
  19. */
  20.  
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __PLATFORM_CONFIG_H
  23. #define __PLATFORM_CONFIG_H
  24.  
  25. /* Includes ------------------------------------------------------------------*/
  26.  
  27. /* Exported types ------------------------------------------------------------*/
  28. /* Exported constants --------------------------------------------------------*/
  29. /* Un-comment the line corresponding to evaluation board used to run the example */
  30. #if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && \
  31. !defined (USE_EK_STM32F) && !defined(USE_MINI_STM32) && !defined(USE_STM32_P103)
  32. //#define USE_STM3210B_EVAL
  33. //#define USE_STM3210E_EVAL
  34. //#define USE_EK_STM32F
  35. #error "board not defined"
  36. #endif
  37.  
  38.  
  39. /* Define the STM32F10x hardware depending on the used evaluation board */
  40. #if defined(USE_STM3210B_EVAL)
  41. #define GPIOx GPIOD
  42. #define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOD
  43. #define GPIO_TxPin GPIO_Pin_5
  44. #define GPIO_RxPin GPIO_Pin_6
  45. #define GPIO_LED GPIOC
  46. #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOC
  47. #define GPIO_Pin_LED1 GPIO_Pin_6
  48. #define GPIO_Pin_LED2 GPIO_Pin_7
  49. #define GPIO_Pin_LED3 GPIO_Pin_8
  50. #define GPIO_Pin_LED4 GPIO_Pin_9
  51.  
  52. #elif defined(USE_STM32_P103)
  53. // Olimex STM32-P103 not tested!
  54. #define GPIOx GPIOA
  55. #define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOA
  56. #define GPIO_TxPin GPIO_Pin_2
  57. #define GPIO_RxPin GPIO_Pin_3
  58. #define GPIO_LED GPIOC
  59. #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOC
  60. #define GPIO_Pin_LED1 GPIO_Pin_0
  61. #define GPIO_Pin_LED2 GPIO_Pin_1
  62. #define GPIO_Pin_LED3 GPIO_Pin_2
  63. #define GPIO_Pin_LED4 GPIO_Pin_3
  64. #define GPIO_Pin_Stat GPIO_Pin_12
  65.  
  66. #elif defined(USE_STM3210E_EVAL)
  67. #define GPIOx GPIOA
  68. #define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOA
  69. #define GPIO_TxPin GPIO_Pin_2
  70. #define GPIO_RxPin GPIO_Pin_3
  71. #define GPIO_LED GPIOF
  72. #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOF
  73. #define GPIO_Pin_LED1 GPIO_Pin_6
  74. #define GPIO_Pin_LED2 GPIO_Pin_7
  75. #define GPIO_Pin_LED3 GPIO_Pin_8
  76. #define GPIO_Pin_LED4 GPIO_Pin_9
  77.  
  78. #elif defined(USE_EK_STM32F)
  79. #define GPIOx GPIOD
  80. #define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOD
  81. #define GPIO_TxPin GPIO_Pin_5
  82. #define GPIO_RxPin GPIO_Pin_6
  83. #define GPIO_LED GPIOC
  84. #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOC
  85. #define GPIO_Pin_LED1 GPIO_Pin_4
  86. #define GPIO_Pin_LED2 GPIO_Pin_5
  87. #define GPIO_Pin_LED3 GPIO_Pin_6
  88. #define GPIO_Pin_LED4 GPIO_Pin_7
  89.  
  90. #elif defined(USE_MINI_STM32)
  91. #define GPIOx GPIOD
  92. #define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOD
  93. #define GPIO_TxPin GPIO_Pin_5
  94. #define GPIO_RxPin GPIO_Pin_6
  95. #define GPIO_LED GPIOA
  96. #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOA
  97. #define GPIO_Pin_LED1 GPIO_Pin_0
  98. #define GPIO_Pin_LED2 GPIO_Pin_1
  99. #define GPIO_Pin_LED3 GPIO_Pin_0
  100. #define GPIO_Pin_LED4 GPIO_Pin_1
  101.  
  102. #endif
  103.  
  104. /* Exported macro ------------------------------------------------------------*/
  105. /* Exported functions ------------------------------------------------------- */
  106.  
  107. #endif /* __PLATFORM_CONFIG_H */
  108.  
  109. /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement