SPI/FullDuplex_SoftNSS/platform_config.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    SPI/FullDuplex_SoftNSS/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_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL) &&  !defined (USE_STM3210C_EVAL) &&  !defined (USE_STM32100E_EVAL)
00032  //#define USE_STM32100B_EVAL
00033  //#define USE_STM3210B_EVAL
00034  //#define USE_STM3210E_EVAL
00035  //#define USE_STM32100E_EVAL
00036  #define USE_STM3210C_EVAL
00037 #endif
00038 
00039 /* Define the STM32F10x hardware depending on the used evaluation board */
00040 #if defined (USE_STM3210B_EVAL) || defined (USE_STM3210E_EVAL) || defined(USE_STM32100B_EVAL) || defined (USE_STM32100E_EVAL)
00041   #define SPIy                   SPI1
00042   #define SPIy_CLK               RCC_APB2Periph_SPI1
00043   #define SPIy_GPIO              GPIOA
00044   #define SPIy_GPIO_CLK          RCC_APB2Periph_GPIOA  
00045   #define SPIy_PIN_SCK           GPIO_Pin_5
00046   #define SPIy_PIN_MISO          GPIO_Pin_6
00047   #define SPIy_PIN_MOSI          GPIO_Pin_7
00048   
00049   #define SPIz                    SPI2
00050   #define SPIz_CLK                RCC_APB1Periph_SPI2
00051   #define SPIz_GPIO               GPIOB
00052   #define SPIz_GPIO_CLK           RCC_APB2Periph_GPIOB 
00053   #define SPIz_PIN_SCK            GPIO_Pin_13
00054   #define SPIz_PIN_MISO           GPIO_Pin_14
00055   #define SPIz_PIN_MOSI           GPIO_Pin_15 
00056           
00057 #elif defined (USE_STM3210C_EVAL)
00058   #define SPIy                   SPI3   /* SPI pins are remapped by software */
00059   #define SPIy_CLK               RCC_APB1Periph_SPI3
00060   #define SPIy_GPIO              GPIOC
00061   #define SPIy_GPIO_CLK          RCC_APB2Periph_GPIOC  
00062   #define SPIy_PIN_SCK           GPIO_Pin_10
00063   #define SPIy_PIN_MISO          GPIO_Pin_11
00064   #define SPIy_PIN_MOSI          GPIO_Pin_12
00065   
00066   #define SPIz                    SPI2
00067   #define SPIz_CLK                RCC_APB1Periph_SPI2
00068   #define SPIz_GPIO               GPIOB
00069   #define SPIz_GPIO_CLK           RCC_APB2Periph_GPIOB
00070   #define SPIz_PIN_SCK            GPIO_Pin_13
00071   #define SPIz_PIN_MISO           GPIO_Pin_14
00072   #define SPIz_PIN_MOSI           GPIO_Pin_15
00073 
00074 #endif
00075 
00076 /* Exported macro ------------------------------------------------------------*/
00077 /* Exported functions ------------------------------------------------------- */
00078 
00079 #endif /* __PLATFORM_CONFIG_H */
00080 
00081 /******************* (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