Modified for BG96

Fork of mbed-dev by mbed official

Revision:
167:e84263d55307
Parent:
160:d5399cc887bb
Child:
187:0387e8f68319
--- a/targets/TARGET_STM/pinmap.c	Thu Jun 08 15:02:37 2017 +0100
+++ b/targets/TARGET_STM/pinmap.c	Wed Jun 21 17:46:44 2017 +0100
@@ -72,14 +72,17 @@
     GPIO_TypeDef *gpio = Set_GPIO_Clock(port);
 
     /*  Set default speed to high.
-     *  This is done before other settings on purpose:
      *  For most families there are dedicated registers so it is
      *  not so important, register can be set at any time.
-     *  But for families like F1, speed only applies to output. so we set
-     *  it here, and then if input is selected, this setting might be
-     *  overriden by the input one.
+     *  But for families like F1, speed only applies to output.
      */
+#if defined (TARGET_STM32F1)
+if (mode == STM_PIN_OUTPUT) {
+#endif
     LL_GPIO_SetPinSpeed(gpio, ll_pin, LL_GPIO_SPEED_FREQ_HIGH);
+#if defined (TARGET_STM32F1)
+}
+#endif
 
     switch (mode) {
         case STM_PIN_INPUT: