Fork of my original MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:43:14 2017 +0000
Revision:
0:a1734fe1ec4b
Initial commit

Who changed what in which revision?

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