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