Fork of my MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:45:51 2017 +0000
Revision:
0:f1d3878b8dd9
Initial commit

Who changed what in which revision?

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