comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SPI/FullDuplex_SoftNSS/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 SPI/FullDuplex_SoftNSS/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>&copy; 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_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && !defined (USE_STM3210C_EVAL) && !defined (USE_STM32100E_EVAL)
33 //#define USE_STM32100B_EVAL
34 //#define USE_STM3210B_EVAL
35 //#define USE_STM3210E_EVAL
36 //#define USE_STM32100E_EVAL
37 #define USE_STM3210C_EVAL
38 #endif
39
40 /* Define the STM32F10x hardware depending on the used evaluation board */
41 #if defined (USE_STM3210B_EVAL) || defined (USE_STM3210E_EVAL) || defined(USE_STM32100B_EVAL) || defined (USE_STM32100E_EVAL)
42 #define SPIy SPI1
43 #define SPIy_CLK RCC_APB2Periph_SPI1
44 #define SPIy_GPIO GPIOA
45 #define SPIy_GPIO_CLK RCC_APB2Periph_GPIOA
46 #define SPIy_PIN_SCK GPIO_Pin_5
47 #define SPIy_PIN_MISO GPIO_Pin_6
48 #define SPIy_PIN_MOSI GPIO_Pin_7
49
50 #define SPIz SPI2
51 #define SPIz_CLK RCC_APB1Periph_SPI2
52 #define SPIz_GPIO GPIOB
53 #define SPIz_GPIO_CLK RCC_APB2Periph_GPIOB
54 #define SPIz_PIN_SCK GPIO_Pin_13
55 #define SPIz_PIN_MISO GPIO_Pin_14
56 #define SPIz_PIN_MOSI GPIO_Pin_15
57
58 #elif defined (USE_STM3210C_EVAL)
59 #define SPIy SPI3 /* SPI pins are remapped by software */
60 #define SPIy_CLK RCC_APB1Periph_SPI3
61 #define SPIy_GPIO GPIOC
62 #define SPIy_GPIO_CLK RCC_APB2Periph_GPIOC
63 #define SPIy_PIN_SCK GPIO_Pin_10
64 #define SPIy_PIN_MISO GPIO_Pin_11
65 #define SPIy_PIN_MOSI GPIO_Pin_12
66
67 #define SPIz SPI2
68 #define SPIz_CLK RCC_APB1Periph_SPI2
69 #define SPIz_GPIO GPIOB
70 #define SPIz_GPIO_CLK RCC_APB2Periph_GPIOB
71 #define SPIz_PIN_SCK GPIO_Pin_13
72 #define SPIz_PIN_MISO GPIO_Pin_14
73 #define SPIz_PIN_MOSI GPIO_Pin_15
74
75 #endif
76
77 /* Exported macro ------------------------------------------------------------*/
78 /* Exported functions ------------------------------------------------------- */
79
80 #endif /* __PLATFORM_CONFIG_H */
81
82 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/