Version of easy-connect with the u-blox cellular platforms C027 and C030 added.

Dependents:   HelloMQTT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers stm32l-spirit1-config.h Source File

stm32l-spirit1-config.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l-spirit1-config.h
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    29-June-2012
00007   * @brief   Evaluation board specific configuration file.
00008   ******************************************************************************
00009   * @attention
00010   *
00011   * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
00012   *
00013   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
00014   * You may not use this file except in compliance with the License.
00015   * You may obtain a copy of the License at:
00016   *
00017   *        http://www.st.com/software_license_agreement_liberty_v2
00018   *
00019   * Unless required by applicable law or agreed to in writing, software 
00020   * distributed under the License is distributed on an "AS IS" BASIS, 
00021   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00022   * See the License for the specific language governing permissions and
00023   * limitations under the License.
00024   *
00025   ******************************************************************************
00026   */
00027 
00028 /* Define to prevent recursive inclusion -------------------------------------*/
00029 #ifndef __STM32L_SPIRIT1_CONFIG_H
00030 #define __STM32L_SPIRIT1_CONFIG_H
00031 
00032 /* Includes ------------------------------------------------------------------*/
00033 
00034 /* Exported types ------------------------------------------------------------*/
00035 /* Exported constants --------------------------------------------------------*/
00036 
00037 /* Define the STM32F10x hardware depending on the used evaluation board */
00038 #ifdef USE_STM3210B_EVAL
00039   #define USB_DISCONNECT                      GPIOD  
00040   #define USB_DISCONNECT_PIN                  GPIO_PIN_9
00041   #define RCC_APB2Periph_GPIO_DISCONNECT      RCC_APB2Periph_GPIOD
00042   #define EVAL_COM1_IRQHandler                USART1_IRQHandler 
00043 
00044 #elif defined (USE_STM3210E_EVAL)
00045   #define USB_DISCONNECT                      GPIOB  
00046   #define USB_DISCONNECT_PIN                  GPIO_PIN_14
00047   #define RCC_APB2Periph_GPIO_DISCONNECT      RCC_APB2Periph_GPIOB
00048   #define EVAL_COM1_IRQHandler                USART1_IRQHandler 
00049 
00050 #elif defined (USE_STM3210C_EVAL)
00051   #define USB_DISCONNECT                      0  
00052   #define USB_DISCONNECT_PIN                  0
00053   #define RCC_APB2Periph_GPIO_DISCONNECT      0
00054   #define EVAL_COM1_IRQHandler                USART2_IRQHandler 
00055 
00056 #elif defined (USE_STM32L152_EVAL) || defined (USE_STM32L152D_EVAL)
00057  /* 
00058    For STM32L15xx devices it is possible to use the internal USB pullup
00059    controlled by register SYSCFG_PMC (refer to RM0038 reference manual for
00060    more details).
00061    It is also possible to use external pullup (and disable the internal pullup)
00062    by setting the define USB_USE_EXTERNAL_PULLUP in file platform_config.h
00063    and configuring the right pin to be used for the external pull up configuration.
00064    To have more details on how to use an external pull up, please refer to 
00065    STM3210E-EVAL evaluation board manuals.
00066    */
00067  /* Uncomment the following define to use an external pull up instead of the 
00068     integrated STM32L15xx internal pull up. In this case make sure to set up
00069     correctly the external required hardware and the GPIO defines below.*/
00070 /* #define USB_USE_EXTERNAL_PULLUP */
00071 
00072  #if !defined(USB_USE_EXTERNAL_PULLUP)
00073   #define STM32L15_USB_CONNECT                SYSCFG_USBPuCmd(ENABLE)
00074   #define STM32L15_USB_DISCONNECT             SYSCFG_USBPuCmd(DISABLE)
00075 
00076  #elif defined(USB_USE_EXTERNAL_PULLUP)
00077   /* PA0 is chosen just as illustrating example, you should modify the defines
00078     below according to your hardware configuration. */ 
00079   #define USB_DISCONNECT                      GPIOA
00080   #define USB_DISCONNECT_PIN                  GPIO_PIN_0
00081   #define RCC_AHBPeriph_GPIO_DISCONNECT       RCC_AHBPeriph_GPIOA
00082   #define STM32L15_USB_CONNECT                GPIO_ResetBits(USB_DISCONNECT, USB_DISCONNECT_PIN)
00083   #define STM32L15_USB_DISCONNECT             GPIO_SetBits(USB_DISCONNECT, USB_DISCONNECT_PIN)
00084  #endif /* USB_USE_EXTERNAL_PULLUP */
00085 
00086 #ifdef USE_STM32L152_EVAL 
00087  #define EVAL_COM1_IRQHandler              USART2_IRQHandler
00088 #elif defined (USE_STM32L152D_EVAL) 
00089  #define EVAL_COM1_IRQHandler              USART1_IRQHandler
00090 #endif /*USE_STM32L152_EVAL*/
00091 
00092 #endif /* USE_STM3210B_EVAL */
00093 
00094 /* Exported macro ------------------------------------------------------------*/
00095 /* Exported functions ------------------------------------------------------- */
00096 
00097 #endif /* __STM32L_SPIRIT1_CONFIG_H */
00098 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/