u-blox / easy-connect

Dependents:   HelloMQTT

Committer:
group-ublox
Date:
Thu Aug 10 14:33:05 2017 +0000
Revision:
0:19aa55d66228
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
group-ublox 0:19aa55d66228 1 /**
group-ublox 0:19aa55d66228 2 ******************************************************************************
group-ublox 0:19aa55d66228 3 * @file stm32l-spirit1-config.h
group-ublox 0:19aa55d66228 4 * @author MCD Application Team
group-ublox 0:19aa55d66228 5 * @version V3.4.0
group-ublox 0:19aa55d66228 6 * @date 29-June-2012
group-ublox 0:19aa55d66228 7 * @brief Evaluation board specific configuration file.
group-ublox 0:19aa55d66228 8 ******************************************************************************
group-ublox 0:19aa55d66228 9 * @attention
group-ublox 0:19aa55d66228 10 *
group-ublox 0:19aa55d66228 11 * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
group-ublox 0:19aa55d66228 12 *
group-ublox 0:19aa55d66228 13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
group-ublox 0:19aa55d66228 14 * You may not use this file except in compliance with the License.
group-ublox 0:19aa55d66228 15 * You may obtain a copy of the License at:
group-ublox 0:19aa55d66228 16 *
group-ublox 0:19aa55d66228 17 * http://www.st.com/software_license_agreement_liberty_v2
group-ublox 0:19aa55d66228 18 *
group-ublox 0:19aa55d66228 19 * Unless required by applicable law or agreed to in writing, software
group-ublox 0:19aa55d66228 20 * distributed under the License is distributed on an "AS IS" BASIS,
group-ublox 0:19aa55d66228 21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
group-ublox 0:19aa55d66228 22 * See the License for the specific language governing permissions and
group-ublox 0:19aa55d66228 23 * limitations under the License.
group-ublox 0:19aa55d66228 24 *
group-ublox 0:19aa55d66228 25 ******************************************************************************
group-ublox 0:19aa55d66228 26 */
group-ublox 0:19aa55d66228 27
group-ublox 0:19aa55d66228 28 /* Define to prevent recursive inclusion -------------------------------------*/
group-ublox 0:19aa55d66228 29 #ifndef __STM32L_SPIRIT1_CONFIG_H
group-ublox 0:19aa55d66228 30 #define __STM32L_SPIRIT1_CONFIG_H
group-ublox 0:19aa55d66228 31
group-ublox 0:19aa55d66228 32 /* Includes ------------------------------------------------------------------*/
group-ublox 0:19aa55d66228 33
group-ublox 0:19aa55d66228 34 /* Exported types ------------------------------------------------------------*/
group-ublox 0:19aa55d66228 35 /* Exported constants --------------------------------------------------------*/
group-ublox 0:19aa55d66228 36
group-ublox 0:19aa55d66228 37 /* Define the STM32F10x hardware depending on the used evaluation board */
group-ublox 0:19aa55d66228 38 #ifdef USE_STM3210B_EVAL
group-ublox 0:19aa55d66228 39 #define USB_DISCONNECT GPIOD
group-ublox 0:19aa55d66228 40 #define USB_DISCONNECT_PIN GPIO_PIN_9
group-ublox 0:19aa55d66228 41 #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOD
group-ublox 0:19aa55d66228 42 #define EVAL_COM1_IRQHandler USART1_IRQHandler
group-ublox 0:19aa55d66228 43
group-ublox 0:19aa55d66228 44 #elif defined (USE_STM3210E_EVAL)
group-ublox 0:19aa55d66228 45 #define USB_DISCONNECT GPIOB
group-ublox 0:19aa55d66228 46 #define USB_DISCONNECT_PIN GPIO_PIN_14
group-ublox 0:19aa55d66228 47 #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOB
group-ublox 0:19aa55d66228 48 #define EVAL_COM1_IRQHandler USART1_IRQHandler
group-ublox 0:19aa55d66228 49
group-ublox 0:19aa55d66228 50 #elif defined (USE_STM3210C_EVAL)
group-ublox 0:19aa55d66228 51 #define USB_DISCONNECT 0
group-ublox 0:19aa55d66228 52 #define USB_DISCONNECT_PIN 0
group-ublox 0:19aa55d66228 53 #define RCC_APB2Periph_GPIO_DISCONNECT 0
group-ublox 0:19aa55d66228 54 #define EVAL_COM1_IRQHandler USART2_IRQHandler
group-ublox 0:19aa55d66228 55
group-ublox 0:19aa55d66228 56 #elif defined (USE_STM32L152_EVAL) || defined (USE_STM32L152D_EVAL)
group-ublox 0:19aa55d66228 57 /*
group-ublox 0:19aa55d66228 58 For STM32L15xx devices it is possible to use the internal USB pullup
group-ublox 0:19aa55d66228 59 controlled by register SYSCFG_PMC (refer to RM0038 reference manual for
group-ublox 0:19aa55d66228 60 more details).
group-ublox 0:19aa55d66228 61 It is also possible to use external pullup (and disable the internal pullup)
group-ublox 0:19aa55d66228 62 by setting the define USB_USE_EXTERNAL_PULLUP in file platform_config.h
group-ublox 0:19aa55d66228 63 and configuring the right pin to be used for the external pull up configuration.
group-ublox 0:19aa55d66228 64 To have more details on how to use an external pull up, please refer to
group-ublox 0:19aa55d66228 65 STM3210E-EVAL evaluation board manuals.
group-ublox 0:19aa55d66228 66 */
group-ublox 0:19aa55d66228 67 /* Uncomment the following define to use an external pull up instead of the
group-ublox 0:19aa55d66228 68 integrated STM32L15xx internal pull up. In this case make sure to set up
group-ublox 0:19aa55d66228 69 correctly the external required hardware and the GPIO defines below.*/
group-ublox 0:19aa55d66228 70 /* #define USB_USE_EXTERNAL_PULLUP */
group-ublox 0:19aa55d66228 71
group-ublox 0:19aa55d66228 72 #if !defined(USB_USE_EXTERNAL_PULLUP)
group-ublox 0:19aa55d66228 73 #define STM32L15_USB_CONNECT SYSCFG_USBPuCmd(ENABLE)
group-ublox 0:19aa55d66228 74 #define STM32L15_USB_DISCONNECT SYSCFG_USBPuCmd(DISABLE)
group-ublox 0:19aa55d66228 75
group-ublox 0:19aa55d66228 76 #elif defined(USB_USE_EXTERNAL_PULLUP)
group-ublox 0:19aa55d66228 77 /* PA0 is chosen just as illustrating example, you should modify the defines
group-ublox 0:19aa55d66228 78 below according to your hardware configuration. */
group-ublox 0:19aa55d66228 79 #define USB_DISCONNECT GPIOA
group-ublox 0:19aa55d66228 80 #define USB_DISCONNECT_PIN GPIO_PIN_0
group-ublox 0:19aa55d66228 81 #define RCC_AHBPeriph_GPIO_DISCONNECT RCC_AHBPeriph_GPIOA
group-ublox 0:19aa55d66228 82 #define STM32L15_USB_CONNECT GPIO_ResetBits(USB_DISCONNECT, USB_DISCONNECT_PIN)
group-ublox 0:19aa55d66228 83 #define STM32L15_USB_DISCONNECT GPIO_SetBits(USB_DISCONNECT, USB_DISCONNECT_PIN)
group-ublox 0:19aa55d66228 84 #endif /* USB_USE_EXTERNAL_PULLUP */
group-ublox 0:19aa55d66228 85
group-ublox 0:19aa55d66228 86 #ifdef USE_STM32L152_EVAL
group-ublox 0:19aa55d66228 87 #define EVAL_COM1_IRQHandler USART2_IRQHandler
group-ublox 0:19aa55d66228 88 #elif defined (USE_STM32L152D_EVAL)
group-ublox 0:19aa55d66228 89 #define EVAL_COM1_IRQHandler USART1_IRQHandler
group-ublox 0:19aa55d66228 90 #endif /*USE_STM32L152_EVAL*/
group-ublox 0:19aa55d66228 91
group-ublox 0:19aa55d66228 92 #endif /* USE_STM3210B_EVAL */
group-ublox 0:19aa55d66228 93
group-ublox 0:19aa55d66228 94 /* Exported macro ------------------------------------------------------------*/
group-ublox 0:19aa55d66228 95 /* Exported functions ------------------------------------------------------- */
group-ublox 0:19aa55d66228 96
group-ublox 0:19aa55d66228 97 #endif /* __STM32L_SPIRIT1_CONFIG_H */
group-ublox 0:19aa55d66228 98 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/