You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/04/20 09:49:03 UTC

[GitHub] utzig closed pull request #1003: STM32: common hal_gpio

utzig closed pull request #1003: STM32: common hal_gpio
URL: https://github.com/apache/mynewt-core/pull/1003
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/bsp/stm32f767-nucleo/include/bsp/bsp.h b/hw/bsp/stm32f767-nucleo/include/bsp/bsp.h
index a77dd9fbc..3b06ad8c8 100644
--- a/hw/bsp/stm32f767-nucleo/include/bsp/bsp.h
+++ b/hw/bsp/stm32f767-nucleo/include/bsp/bsp.h
@@ -45,8 +45,18 @@ extern uint8_t _ram2_start;
 #define ITCMRAM_SIZE    (16 * 1024)
 
 /* LED pins */
-#define LED_BLINK_PIN   MCU_GPIO_PORTB(0)
+#define LED_1           MCU_GPIO_PORTB(0)
 #define LED_2           MCU_GPIO_PORTB(7)
+#define LED_3           MCU_GPIO_PORTB(14)
+
+#define LED_green       LED_1
+#define LED_blue        LED_2
+#define LED_red         LED_3
+
+#define LED_BLINK_PIN   LED_1
+
+/* BUTTON pins */
+#define BTN_USER_1      MCU_GPIO_PORTC(13)
 
 /* UART */
 #define UART_CNT        1
diff --git a/hw/mcu/stm/stm32l1xx/src/hal_gpio.c b/hw/mcu/stm/stm32_common/src/hal_gpio.c
similarity index 83%
rename from hw/mcu/stm/stm32l1xx/src/hal_gpio.c
rename to hw/mcu/stm/stm32_common/src/hal_gpio.c
index ccc3a9619..cc2e26bfa 100644
--- a/hw/mcu/stm/stm32l1xx/src/hal_gpio.c
+++ b/hw/mcu/stm/stm32_common/src/hal_gpio.c
@@ -17,12 +17,9 @@
  * under the License.
  */
 
-#include "mcu/cmsis_nvic.h"
 #include "hal/hal_gpio.h"
-#include "stm32l1xx.h"
-#include "stm32l1xx_hal_gpio.h"
-#include "stm32l1xx_hal_rcc.h"
-#include "mcu/stm32l1xx_mynewt_hal.h"
+#include "mcu/cmsis_nvic.h"
+#include "mcu/stm32_hal.h"
 #include <assert.h>
 
  /* XXX: Notes
@@ -49,7 +46,7 @@
 /*
  * GPIO pin mapping
  *
- * The stm32F4xx processors have 16 gpio pins per port. We map the logical pin
+ * The stm32Fxxx processors have 16 gpio pins per port. We map the logical pin
  * numbers (from 0 to N) in the following manner:
  *      Port A: PA0-PA15 map to pins 0 - 15.
  *      Port B: PB0-PB15 map to pins 16 - 31.
@@ -67,49 +64,83 @@
 #define GPIO_PORT(pin)      (((pin) >> 4) & 0x0F)
 #define GPIO_MASK(pin)      (1 << GPIO_INDEX(pin))
 
-/* Define the number of ports on processor */
+#ifndef GPIOA
+#   define GPIOA    0
+#endif
+#ifndef GPIOB
+#   define GPIOB    0
+#endif
+#ifndef GPIOC
+#   define GPIOC    0
+#endif
+#ifndef GPIOD
+#   define GPIOD    0
+#endif
+#ifndef GPIOE
+#   define GPIOE    0
+#endif
+#ifndef GPIOF
+#   define GPIOF    0
+#endif
+#ifndef GPIOG
+#   define GPIOG    0
+#endif
+#ifndef GPIOH
+#   define GPIOH    0
+#endif
+#ifndef GPIOI
+#   define GPIOI    0
+#endif
+#ifndef GPIOJ
+#   define GPIOJ    0
+#endif
+#ifndef GPIOK
+#   define GPIOK    0
+#endif
+
+
 #if defined GPIOK_BASE
-#define HAL_GPIO_NUM_PORTS  (11)
+#   define  HAL_GPIO_PORT_COUNT   (11)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,GPIOJ,GPIOK
 #elif defined GPIOJ_BASE
-#define HAL_GPIO_NUM_PORTS  (10)
+#   define  HAL_GPIO_PORT_COUNT   (10)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,GPIOJ
 #elif defined GPIOI_BASE
-#define HAL_GPIO_NUM_PORTS  (9)
+#   define  HAL_GPIO_PORT_COUNT   (9)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI
 #elif defined GPIOH_BASE
-#define HAL_GPIO_NUM_PORTS  (8)
+#   define  HAL_GPIO_PORT_COUNT   (8)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH
 #elif defined GPIOG_BASE
-#define HAL_GPIO_NUM_PORTS  (7)
+#   define  HAL_GPIO_PORT_COUNT   (7)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG
 #elif defined GPIOF_BASE
-#define HAL_GPIO_NUM_PORTS  (6)
+#   define  HAL_GPIO_PORT_COUNT   (6)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF
+#elif defined GPIOE_BASE
+#   define  HAL_GPIO_PORT_COUNT   (5)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE
+#elif defined GPIOD_BASE
+#   define  HAL_GPIO_PORT_COUNT   (4)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD
+#elif defined GPIOC_BASE
+#   define  HAL_GPIO_PORT_COUNT   (3)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC
+#elif defined GPIOB_BASE
+#   define  HAL_GPIO_PORT_COUNT   (2)
+#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB
+#elif defined GPIOA_BASE
+#   define  HAL_GPIO_PORT_COUNT   (1)
+#   define  HAL_GPIO_PORT_LIST    GPIOA
 #else
-#define HAL_GPIO_NUM_PORTS  (5)
+#   error "No GPIO ports found - MCU not supported!"
 #endif
 
+
 /* Port index to port address map */
-static GPIO_TypeDef * const portmap[HAL_GPIO_NUM_PORTS] =
+static GPIO_TypeDef * const portmap[HAL_GPIO_PORT_COUNT] =
 {
-    GPIOA,
-    GPIOB,
-    GPIOC,
-    GPIOD,
-    GPIOE,
-#if defined GPIOF_BASE
-    GPIOF,
-#endif
-#if defined GPIOG_BASE
-    GPIOG,
-#endif
-#if defined GPIOH_BASE
-    GPIOH,
-#endif
-#if defined GPIOI_BASE
-    GPIOI,
-#endif
-#if defined GPIOJ_BASE
-    GPIOJ,
-#endif
-#if defined GPIOK_BASE
-    GPIOK,
-#endif
+    HAL_GPIO_PORT_LIST
 };
 
 /* Storage for GPIO callbacks. */
@@ -242,21 +273,31 @@ static void
 hal_gpio_clk_enable(uint32_t port_idx)
 {
     switch (port_idx) {
+#if defined GPIOA_BASE
         case 0:
             __HAL_RCC_GPIOA_CLK_ENABLE();
             break;
+#endif
+#if defined GPIOB_BASE
         case 1:
             __HAL_RCC_GPIOB_CLK_ENABLE();
             break;
+#endif
+#if defined GPIOC_BASE
         case 2:
             __HAL_RCC_GPIOC_CLK_ENABLE();
             break;
+#endif
+#if defined GPIOD_BASE
         case 3:
             __HAL_RCC_GPIOD_CLK_ENABLE();
             break;
+#endif
+#if defined GPIOE_BASE
         case 4:
             __HAL_RCC_GPIOE_CLK_ENABLE();
             break;
+#endif
 #if defined GPIOF_BASE
         case 5:
             __HAL_RCC_GPIOF_CLK_ENABLE();
@@ -321,6 +362,10 @@ hal_gpio_pin_to_irq(int pin)
     return irqn;
 }
 
+#if MYNEWT_VAL(MCU_STM32F3)
+#   define EXTI2_IRQn   EXTI2_TSC_IRQn
+#endif
+
 static void
 hal_gpio_set_nvic(IRQn_Type irqn)
 {
@@ -378,7 +423,7 @@ hal_gpio_init_stm(int pin, GPIO_InitTypeDef *cfg)
 
     /* Is this a valid pin? */
     port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
+    if (port >= HAL_GPIO_PORT_COUNT) {
         return -1;
     }
 
@@ -412,7 +457,7 @@ hal_gpio_deinit_stm(int pin, GPIO_InitTypeDef *cfg)
 
     /* Is this a valid pin? */
     port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
+    if (port >= HAL_GPIO_PORT_COUNT) {
         return -1;
     }
 
@@ -466,7 +511,7 @@ int hal_gpio_init_out(int pin, int val)
 
     /* Is this a valid pin? */
     port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
+    if (port >= HAL_GPIO_PORT_COUNT) {
         return -1;
     }
 
@@ -479,8 +524,16 @@ int hal_gpio_init_out(int pin, int val)
     cfg.Pin = GPIO_MASK(pin);
     cfg.Mode = GPIO_MODE_OUTPUT_PP;
     cfg.Pull = GPIO_NOPULL;
+#if defined(GPIO_SPEED_FREQ_VERY_HIGH)
+    cfg.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+#elif defined(GPIO_SPEED_HIGH)
     cfg.Speed = GPIO_SPEED_HIGH;
+#else
+    cfg.Speed = GPIO_SPEED_FREQ_HIGH;
+#endif
+#if !MYNEWT_VAL(MCU_STM32F1)
     cfg.Alternate = 0;
+#endif
 
     /* Initialize pin as an output, setting proper mode */
     HAL_GPIO_Init(portmap[port], &cfg);
@@ -503,9 +556,17 @@ hal_gpio_init_af(int pin, uint8_t af_type, enum hal_gpio_pull pull, uint8_t od)
     } else {
         gpio.Mode = GPIO_MODE_AF_OD;
     }
-    gpio.Speed = GPIO_SPEED_HIGH;
     gpio.Pull = pull;
+#if defined(GPIO_SPEED_FREQ_VERY_HIGH)
+    gpio.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+#elif defined(GPIO_SPEED_HIGH)
+    gpio.Speed = GPIO_SPEED_HIGH;
+#else
+    gpio.Speed = GPIO_SPEED_FREQ_HIGH;
+#endif
+#if !MYNEWT_VAL(MCU_STM32F1)
     gpio.Alternate = af_type;
+#endif
 
     return hal_gpio_init_stm(pin, &gpio);
 }
diff --git a/hw/mcu/stm/stm32f1xx/src/hal_gpio.c b/hw/mcu/stm/stm32f1xx/src/hal_gpio.c
deleted file mode 100644
index 6e6b4fea4..000000000
--- a/hw/mcu/stm/stm32f1xx/src/hal_gpio.c
+++ /dev/null
@@ -1,693 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "mcu/cmsis_nvic.h"
-#include "hal/hal_gpio.h"
-#include "stm32f1xx.h"
-#include "stm32f1xx_hal_gpio.h"
-#include "stm32_hal_legacy.h"
-#include "stm32f1xx_hal_rcc.h"
-#include "mcu/stm32f1xx_mynewt_hal.h"
-#include <assert.h>
-
- /* XXX: Notes
- * 1) Right now, we are not disabling the NVIC interrupt source; we only
- * disable the external interrupt from occurring. Dont think either way
- * to do it is an issue... when we release we may want to disable the NVIC
- *
- * 2) investigate how thread safe these routines are. HAL_GPIO_Init, for
- * example. Looks like if it gets interrupted while doing config an error
- * may occur. Read/modify write could cause screw-ups.
- *
- * 3) Currently, this code does not change the interrupt priority of the
- * external interrupt vectors in the NVIC. The application developer must
- * decide on the priority level for each external interrupt and program that
- * by using the CMSIS NVIC API  (NVIC_SetPriority and NVIC_SetPriorityGrouping)
- *
- * 4) The code probably does not handle "re-purposing" gpio very well.
- * "Re-purposing" means changing a gpio from input to output, or calling
- * gpio_init_in and expecting previously enabled interrupts to be stopped.
- *
- * 5) Possibly add access to HAL_GPIO_DeInit.
- */
-
-/*
- * GPIO pin mapping
- *
- * The stm32F4xx processors have 16 gpio pins per port. We map the logical pin
- * numbers (from 0 to N) in the following manner:
- *      Port A: PA0-PA15 map to pins 0 - 15.
- *      Port B: PB0-PB15 map to pins 16 - 31.
- *      Port C: PC0-PC15 map to pins 32 - 47.
- *
- *      To convert a gpio to pin number, do the following:
- *          - Convert port label to its numeric value (A=0, B=1, C=2, etc).
- *          - Multiply by 16.
- *          - Add port pin number.
- *
- *      Ex: PD11 = (3 * 16) + 11 = 59.
- *          PA0 = (0 * 16) + 0 = 0
- */
-#define GPIO_INDEX(pin)     ((pin) & 0x0F)
-#define GPIO_PORT(pin)      (((pin) >> 4) & 0x0F)
-#define GPIO_MASK(pin)      (1 << GPIO_INDEX(pin))
-
-/* Define the number of ports on processor */
-#if defined GPIOK_BASE
-#define HAL_GPIO_NUM_PORTS  (11)
-#elif defined GPIOJ_BASE
-#define HAL_GPIO_NUM_PORTS  (10)
-#elif defined GPIOI_BASE
-#define HAL_GPIO_NUM_PORTS  (9)
-#elif defined GPIOH_BASE
-#define HAL_GPIO_NUM_PORTS  (8)
-#elif defined GPIOG_BASE
-#define HAL_GPIO_NUM_PORTS  (7)
-#elif defined GPIOF_BASE
-#define HAL_GPIO_NUM_PORTS  (6)
-#else
-#define HAL_GPIO_NUM_PORTS  (5)
-#endif
-
-/* Port index to port address map */
-static GPIO_TypeDef * const portmap[HAL_GPIO_NUM_PORTS] =
-{
-    GPIOA,
-    GPIOB,
-    GPIOC,
-    GPIOD,
-    GPIOE,
-#if defined GPIOF_BASE
-    GPIOF,
-#endif
-#if defined GPIOG_BASE
-    GPIOG,
-#endif
-#if defined GPIOH_BASE
-    GPIOH,
-#endif
-#if defined GPIOI_BASE
-    GPIOI,
-#endif
-#if defined GPIOJ_BASE
-    GPIOJ,
-#endif
-#if defined GPIOK_BASE
-    GPIOK,
-#endif
-};
-
-/* Storage for GPIO callbacks. */
-struct gpio_irq_obj
-{
-    void *arg;
-    hal_gpio_irq_handler_t isr;
-};
-
-static struct gpio_irq_obj gpio_irq_handlers[16];
-
-struct ext_irqs
-{
-    volatile uint32_t irq0;
-    volatile uint32_t irq1;
-    volatile uint32_t irq2;
-    volatile uint32_t irq3;
-    volatile uint32_t irq4;
-    volatile uint32_t irq9_5;
-    volatile uint32_t irq15_10;
-};
-struct ext_irqs ext_irq_counts;
-
-/**
- * ext irq handler
- *
- * Handles the gpio interrupt attached to a gpio pin.
- *
- * @param index
- */
-static void
-ext_irq_handler(int index)
-{
-    uint32_t mask;
-
-    mask = 1 << index;
-    if (__HAL_GPIO_EXTI_GET_IT(mask) != RESET) {
-        __HAL_GPIO_EXTI_CLEAR_IT(mask);
-        gpio_irq_handlers[index].isr(gpio_irq_handlers[index].arg);
-    }
-}
-
-/* External interrupt 0 */
-static void
-ext_irq0(void)
-{
-    ++ext_irq_counts.irq0;
-    ext_irq_handler(0);
-}
-
-/* External interrupt 1 */
-static void
-ext_irq1(void)
-{
-    ++ext_irq_counts.irq1;
-    ext_irq_handler(1);
-}
-
-/* External interrupt 2 */
-static void
-ext_irq2(void)
-{
-    ++ext_irq_counts.irq2;
-    ext_irq_handler(2);
-}
-
-/* External interrupt 3 */
-static void
-ext_irq3(void)
-{
-    ++ext_irq_counts.irq3;
-    ext_irq_handler(3);
-}
-
-/**
- * ext irq4
- *
- *  External interrupt handler for external interrupt 4.
- *
- */
-static void
-ext_irq4(void)
-{
-    ++ext_irq_counts.irq4;
-    ext_irq_handler(4);
-}
-
-/**
- * ext irq9_5
- *
- *  External interrupt handler for irqs 9 through 5.
- *
- */
-static void
-ext_irq9_5(void)
-{
-    int index;
-
-    ++ext_irq_counts.irq9_5;
-    for (index = 5; index <= 9; ++index) {
-        ext_irq_handler(index);
-    }
-}
-
-/**
- * ext irq15_10
- *
- *  External interrupt handler for irqs 15 through 10.
- *
- */
-static void
-ext_irq15_10(void)
-{
-    int index;
-
-    ++ext_irq_counts.irq15_10;
-    for (index = 10; index <= 15; ++index) {
-        ext_irq_handler(index);
-    }
-}
-
-/**
- * hal gpio clk enable
- *
- * Enable the port peripheral clock
- *
- * @param port_idx
- */
-static void
-hal_gpio_clk_enable(uint32_t port_idx)
-{
-    switch (port_idx) {
-        case 0:
-            __HAL_RCC_GPIOA_CLK_ENABLE();
-            break;
-        case 1:
-            __HAL_RCC_GPIOB_CLK_ENABLE();
-            break;
-        case 2:
-            __HAL_RCC_GPIOC_CLK_ENABLE();
-            break;
-        case 3:
-            __HAL_RCC_GPIOD_CLK_ENABLE();
-            break;
-        case 4:
-            __HAL_RCC_GPIOE_CLK_ENABLE();
-            break;
-#if defined GPIOF_BASE
-        case 5:
-            __HAL_RCC_GPIOF_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOG_BASE
-        case 6:
-            __HAL_RCC_GPIOG_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOH_BASE
-        case 7:
-            __HAL_RCC_GPIOH_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOI_BASE
-        case 8:
-            __HAL_RCC_GPIOI_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOJ_BASE
-        case 9:
-            __HAL_RCC_GPIOJ_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOK_BASE
-        case 10:
-            __HAL_RCC_GPIOK_CLK_ENABLE();
-            break;
-#endif
-        default:
-            assert(0);
-            break;
-    }
-}
-
-/**
- * hal gpio pin to irq
- *
- * Converts the logical pin number to the IRQ number associated with the
- * external interrupt for that particular GPIO.
- *
- * @param pin
- *
- * @return IRQn_Type
- */
-static IRQn_Type
-hal_gpio_pin_to_irq(int pin)
-{
-    int index;
-    IRQn_Type irqn;
-
-    index = GPIO_INDEX(pin);
-    if (index <= 4) {
-        irqn = EXTI0_IRQn + index;
-    } else if (index <=  9) {
-        irqn = EXTI9_5_IRQn;
-    } else {
-        irqn = EXTI15_10_IRQn;
-    }
-
-    return irqn;
-}
-
-static void
-hal_gpio_set_nvic(IRQn_Type irqn)
-{
-    uint32_t isr;
-
-    switch (irqn) {
-    case EXTI0_IRQn:
-        isr = (uint32_t)&ext_irq0;
-        break;
-    case EXTI1_IRQn:
-        isr = (uint32_t)&ext_irq1;
-        break;
-    case EXTI2_IRQn:
-        isr = (uint32_t)&ext_irq2;
-        break;
-    case EXTI3_IRQn:
-        isr = (uint32_t)&ext_irq3;
-        break;
-    case EXTI4_IRQn:
-        isr = (uint32_t)&ext_irq4;
-        break;
-    case EXTI9_5_IRQn:
-        isr = (uint32_t)&ext_irq9_5;
-        break;
-    case EXTI15_10_IRQn:
-        isr = (uint32_t)&ext_irq15_10;
-        break;
-    default:
-        assert(0);
-        break;
-    }
-
-    /* Set isr in vector table if not yet set */
-    if (NVIC_GetVector(irqn) != isr) {
-        NVIC_SetVector(irqn, isr);
-        NVIC_EnableIRQ(irqn);
-    }
-}
-
-/**
- * hal gpio init
- *
- * Called to initialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_init_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    mcu_pin_mask = GPIO_MASK(pin);
-    cfg->Pin = mcu_pin_mask;
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_Init(portmap[port], cfg);
-
-    return 0;
-}
-
-/**
- * hal gpio deinit
- *
- * Called to deinitialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_deinit_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    mcu_pin_mask = GPIO_MASK(pin);
-    cfg->Pin = mcu_pin_mask;
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_DeInit(portmap[port], cfg->Pin);
-
-    return 0;
-}
-
-/**
- * gpio init in
- *
- * Initializes the specified pin as an input
- *
- * @param pin   Pin number to set as input
- * @param pull  pull type
- *
- * @return int  0: no error; -1 otherwise.
- */
-int
-hal_gpio_init_in(int pin, hal_gpio_pull_t pull)
-{
-    int rc;
-    GPIO_InitTypeDef init_cfg;
-
-    init_cfg.Mode = GPIO_MODE_INPUT;
-    init_cfg.Pull = pull;
-
-    rc = hal_gpio_init_stm(pin, &init_cfg);
-    return rc;
-}
-
-/**
- * gpio init out
- *
- * Initialize the specified pin as an output, setting the pin to the specified
- * value.
- *
- * @param pin Pin number to set as output
- * @param val Value to set pin
- *
- * @return int  0: no error; -1 otherwise.
- */
-int hal_gpio_init_out(int pin, int val)
-{
-    GPIO_InitTypeDef cfg;
-    int port;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    /* Write initial output value */
-    hal_gpio_write(pin, val);
-
-    cfg.Pin = GPIO_MASK(pin);
-    cfg.Mode = GPIO_MODE_OUTPUT_PP;
-    cfg.Pull = GPIO_NOPULL;
-    cfg.Speed = GPIO_SPEED_HIGH;
-
-    /* Initialize pin as an output, setting proper mode */
-    HAL_GPIO_Init(portmap[port], &cfg);
-
-    return 0;
-}
-
-/**
- * gpio write
- *
- * Write a value (either high or low) to the specified pin.
- *
- * @param pin Pin to set
- * @param val Value to set pin (0:low 1:high)
- */
-void hal_gpio_write(int pin, int val)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-    GPIO_PinState state;
-
-    port = GPIO_PORT(pin);
-    mcu_pin_mask = GPIO_MASK(pin);
-
-    if (val) {
-        state = GPIO_PIN_SET;
-    } else {
-        state = GPIO_PIN_RESET;
-    }
-
-    HAL_GPIO_WritePin(portmap[port], mcu_pin_mask, state);
-}
-
-/**
- * gpio read
- *
- * Reads the specified pin.
- *
- * @param pin Pin number to read
- *
- * @return int 0: low, 1: high
- */
-int hal_gpio_read(int pin)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    port = GPIO_PORT(pin);
-    mcu_pin_mask = GPIO_MASK(pin);
-    return HAL_GPIO_ReadPin(portmap[port], mcu_pin_mask);
-}
-
-/**
- * gpio toggle
- *
- * Toggles the specified pin
- *
- * @param pin Pin number to toggle
- *
- * @return current pin state int 0: low 1 : high
- */
-int hal_gpio_toggle(int pin)
-{
-    int pin_state = (hal_gpio_read(pin) != 1);
-    hal_gpio_write(pin, pin_state);
-    return pin_state;
-}
-
-/**
- * gpio irq init
- *
- * Initialize an external interrupt on a gpio pin
- *
- * @param pin       Pin number to enable gpio.
- * @param handler   Interrupt handler
- * @param arg       Argument to pass to interrupt handler
- * @param trig      Trigger mode of interrupt
- * @param pull      Push/pull mode of input.
- *
- * @return int
- */
-int
-hal_gpio_irq_init(int pin, hal_gpio_irq_handler_t handler, void *arg,
-                  hal_gpio_irq_trig_t trig, hal_gpio_pull_t pull)
-{
-    int rc;
-    int irqn;
-    int index;
-    uint32_t pin_mask;
-    uint32_t mode;
-    GPIO_InitTypeDef init_cfg;
-
-    /* Configure the gpio for an external interrupt */
-    rc = 0;
-    switch (trig) {
-    case HAL_GPIO_TRIG_NONE:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_RISING:
-        mode = GPIO_MODE_IT_RISING;
-        break;
-    case HAL_GPIO_TRIG_FALLING:
-        mode = GPIO_MODE_IT_FALLING;
-        break;
-    case HAL_GPIO_TRIG_BOTH:
-        mode = GPIO_MODE_IT_RISING_FALLING;
-        break;
-    case HAL_GPIO_TRIG_LOW:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_HIGH:
-        rc = -1;
-        break;
-    default:
-        rc = -1;
-        break;
-    }
-
-    /* Check to make sure no error has occurred */
-    if (!rc) {
-        /* Disable interrupt and clear any pending */
-        hal_gpio_irq_disable(pin);
-        pin_mask = GPIO_MASK(pin);
-        __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-        /* Set the gpio irq handler */
-        index = GPIO_INDEX(pin);
-        gpio_irq_handlers[index].isr = handler;
-        gpio_irq_handlers[index].arg = arg;
-
-        /* Configure the GPIO */
-        init_cfg.Mode = mode;
-        init_cfg.Pull = pull;
-        rc = hal_gpio_init_stm(pin, &init_cfg);
-        if (!rc) {
-            /* Enable interrupt vector in NVIC */
-            irqn = hal_gpio_pin_to_irq(pin);
-            hal_gpio_set_nvic(irqn);
-        }
-    }
-
-    return rc;
-}
-
-/**
- * gpio irq release
- *
- * No longer interrupt when something occurs on the pin. NOTE: this function
- * does not change the GPIO push/pull setting nor does it change the
- * SYSCFG EXTICR registers. It also does not disable the NVIC interrupt enable
- * setting for the irq.
- *
- * @param pin
- */
-void
-hal_gpio_irq_release(int pin)
-{
-    int index;
-    uint32_t pin_mask;
-
-    /* Disable the interrupt */
-    hal_gpio_irq_disable(pin);
-
-    /* Clear any pending interrupts */
-    pin_mask = GPIO_MASK(pin);
-    __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-    /* Clear out the irq handler */
-    index = GPIO_INDEX(pin);
-    gpio_irq_handlers[index].arg = NULL;
-    gpio_irq_handlers[index].isr = NULL;
-}
-
-/**
- * gpio irq enable
- *
- * Enable the irq on the specified pin
- *
- * @param pin
- */
-void
-hal_gpio_irq_enable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = GPIO_MASK(pin);
-
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR |= mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
-
-/**
- * gpio irq disable
- *
- *
- * @param pin
- */
-void
-hal_gpio_irq_disable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = GPIO_MASK(pin);
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR &= ~mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
diff --git a/hw/mcu/stm/stm32f3xx/src/hal_gpio.c b/hw/mcu/stm/stm32f3xx/src/hal_gpio.c
deleted file mode 100644
index 09d025e99..000000000
--- a/hw/mcu/stm/stm32f3xx/src/hal_gpio.c
+++ /dev/null
@@ -1,688 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/*
- * Currently no support for
- * - interrupts
- * - pin output speed
- */
-
-#include "hal_gpio_stm32.h"
-#include "hal/hal_gpio.h"
-#include "mcu/cmsis_nvic.h"
-#include "stm32f3xx.h"
-#include "stm32f3xx_hal_cortex.h"
-#include "stm32f3xx_hal_gpio.h"
-#include "stm32f3xx_hal_rcc.h"
-#include "mcu/stm32f3xx_mynewt_hal.h"
-#include <assert.h>
-
- /* XXX: Notes
- * 1) Right now, we are not disabling the NVIC interrupt source; we only
- * disable the external interrupt from occurring. Dont think either way
- * to do it is an issue... when we release we may want to disable the NVIC
- *
- * 2) investigate how thread safe these routines are. HAL_GPIO_Init, for
- * example. Looks like if it gets interrupted while doing config an error
- * may occur. Read/modify write could cause screw-ups.
- *
- * 3) Currently, this code does not change the interrupt priority of the
- * external interrupt vectors in the NVIC. The application developer must
- * decide on the priority level for each external interrupt and program that
- * by using the CMSIS NVIC API  (NVIC_SetPriority and NVIC_SetPriorityGrouping)
- *
- * 4) The code probably does not handle "re-purposing" gpio very well.
- * "Re-purposing" means changing a gpio from input to output, or calling
- * gpio_init_in and expecting previously enabled interrupts to be stopped.
- *
- * 5) Possibly add access to HAL_GPIO_DeInit.
- */
-
-/*
- * GPIO pin mapping
- *
- * The stm32F3xx processors have 16 gpio pins per port. We map the logical pin
- * numbers (from 0 to N) in the following manner:
- *      Port A: PA0-PA15 map to pins 0 - 15.
- *      Port B: PB0-PB15 map to pins 16 - 31.
- *      Port C: PC0-PC15 map to pins 32 - 47.
- *
- *      To convert a gpio to pin number, do the following:
- *          - Convert port label to its numeric value (A=0, B=1, C=2, etc).
- *          - Multiply by 16.
- *          - Add port pin number.
- *
- *      Ex: PD11 = (3 * 16) + 11 = 59.
- *          PA0 = (0 * 16) + 0 = 0
- */
-#define HAL_GPIO_PIN_NUM(pin)   ((pin) & 0x0F)
-#define HAL_GPIO_PORT(pin)      (((pin) >> 4) & 0x0F)
-#define HAL_GPIO_PIN(pin)       (1 << HAL_GPIO_PIN_NUM(pin))
-
-/* Port index to port address map */
-static GPIO_TypeDef * const portmap[HAL_GPIO_PORT_COUNT] =
-{
-    HAL_GPIO_PORT_LIST
-};
-
-/* Storage for GPIO ISRS. */
-struct hal_gpio_irq_isr_t
-{
-    hal_gpio_irq_handler_t  isr;
-    void                    *arg;
-    volatile uint32_t       invoked;
-    volatile uint32_t       dropped;
-};
-struct hal_gpio_irq_isr_t hal_gpio_irq[16];
-
-void hal_gpio_ext_irq_handler(uint16_t index)
-{
-    uint32_t mask;
-
-    mask = HAL_GPIO_PIN(index);
-    if (__HAL_GPIO_EXTI_GET_IT(mask) != RESET) {
-        __HAL_GPIO_EXTI_CLEAR_IT(mask);
-      if (hal_gpio_irq[index].isr) {
-          ++hal_gpio_irq[index].invoked;
-          hal_gpio_irq[index].isr(hal_gpio_irq[index].arg);
-      } else {
-          ++hal_gpio_irq[index].dropped;
-      }
-    }
-}
-
-
-/* External interrupt 0 */
-static void
-hal_gpio_ext_irq0(void)
-{
-    hal_gpio_ext_irq_handler(0);
-}
-
-/* External interrupt 1 */
-static void
-hal_gpio_ext_irq1(void)
-{
-    hal_gpio_ext_irq_handler(1);
-}
-
-/* External interrupt 2 */
-static void
-hal_gpio_ext_irq2(void)
-{
-    hal_gpio_ext_irq_handler(2);
-}
-
-/* External interrupt 3 */
-static void
-hal_gpio_ext_irq3(void)
-{
-    hal_gpio_ext_irq_handler(3);
-}
-
-/* External interrupt 4 */
-static void
-hal_gpio_ext_irq4(void)
-{
-    hal_gpio_ext_irq_handler(4);
-}
-
-/* External interrupt 9 through 5 */
-static void
-hal_gpio_ext_irq9_5(void)
-{
-    int index;
-
-    for (index = 5; index <= 9; ++index) {
-        hal_gpio_ext_irq_handler(index);
-    }
-}
-
-/* External interrupt 15 through 10 */
-static void
-hal_gpio_ext_irq15_10(void)
-{
-    int index;
-
-    for (index = 10; index <= 15; ++index) {
-        hal_gpio_ext_irq_handler(index);
-    }
-}
-
-/**
- * hal gpio clk enable
- *
- * Enable the port peripheral clock
- *
- * @param port_idx
- */
-static void
-hal_gpio_clk_enable(uint32_t port_idx)
-{
-    switch (port_idx) {
-        case 0:
-            if (!__HAL_RCC_GPIOA_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOA_CLK_ENABLE();
-            }
-            break;
-#if HAL_GPIO_PORT_COUNT > 1
-        case 1:
-            if (!__HAL_RCC_GPIOB_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOB_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 2
-        case 2:
-            if (!__HAL_RCC_GPIOC_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOC_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 3
-        case 3:
-            if (!__HAL_RCC_GPIOD_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOD_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 4 && defined GPIOE_BASE
-        case 4:
-            if (!__HAL_RCC_GPIOE_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOE_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 5
-        case 5:
-            if (!__HAL_RCC_GPIOF_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOF_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 6
-        case 6:
-            if (!__HAL_RCC_GPIOG_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOG_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 7
-        case 7:
-            if (!__HAL_RCC_GPIOH_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOH_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 8
-        case 8:
-            if (!__HAL_RCC_GPIOI_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOI_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 9
-        case 9:
-            if (!__HAL_RCC_GPIOJ_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOJ_CLK_ENABLE();
-            }
-            break;
-#endif
-#if HAL_GPIO_PORT_COUNT > 10
-        case 10:
-            if (!__HAL_RCC_GPIOK_IS_CLK_ENABLED()) {
-                __HAL_RCC_GPIOK_CLK_ENABLE();
-            }
-            break;
-#endif
-        default:
-            assert(0);
-            break;
-    }
-}
-
-/**
- * hal gpio pin to irq
- *
- * Converts the logical pin number to the IRQ number associated with the
- * external interrupt for that particular GPIO.
- *
- * @param pin
- *
- * @return IRQn_Type
- */
-static IRQn_Type
-hal_gpio_pin_to_irq(int pin)
-{
-    int index;
-    IRQn_Type irqn;
-
-    index = HAL_GPIO_PIN_NUM(pin);
-    if (index <= 4) {
-        irqn = EXTI0_IRQn + index;
-    } else if (index <=  9) {
-        irqn = EXTI9_5_IRQn;
-    } else {
-        irqn = EXTI15_10_IRQn;
-    }
-
-    return irqn;
-}
-
-static void
-hal_gpio_set_nvic(IRQn_Type irqn)
-{
-    void (*isr)(void);
-
-    switch (irqn) {
-    case EXTI0_IRQn:
-        isr = hal_gpio_ext_irq0;
-        break;
-    case EXTI1_IRQn:
-        isr = hal_gpio_ext_irq1;
-        break;
-    case EXTI2_TSC_IRQn:
-        isr = hal_gpio_ext_irq2;
-        break;
-    case EXTI3_IRQn:
-        isr = hal_gpio_ext_irq3;
-        break;
-    case EXTI4_IRQn:
-        isr = hal_gpio_ext_irq4;
-        break;
-    case EXTI9_5_IRQn:
-        isr = hal_gpio_ext_irq9_5;
-        break;
-    case EXTI15_10_IRQn:
-        isr = hal_gpio_ext_irq15_10;
-        break;
-    default:
-        assert(0);
-        break;
-    }
-
-    /* Set isr in vector table if not yet set */
-    if (NVIC_GetVector(irqn) != (uint32_t)isr) {
-        NVIC_SetVector(irqn, (uint32_t)isr);
-        NVIC_EnableIRQ(irqn);
-    }
-}
-
-
-static int
-hal_gpio_init_stm32_int(int pin, GPIO_InitTypeDef *cfg, GPIO_PinState *state)
-{
-    int port;
-    uint32_t mcu_gpio_pin;
-
-    /* Is this a valid pin? */
-    port = HAL_GPIO_PORT(pin);
-    if (port >= HAL_GPIO_PORT_COUNT) {
-        return -1;
-    }
-
-    mcu_gpio_pin = HAL_GPIO_PIN(pin);
-    cfg->Pin = mcu_gpio_pin;
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    /* Write initial state if required */
-    if (NULL != state) {
-        HAL_GPIO_WritePin(portmap[port], mcu_gpio_pin, *state);
-    }
-
-    /* Initialize pin setting proper mode */
-    HAL_GPIO_Init(portmap[port], cfg);
-
-    return 0;
-}
-
-/**
- * hal gpio init
- *
- * Called to initialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_init_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-  return hal_gpio_init_stm32_int(pin, cfg, NULL);
-}
-/**
- * hal gpio deinit
- *
- * Called to deinitialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_deinit_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_gpio_pin;
-
-    /* Is this a valid pin? */
-    port = HAL_GPIO_PORT(pin);
-    if (port >= HAL_GPIO_PORT_COUNT) {
-        return -1;
-    }
-
-    mcu_gpio_pin = HAL_GPIO_PIN(pin);
-    cfg->Pin = mcu_gpio_pin;
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_DeInit(portmap[port], cfg->Pin);
-
-    return 0;
-}
-
-/**
- * gpio init in
- *
- * Initializes the specified pin as an input
- *
- * @param pin   Pin number to set as input
- * @param pull  pull type
- *
- * @return int  0: no error; -1 otherwise.
- */
-int
-hal_gpio_init_in(int pin, hal_gpio_pull_t pull)
-{
-    int rc;
-    GPIO_InitTypeDef init_cfg;
-
-    init_cfg.Mode = GPIO_MODE_INPUT;
-    init_cfg.Pull = pull;
-
-    rc = hal_gpio_init_stm(pin, &init_cfg);
-    return rc;
-}
-
-/**
- * gpio init out
- *
- * Initialize the specified pin as an output, setting the pin to the specified
- * value.
- *
- * @param pin Pin number to set as output
- * @param val Value to set pin
- *
- * @return int  0: no error; -1 otherwise.
- */
-int hal_gpio_init_out(int pin, int val)
-{
-    GPIO_InitTypeDef cfg;
-    GPIO_PinState state;
-
-    cfg.Mode  = GPIO_MODE_OUTPUT_PP;
-    cfg.Pull  = GPIO_NOPULL;
-    cfg.Speed = GPIO_SPEED_FREQ_HIGH;
-
-    state = val ? GPIO_PIN_SET : GPIO_PIN_RESET;
-
-    return hal_gpio_init_stm32_int(pin, &cfg, &state);
-}
-
-/**
- * gpio enumeration translation
- *
- * Convert hal pull types to mcu pull type
- *
- * @param pull
- *
- * @return uint32_t
- */
-static uint32_t
-hal_gpio_pull_to_stm_pull(enum hal_gpio_pull pull)
-{
-    switch (pull) {
-        case HAL_GPIO_PULL_NONE:  return GPIO_NOPULL;
-        case HAL_GPIO_PULL_UP:    return GPIO_PULLUP;
-        case HAL_GPIO_PULL_DOWN:  return GPIO_PULLDOWN;
-    }
-    /* never reached */
-    return GPIO_NOPULL;
-}
-
-/**
- * gpio init af
- *
- * Configure the specified pin for AF.
- */
-int
-hal_gpio_init_af(int pin, uint8_t af_type, enum hal_gpio_pull pull, uint8_t od)
-{
-    GPIO_InitTypeDef cfg;
-
-    cfg.Mode      = od ? GPIO_MODE_AF_OD : GPIO_MODE_AF_PP;
-    cfg.Speed     = GPIO_SPEED_FREQ_HIGH;
-    cfg.Pull      = hal_gpio_pull_to_stm_pull(pull);
-    cfg.Alternate = af_type;
-
-    return hal_gpio_init_stm(pin, &cfg);
-}
-
-/**
- * gpio write
- *
- * Write a value (either high or low) to the specified pin.
- *
- * @param pin Pin to set
- * @param val Value to set pin (0:low 1:high)
- */
-void hal_gpio_write(int pin, int val)
-{
-    int port;
-    uint32_t mcu_gpio_pin;
-    GPIO_PinState state;
-
-    port         = HAL_GPIO_PORT(pin);
-    mcu_gpio_pin = HAL_GPIO_PIN(pin);
-    state        = val ? GPIO_PIN_SET : GPIO_PIN_RESET;
-
-    HAL_GPIO_WritePin(portmap[port], mcu_gpio_pin, state);
-}
-
-/**
- * gpio read
- *
- * Reads the specified pin.
- *
- * @param pin Pin number to read
- *
- * @return int 0: low, 1: high
- */
-int hal_gpio_read(int pin)
-{
-    int port;
-    uint32_t mcu_gpio_pin;
-
-    port = HAL_GPIO_PORT(pin);
-    mcu_gpio_pin = HAL_GPIO_PIN(pin);
-    return HAL_GPIO_ReadPin(portmap[port], mcu_gpio_pin);
-}
-
-/**
- * gpio toggle
- *
- * Toggles the specified pin
- *
- * @param pin Pin number to toggle
- *
- * @return current pin state int 0: low 1 : high
- */
-int hal_gpio_toggle(int pin)
-{
-    int pin_state = (hal_gpio_read(pin) != 1);
-    hal_gpio_write(pin, pin_state);
-    return pin_state;
-}
-
-/**
- * gpio irq init
- *
- * Initialize an external interrupt on a gpio pin
- *
- * @param pin       Pin number to enable gpio.
- * @param handler   Interrupt handler
- * @param arg       Argument to pass to interrupt handler
- * @param trig      Trigger mode of interrupt
- * @param pull      Push/pull mode of input.
- *
- * @return int
- */
-int
-hal_gpio_irq_init(int pin, hal_gpio_irq_handler_t handler, void *arg,
-                  hal_gpio_irq_trig_t trig, hal_gpio_pull_t pull)
-{
-    int rc;
-    int irqn;
-    int index;
-    uint32_t pin_mask;
-    uint32_t mode;
-    GPIO_InitTypeDef cfg;
-
-    /* Configure the gpio for an external interrupt */
-    rc = 0;
-    switch (trig) {
-    case HAL_GPIO_TRIG_NONE:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_RISING:
-        mode = GPIO_MODE_IT_RISING;
-        break;
-    case HAL_GPIO_TRIG_FALLING:
-        mode = GPIO_MODE_IT_FALLING;
-        break;
-    case HAL_GPIO_TRIG_BOTH:
-        mode = GPIO_MODE_IT_RISING_FALLING;
-        break;
-    case HAL_GPIO_TRIG_LOW:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_HIGH:
-        rc = -1;
-        break;
-    default:
-        rc = -1;
-        break;
-    }
-
-    /* Check to make sure no error has occurred */
-    if (!rc) {
-        /* Disable interrupt and clear any pending */
-        hal_gpio_irq_disable(pin);
-        pin_mask = HAL_GPIO_PIN(pin);
-        __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-        /* Set the gpio irq handler */
-        index = HAL_GPIO_PIN_NUM(pin);
-        hal_gpio_irq[index].isr = handler;
-        hal_gpio_irq[index].arg = arg;
-        hal_gpio_irq[index].invoked = 0;
-
-        /* Configure the GPIO */
-        cfg.Mode = mode;
-        cfg.Pull = pull;
-        rc = hal_gpio_init_stm(pin, &cfg);
-        if (!rc) {
-            /* Enable interrupt vector in NVIC */
-            irqn = hal_gpio_pin_to_irq(pin);
-            hal_gpio_set_nvic(irqn);
-        }
-    }
-
-    return rc;
-}
-
-/**
- * gpio irq release
- *
- * No longer interrupt when something occurs on the pin. NOTE: this function
- * does not change the GPIO push/pull setting nor does it change the
- * SYSCFG EXTICR registers. It also does not disable the NVIC interrupt enable
- * setting for the irq.
- *
- * @param pin
- */
-void
-hal_gpio_irq_release(int pin)
-{
-    int index;
-    uint32_t pin_mask;
-
-    /* Disable the interrupt */
-    hal_gpio_irq_disable(pin);
-
-    /* Clear any pending interrupts */
-    pin_mask = HAL_GPIO_PIN(pin);
-    __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-    /* Clear out the irq handler */
-    index = HAL_GPIO_PIN_NUM(pin);
-    hal_gpio_irq[index].arg = NULL;
-    hal_gpio_irq[index].isr = NULL;
-}
-
-/**
- * gpio irq enable
- *
- * Enable the irq on the specified pin
- *
- * @param pin
- */
-void
-hal_gpio_irq_enable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = HAL_GPIO_PIN(pin);
-
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR |= mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
-
-/**
- * gpio irq disable
- *
- *
- * @param pin
- */
-void
-hal_gpio_irq_disable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = HAL_GPIO_PIN(pin);
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR &= ~mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
diff --git a/hw/mcu/stm/stm32f3xx/src/hal_gpio_stm32.h b/hw/mcu/stm/stm32f3xx/src/hal_gpio_stm32.h
deleted file mode 100644
index 1dd23fc06..000000000
--- a/hw/mcu/stm/stm32f3xx/src/hal_gpio_stm32.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef H_HAL_GPIO_STM32_
-#define H_HAL_GPIO_STM32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "stm32f3xx.h"
-#include "stm32f3xx_hal_gpio.h"
-#include "stm32f3xx_hal_gpio_ex.h"
-
-#if defined GPIOL
-#   error "GPIOL defined - MCU not supported!"
-#endif
-
-#define HAL_GPIO_PORT_COUNT_MAX (11)
-
-#if defined GPIOK_BASE
-#   define  HAL_GPIO_PORT_COUNT   (11)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,GPIOJ,GPIOK
-#elif defined GPIOJ_BASE
-#   define  HAL_GPIO_PORT_COUNT   (10)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,GPIOJ
-#elif defined GPIOI_BASE
-#   define  HAL_GPIO_PORT_COUNT   (9)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI
-#elif defined GPIOH_BASE
-#   define  HAL_GPIO_PORT_COUNT   (8)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH
-#elif defined GPIOG_BASE
-#   define  HAL_GPIO_PORT_COUNT   (7)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG
-#elif defined GPIOF_BASE
-#   define  HAL_GPIO_PORT_COUNT   (6)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF
-#   ifndef GPIOE_BASE /* imagine a processor that has GPIOE but no GPIOF ... */
-#       define GPIOE 0
-#   endif
-#elif defined GPIOE_BASE
-#   define  HAL_GPIO_PORT_COUNT   (5)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD,GPIOE
-#elif defined GPIOD_BASE
-#   define  HAL_GPIO_PORT_COUNT   (4)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC,GPIOD
-#elif defined GPIOC_BASE
-#   define  HAL_GPIO_PORT_COUNT   (3)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB,GPIOC
-#elif defined GPIOB_BASE
-#   define  HAL_GPIO_PORT_COUNT   (2)
-#   define  HAL_GPIO_PORT_LIST    GPIOA,GPIOB
-#elif defined GPIOA_BASE
-#   define  HAL_GPIO_PORT_COUNT   (1)
-#   define  HAL_GPIO_PORT_LIST    GPIOA
-#else
-#   error "No GPIO ports found - MCU not supported!"
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H_HAL_GPIO_STM32_ */
diff --git a/hw/mcu/stm/stm32f4xx/src/hal_gpio.c b/hw/mcu/stm/stm32f4xx/src/hal_gpio.c
deleted file mode 100644
index 6b19b031a..000000000
--- a/hw/mcu/stm/stm32f4xx/src/hal_gpio.c
+++ /dev/null
@@ -1,715 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "mcu/cmsis_nvic.h"
-#include "hal/hal_gpio.h"
-#include "stm32f4xx.h"
-#include "stm32f4xx_hal_gpio.h"
-#include "stm32f4xx_hal_rcc.h"
-#include "mcu/stm32f4xx_mynewt_hal.h"
-#include <assert.h>
-
- /* XXX: Notes
- * 1) Right now, we are not disabling the NVIC interrupt source; we only
- * disable the external interrupt from occurring. Dont think either way
- * to do it is an issue... when we release we may want to disable the NVIC
- *
- * 2) investigate how thread safe these routines are. HAL_GPIO_Init, for
- * example. Looks like if it gets interrupted while doing config an error
- * may occur. Read/modify write could cause screw-ups.
- *
- * 3) Currently, this code does not change the interrupt priority of the
- * external interrupt vectors in the NVIC. The application developer must
- * decide on the priority level for each external interrupt and program that
- * by using the CMSIS NVIC API  (NVIC_SetPriority and NVIC_SetPriorityGrouping)
- *
- * 4) The code probably does not handle "re-purposing" gpio very well.
- * "Re-purposing" means changing a gpio from input to output, or calling
- * gpio_init_in and expecting previously enabled interrupts to be stopped.
- *
- * 5) Possibly add access to HAL_GPIO_DeInit.
- */
-
-/*
- * GPIO pin mapping
- *
- * The stm32F4xx processors have 16 gpio pins per port. We map the logical pin
- * numbers (from 0 to N) in the following manner:
- *      Port A: PA0-PA15 map to pins 0 - 15.
- *      Port B: PB0-PB15 map to pins 16 - 31.
- *      Port C: PC0-PC15 map to pins 32 - 47.
- *
- *      To convert a gpio to pin number, do the following:
- *          - Convert port label to its numeric value (A=0, B=1, C=2, etc).
- *          - Multiply by 16.
- *          - Add port pin number.
- *
- *      Ex: PD11 = (3 * 16) + 11 = 59.
- *          PA0 = (0 * 16) + 0 = 0
- */
-#define GPIO_INDEX(pin)     ((pin) & 0x0F)
-#define GPIO_PORT(pin)      (((pin) >> 4) & 0x0F)
-#define GPIO_MASK(pin)      (1 << GPIO_INDEX(pin))
-
-/* Define the number of ports on processor */
-#if defined GPIOK_BASE
-#define HAL_GPIO_NUM_PORTS  (11)
-#elif defined GPIOJ_BASE
-#define HAL_GPIO_NUM_PORTS  (10)
-#elif defined GPIOI_BASE
-#define HAL_GPIO_NUM_PORTS  (9)
-#elif defined GPIOH_BASE
-#define HAL_GPIO_NUM_PORTS  (8)
-#elif defined GPIOG_BASE
-#define HAL_GPIO_NUM_PORTS  (7)
-#elif defined GPIOF_BASE
-#define HAL_GPIO_NUM_PORTS  (6)
-#else
-#define HAL_GPIO_NUM_PORTS  (5)
-#endif
-
-/* Port index to port address map */
-static GPIO_TypeDef * const portmap[HAL_GPIO_NUM_PORTS] =
-{
-    GPIOA,
-    GPIOB,
-    GPIOC,
-    GPIOD,
-    GPIOE,
-#if defined GPIOF_BASE
-    GPIOF,
-#endif
-#if defined GPIOG_BASE
-    GPIOG,
-#endif
-#if defined GPIOH_BASE
-    GPIOH,
-#endif
-#if defined GPIOI_BASE
-    GPIOI,
-#endif
-#if defined GPIOJ_BASE
-    GPIOJ,
-#endif
-#if defined GPIOK_BASE
-    GPIOK,
-#endif
-};
-
-/* Storage for GPIO callbacks. */
-struct gpio_irq_obj
-{
-    void *arg;
-    hal_gpio_irq_handler_t isr;
-};
-
-static struct gpio_irq_obj gpio_irq_handlers[16];
-
-struct ext_irqs
-{
-    volatile uint32_t irq0;
-    volatile uint32_t irq1;
-    volatile uint32_t irq2;
-    volatile uint32_t irq3;
-    volatile uint32_t irq4;
-    volatile uint32_t irq9_5;
-    volatile uint32_t irq15_10;
-};
-struct ext_irqs ext_irq_counts;
-
-/**
- * ext irq handler
- *
- * Handles the gpio interrupt attached to a gpio pin.
- *
- * @param index
- */
-static void
-ext_irq_handler(int index)
-{
-    uint32_t mask;
-
-    mask = 1 << index;
-    if (__HAL_GPIO_EXTI_GET_IT(mask) != RESET) {
-        __HAL_GPIO_EXTI_CLEAR_IT(mask);
-        gpio_irq_handlers[index].isr(gpio_irq_handlers[index].arg);
-    }
-}
-
-/* External interrupt 0 */
-static void
-ext_irq0(void)
-{
-    ++ext_irq_counts.irq0;
-    ext_irq_handler(0);
-}
-
-/* External interrupt 1 */
-static void
-ext_irq1(void)
-{
-    ++ext_irq_counts.irq1;
-    ext_irq_handler(1);
-}
-
-/* External interrupt 2 */
-static void
-ext_irq2(void)
-{
-    ++ext_irq_counts.irq2;
-    ext_irq_handler(2);
-}
-
-/* External interrupt 3 */
-static void
-ext_irq3(void)
-{
-    ++ext_irq_counts.irq3;
-    ext_irq_handler(3);
-}
-
-/**
- * ext irq4
- *
- *  External interrupt handler for external interrupt 4.
- *
- */
-static void
-ext_irq4(void)
-{
-    ++ext_irq_counts.irq4;
-    ext_irq_handler(4);
-}
-
-/**
- * ext irq9_5
- *
- *  External interrupt handler for irqs 9 through 5.
- *
- */
-static void
-ext_irq9_5(void)
-{
-    int index;
-
-    ++ext_irq_counts.irq9_5;
-    for (index = 5; index <= 9; ++index) {
-        ext_irq_handler(index);
-    }
-}
-
-/**
- * ext irq15_10
- *
- *  External interrupt handler for irqs 15 through 10.
- *
- */
-static void
-ext_irq15_10(void)
-{
-    int index;
-
-    ++ext_irq_counts.irq15_10;
-    for (index = 10; index <= 15; ++index) {
-        ext_irq_handler(index);
-    }
-}
-
-/**
- * hal gpio clk enable
- *
- * Enable the port peripheral clock
- *
- * @param port_idx
- */
-static void
-hal_gpio_clk_enable(uint32_t port_idx)
-{
-    switch (port_idx) {
-        case 0:
-            __HAL_RCC_GPIOA_CLK_ENABLE();
-            break;
-        case 1:
-            __HAL_RCC_GPIOB_CLK_ENABLE();
-            break;
-        case 2:
-            __HAL_RCC_GPIOC_CLK_ENABLE();
-            break;
-        case 3:
-            __HAL_RCC_GPIOD_CLK_ENABLE();
-            break;
-        case 4:
-            __HAL_RCC_GPIOE_CLK_ENABLE();
-            break;
-#if defined GPIOF_BASE
-        case 5:
-            __HAL_RCC_GPIOF_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOG_BASE
-        case 6:
-            __HAL_RCC_GPIOG_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOH_BASE
-        case 7:
-            __HAL_RCC_GPIOH_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOI_BASE
-        case 8:
-            __HAL_RCC_GPIOI_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOJ_BASE
-        case 9:
-            __HAL_RCC_GPIOJ_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOK_BASE
-        case 10:
-            __HAL_RCC_GPIOK_CLK_ENABLE();
-            break;
-#endif
-        default:
-            assert(0);
-            break;
-    }
-}
-
-/**
- * hal gpio pin to irq
- *
- * Converts the logical pin number to the IRQ number associated with the
- * external interrupt for that particular GPIO.
- *
- * @param pin
- *
- * @return IRQn_Type
- */
-static IRQn_Type
-hal_gpio_pin_to_irq(int pin)
-{
-    int index;
-    IRQn_Type irqn;
-
-    index = GPIO_INDEX(pin);
-    if (index <= 4) {
-        irqn = EXTI0_IRQn + index;
-    } else if (index <=  9) {
-        irqn = EXTI9_5_IRQn;
-    } else {
-        irqn = EXTI15_10_IRQn;
-    }
-
-    return irqn;
-}
-
-static void
-hal_gpio_set_nvic(IRQn_Type irqn)
-{
-    uint32_t isr;
-
-    switch (irqn) {
-    case EXTI0_IRQn:
-        isr = (uint32_t)&ext_irq0;
-        break;
-    case EXTI1_IRQn:
-        isr = (uint32_t)&ext_irq1;
-        break;
-    case EXTI2_IRQn:
-        isr = (uint32_t)&ext_irq2;
-        break;
-    case EXTI3_IRQn:
-        isr = (uint32_t)&ext_irq3;
-        break;
-    case EXTI4_IRQn:
-        isr = (uint32_t)&ext_irq4;
-        break;
-    case EXTI9_5_IRQn:
-        isr = (uint32_t)&ext_irq9_5;
-        break;
-    case EXTI15_10_IRQn:
-        isr = (uint32_t)&ext_irq15_10;
-        break;
-    default:
-        assert(0);
-        break;
-    }
-
-    /* Set isr in vector table if not yet set */
-    if (NVIC_GetVector(irqn) != isr) {
-        NVIC_SetVector(irqn, isr);
-        NVIC_EnableIRQ(irqn);
-    }
-}
-
-/**
- * hal gpio init
- *
- * Called to initialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_init_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    mcu_pin_mask = GPIO_MASK(pin);
-    cfg->Pin = mcu_pin_mask;
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_Init(portmap[port], cfg);
-
-    return 0;
-}
-
-/**
- * hal gpio deinit
- *
- * Called to deinitialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_deinit_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    mcu_pin_mask = GPIO_MASK(pin);
-    cfg->Pin = mcu_pin_mask;
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_DeInit(portmap[port], cfg->Pin);
-
-    return 0;
-}
-
-/**
- * gpio init in
- *
- * Initializes the specified pin as an input
- *
- * @param pin   Pin number to set as input
- * @param pull  pull type
- *
- * @return int  0: no error; -1 otherwise.
- */
-int
-hal_gpio_init_in(int pin, hal_gpio_pull_t pull)
-{
-    int rc;
-    GPIO_InitTypeDef init_cfg;
-
-    init_cfg.Mode = GPIO_MODE_INPUT;
-    init_cfg.Pull = pull;
-
-    rc = hal_gpio_init_stm(pin, &init_cfg);
-    return rc;
-}
-
-/**
- * gpio init out
- *
- * Initialize the specified pin as an output, setting the pin to the specified
- * value.
- *
- * @param pin Pin number to set as output
- * @param val Value to set pin
- *
- * @return int  0: no error; -1 otherwise.
- */
-int hal_gpio_init_out(int pin, int val)
-{
-    GPIO_InitTypeDef cfg;
-    int port;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    /* Write initial output value */
-    hal_gpio_write(pin, val);
-
-    cfg.Pin = GPIO_MASK(pin);
-    cfg.Mode = GPIO_MODE_OUTPUT_PP;
-    cfg.Pull = GPIO_NOPULL;
-    cfg.Speed = GPIO_SPEED_HIGH;
-    cfg.Alternate = 0;
-
-    /* Initialize pin as an output, setting proper mode */
-    HAL_GPIO_Init(portmap[port], &cfg);
-
-    return 0;
-}
-
-/**
- * gpio init af
- *
- * Configure the specified pin for AF.
- */
-int
-hal_gpio_init_af(int pin, uint8_t af_type, enum hal_gpio_pull pull, uint8_t od)
-{
-    GPIO_InitTypeDef gpio;
-
-    if (!od) {
-        gpio.Mode = GPIO_MODE_AF_PP;
-    } else {
-        gpio.Mode = GPIO_MODE_AF_OD;
-    }
-    gpio.Speed = GPIO_SPEED_HIGH;
-    gpio.Pull = pull;
-    gpio.Alternate = af_type;
-
-    return hal_gpio_init_stm(pin, &gpio);
-}
-
-/**
- * gpio write
- *
- * Write a value (either high or low) to the specified pin.
- *
- * @param pin Pin to set
- * @param val Value to set pin (0:low 1:high)
- */
-void hal_gpio_write(int pin, int val)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-    GPIO_PinState state;
-
-    port = GPIO_PORT(pin);
-    mcu_pin_mask = GPIO_MASK(pin);
-
-    if (val) {
-        state = GPIO_PIN_SET;
-    } else {
-        state = GPIO_PIN_RESET;
-    }
-
-    HAL_GPIO_WritePin(portmap[port], mcu_pin_mask, state);
-}
-
-/**
- * gpio read
- *
- * Reads the specified pin.
- *
- * @param pin Pin number to read
- *
- * @return int 0: low, 1: high
- */
-int hal_gpio_read(int pin)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    port = GPIO_PORT(pin);
-    mcu_pin_mask = GPIO_MASK(pin);
-    return HAL_GPIO_ReadPin(portmap[port], mcu_pin_mask);
-}
-
-/**
- * gpio toggle
- *
- * Toggles the specified pin
- *
- * @param pin Pin number to toggle
- *
- * @return current pin state int 0: low 1 : high
- */
-int hal_gpio_toggle(int pin)
-{
-    int pin_state = (hal_gpio_read(pin) != 1);
-    hal_gpio_write(pin, pin_state);
-    return pin_state;
-}
-
-/**
- * gpio irq init
- *
- * Initialize an external interrupt on a gpio pin
- *
- * @param pin       Pin number to enable gpio.
- * @param handler   Interrupt handler
- * @param arg       Argument to pass to interrupt handler
- * @param trig      Trigger mode of interrupt
- * @param pull      Push/pull mode of input.
- *
- * @return int
- */
-int
-hal_gpio_irq_init(int pin, hal_gpio_irq_handler_t handler, void *arg,
-                  hal_gpio_irq_trig_t trig, hal_gpio_pull_t pull)
-{
-    int rc;
-    int irqn;
-    int index;
-    uint32_t pin_mask;
-    uint32_t mode;
-    GPIO_InitTypeDef init_cfg;
-
-    /* Configure the gpio for an external interrupt */
-    rc = 0;
-    switch (trig) {
-    case HAL_GPIO_TRIG_NONE:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_RISING:
-        mode = GPIO_MODE_IT_RISING;
-        break;
-    case HAL_GPIO_TRIG_FALLING:
-        mode = GPIO_MODE_IT_FALLING;
-        break;
-    case HAL_GPIO_TRIG_BOTH:
-        mode = GPIO_MODE_IT_RISING_FALLING;
-        break;
-    case HAL_GPIO_TRIG_LOW:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_HIGH:
-        rc = -1;
-        break;
-    default:
-        rc = -1;
-        break;
-    }
-
-    /* Check to make sure no error has occurred */
-    if (!rc) {
-        /* Disable interrupt and clear any pending */
-        hal_gpio_irq_disable(pin);
-        pin_mask = GPIO_MASK(pin);
-        __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-        /* Set the gpio irq handler */
-        index = GPIO_INDEX(pin);
-        gpio_irq_handlers[index].isr = handler;
-        gpio_irq_handlers[index].arg = arg;
-
-        /* Configure the GPIO */
-        init_cfg.Mode = mode;
-        init_cfg.Pull = pull;
-        rc = hal_gpio_init_stm(pin, &init_cfg);
-        if (!rc) {
-            /* Enable interrupt vector in NVIC */
-            irqn = hal_gpio_pin_to_irq(pin);
-            hal_gpio_set_nvic(irqn);
-        }
-    }
-
-    return rc;
-}
-
-/**
- * gpio irq release
- *
- * No longer interrupt when something occurs on the pin. NOTE: this function
- * does not change the GPIO push/pull setting nor does it change the
- * SYSCFG EXTICR registers. It also does not disable the NVIC interrupt enable
- * setting for the irq.
- *
- * @param pin
- */
-void
-hal_gpio_irq_release(int pin)
-{
-    int index;
-    uint32_t pin_mask;
-
-    /* Disable the interrupt */
-    hal_gpio_irq_disable(pin);
-
-    /* Clear any pending interrupts */
-    pin_mask = GPIO_MASK(pin);
-    __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-    /* Clear out the irq handler */
-    index = GPIO_INDEX(pin);
-    gpio_irq_handlers[index].arg = NULL;
-    gpio_irq_handlers[index].isr = NULL;
-}
-
-/**
- * gpio irq enable
- *
- * Enable the irq on the specified pin
- *
- * @param pin
- */
-void
-hal_gpio_irq_enable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = GPIO_MASK(pin);
-
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR |= mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
-
-/**
- * gpio irq disable
- *
- *
- * @param pin
- */
-void
-hal_gpio_irq_disable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = GPIO_MASK(pin);
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR &= ~mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
diff --git a/hw/mcu/stm/stm32f7xx/src/hal_gpio.c b/hw/mcu/stm/stm32f7xx/src/hal_gpio.c
deleted file mode 100644
index 22f6d8559..000000000
--- a/hw/mcu/stm/stm32f7xx/src/hal_gpio.c
+++ /dev/null
@@ -1,715 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "hal/hal_gpio.h"
-#include "mcu/cmsis_nvic.h"
-#include "stm32f7xx.h"
-#include "stm32f7xx_hal_gpio.h"
-#include "stm32f7xx_hal_rcc.h"
-#include "mcu/stm32f7xx_mynewt_hal.h"
-#include <assert.h>
-
- /* XXX: Notes
- * 1) Right now, we are not disabling the NVIC interrupt source; we only
- * disable the external interrupt from occurring. Dont think either way
- * to do it is an issue... when we release we may want to disable the NVIC
- *
- * 2) investigate how thread safe these routines are. HAL_GPIO_Init, for
- * example. Looks like if it gets interrupted while doing config an error
- * may occur. Read/modify write could cause screw-ups.
- *
- * 3) Currently, this code does not change the interrupt priority of the
- * external interrupt vectors in the NVIC. The application developer must
- * decide on the priority level for each external interrupt and program that
- * by using the CMSIS NVIC API  (NVIC_SetPriority and NVIC_SetPriorityGrouping)
- *
- * 4) The code probably does not handle "re-purposing" gpio very well.
- * "Re-purposing" means changing a gpio from input to output, or calling
- * gpio_init_in and expecting previously enabled interrupts to be stopped.
- *
- * 5) Possibly add access to HAL_GPIO_DeInit.
- */
-
-/*
- * GPIO pin mapping
- *
- * The stm32F4xx processors have 16 gpio pins per port. We map the logical pin
- * numbers (from 0 to N) in the following manner:
- *      Port A: PA0-PA15 map to pins 0 - 15.
- *      Port B: PB0-PB15 map to pins 16 - 31.
- *      Port C: PC0-PC15 map to pins 32 - 47.
- *
- *      To convert a gpio to pin number, do the following:
- *          - Convert port label to its numeric value (A=0, B=1, C=2, etc).
- *          - Multiply by 16.
- *          - Add port pin number.
- *
- *      Ex: PD11 = (3 * 16) + 11 = 59.
- *          PA0 = (0 * 16) + 0 = 0
- */
-#define GPIO_INDEX(pin)     ((pin) & 0x0F)
-#define GPIO_PORT(pin)      (((pin) >> 4) & 0x0F)
-#define GPIO_MASK(pin)      (1 << GPIO_INDEX(pin))
-
-/* Define the number of ports on processor */
-#if defined GPIOK_BASE
-#define HAL_GPIO_NUM_PORTS  (11)
-#elif defined GPIOJ_BASE
-#define HAL_GPIO_NUM_PORTS  (10)
-#elif defined GPIOI_BASE
-#define HAL_GPIO_NUM_PORTS  (9)
-#elif defined GPIOH_BASE
-#define HAL_GPIO_NUM_PORTS  (8)
-#elif defined GPIOG_BASE
-#define HAL_GPIO_NUM_PORTS  (7)
-#elif defined GPIOF_BASE
-#define HAL_GPIO_NUM_PORTS  (6)
-#else
-#define HAL_GPIO_NUM_PORTS  (5)
-#endif
-
-/* Port index to port address map */
-static GPIO_TypeDef * const portmap[HAL_GPIO_NUM_PORTS] =
-{
-    GPIOA,
-    GPIOB,
-    GPIOC,
-    GPIOD,
-    GPIOE,
-#if defined GPIOF_BASE
-    GPIOF,
-#endif
-#if defined GPIOG_BASE
-    GPIOG,
-#endif
-#if defined GPIOH_BASE
-    GPIOH,
-#endif
-#if defined GPIOI_BASE
-    GPIOI,
-#endif
-#if defined GPIOJ_BASE
-    GPIOJ,
-#endif
-#if defined GPIOK_BASE
-    GPIOK,
-#endif
-};
-
-/* Storage for GPIO callbacks. */
-struct gpio_irq_obj
-{
-    void *arg;
-    hal_gpio_irq_handler_t isr;
-};
-
-static struct gpio_irq_obj gpio_irq_handlers[16];
-
-struct ext_irqs
-{
-    volatile uint32_t irq0;
-    volatile uint32_t irq1;
-    volatile uint32_t irq2;
-    volatile uint32_t irq3;
-    volatile uint32_t irq4;
-    volatile uint32_t irq9_5;
-    volatile uint32_t irq15_10;
-};
-struct ext_irqs ext_irq_counts;
-
-/**
- * ext irq handler
- *
- * Handles the gpio interrupt attached to a gpio pin.
- *
- * @param index
- */
-static void
-ext_irq_handler(int index)
-{
-    uint32_t mask;
-
-    mask = 1 << index;
-    if (__HAL_GPIO_EXTI_GET_IT(mask) != RESET) {
-        __HAL_GPIO_EXTI_CLEAR_IT(mask);
-        gpio_irq_handlers[index].isr(gpio_irq_handlers[index].arg);
-    }
-}
-
-/* External interrupt 0 */
-static void
-ext_irq0(void)
-{
-    ++ext_irq_counts.irq0;
-    ext_irq_handler(0);
-}
-
-/* External interrupt 1 */
-static void
-ext_irq1(void)
-{
-    ++ext_irq_counts.irq1;
-    ext_irq_handler(1);
-}
-
-/* External interrupt 2 */
-static void
-ext_irq2(void)
-{
-    ++ext_irq_counts.irq2;
-    ext_irq_handler(2);
-}
-
-/* External interrupt 3 */
-static void
-ext_irq3(void)
-{
-    ++ext_irq_counts.irq3;
-    ext_irq_handler(3);
-}
-
-/**
- * ext irq4
- *
- *  External interrupt handler for external interrupt 4.
- *
- */
-static void
-ext_irq4(void)
-{
-    ++ext_irq_counts.irq4;
-    ext_irq_handler(4);
-}
-
-/**
- * ext irq9_5
- *
- *  External interrupt handler for irqs 9 through 5.
- *
- */
-static void
-ext_irq9_5(void)
-{
-    int index;
-
-    ++ext_irq_counts.irq9_5;
-    for (index = 5; index <= 9; ++index) {
-        ext_irq_handler(index);
-    }
-}
-
-/**
- * ext irq15_10
- *
- *  External interrupt handler for irqs 15 through 10.
- *
- */
-static void
-ext_irq15_10(void)
-{
-    int index;
-
-    ++ext_irq_counts.irq15_10;
-    for (index = 10; index <= 15; ++index) {
-        ext_irq_handler(index);
-    }
-}
-
-/**
- * hal gpio clk enable
- *
- * Enable the port peripheral clock
- *
- * @param port_idx
- */
-static void
-hal_gpio_clk_enable(uint32_t port_idx)
-{
-    switch (port_idx) {
-        case 0:
-            __HAL_RCC_GPIOA_CLK_ENABLE();
-            break;
-        case 1:
-            __HAL_RCC_GPIOB_CLK_ENABLE();
-            break;
-        case 2:
-            __HAL_RCC_GPIOC_CLK_ENABLE();
-            break;
-        case 3:
-            __HAL_RCC_GPIOD_CLK_ENABLE();
-            break;
-        case 4:
-            __HAL_RCC_GPIOE_CLK_ENABLE();
-            break;
-#if defined GPIOF_BASE
-        case 5:
-            __HAL_RCC_GPIOF_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOG_BASE
-        case 6:
-            __HAL_RCC_GPIOG_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOH_BASE
-        case 7:
-            __HAL_RCC_GPIOH_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOI_BASE
-        case 8:
-            __HAL_RCC_GPIOI_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOJ_BASE
-        case 9:
-            __HAL_RCC_GPIOJ_CLK_ENABLE();
-            break;
-#endif
-#if defined GPIOK_BASE
-        case 10:
-            __HAL_RCC_GPIOK_CLK_ENABLE();
-            break;
-#endif
-        default:
-            assert(0);
-            break;
-    }
-}
-
-/**
- * hal gpio pin to irq
- *
- * Converts the logical pin number to the IRQ number associated with the
- * external interrupt for that particular GPIO.
- *
- * @param pin
- *
- * @return IRQn_Type
- */
-static IRQn_Type
-hal_gpio_pin_to_irq(int pin)
-{
-    int index;
-    IRQn_Type irqn;
-
-    index = GPIO_INDEX(pin);
-    if (index <= 4) {
-        irqn = EXTI0_IRQn + index;
-    } else if (index <=  9) {
-        irqn = EXTI9_5_IRQn;
-    } else {
-        irqn = EXTI15_10_IRQn;
-    }
-
-    return irqn;
-}
-
-static void
-hal_gpio_set_nvic(IRQn_Type irqn)
-{
-    uint32_t isr;
-
-    switch (irqn) {
-    case EXTI0_IRQn:
-        isr = (uint32_t)&ext_irq0;
-        break;
-    case EXTI1_IRQn:
-        isr = (uint32_t)&ext_irq1;
-        break;
-    case EXTI2_IRQn:
-        isr = (uint32_t)&ext_irq2;
-        break;
-    case EXTI3_IRQn:
-        isr = (uint32_t)&ext_irq3;
-        break;
-    case EXTI4_IRQn:
-        isr = (uint32_t)&ext_irq4;
-        break;
-    case EXTI9_5_IRQn:
-        isr = (uint32_t)&ext_irq9_5;
-        break;
-    case EXTI15_10_IRQn:
-        isr = (uint32_t)&ext_irq15_10;
-        break;
-    default:
-        assert(0);
-        break;
-    }
-
-    /* Set isr in vector table if not yet set */
-    if (NVIC_GetVector(irqn) != isr) {
-        NVIC_SetVector(irqn, isr);
-        NVIC_EnableIRQ(irqn);
-    }
-}
-
-/**
- * hal gpio init
- *
- * Called to initialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_init_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    mcu_pin_mask = GPIO_MASK(pin);
-    cfg->Pin = mcu_pin_mask;
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_Init(portmap[port], cfg);
-
-    return 0;
-}
-
-/**
- * hal gpio deinit
- *
- * Called to deinitialize a gpio.
- *
- * @param pin
- * @param cfg
- *
- * @return int
- */
-int
-hal_gpio_deinit_stm(int pin, GPIO_InitTypeDef *cfg)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    mcu_pin_mask = GPIO_MASK(pin);
-    cfg->Pin = mcu_pin_mask;
-
-    /* Initialize pin as an input, setting proper mode */
-    HAL_GPIO_DeInit(portmap[port], cfg->Pin);
-
-    return 0;
-}
-
-/**
- * gpio init in
- *
- * Initializes the specified pin as an input
- *
- * @param pin   Pin number to set as input
- * @param pull  pull type
- *
- * @return int  0: no error; -1 otherwise.
- */
-int
-hal_gpio_init_in(int pin, hal_gpio_pull_t pull)
-{
-    int rc;
-    GPIO_InitTypeDef init_cfg;
-
-    init_cfg.Mode = GPIO_MODE_INPUT;
-    init_cfg.Pull = pull;
-
-    rc = hal_gpio_init_stm(pin, &init_cfg);
-    return rc;
-}
-
-/**
- * gpio init out
- *
- * Initialize the specified pin as an output, setting the pin to the specified
- * value.
- *
- * @param pin Pin number to set as output
- * @param val Value to set pin
- *
- * @return int  0: no error; -1 otherwise.
- */
-int hal_gpio_init_out(int pin, int val)
-{
-    GPIO_InitTypeDef cfg;
-    int port;
-    uint32_t mcu_pin_mask;
-
-    /* Is this a valid pin? */
-    port = GPIO_PORT(pin);
-    if (port >= HAL_GPIO_NUM_PORTS) {
-        return -1;
-    }
-
-    /* Enable the GPIO clock */
-    hal_gpio_clk_enable(port);
-
-    mcu_pin_mask = GPIO_MASK(pin);
-
-    cfg.Pin = mcu_pin_mask;
-    cfg.Mode = GPIO_MODE_OUTPUT_PP;
-    cfg.Pull = GPIO_NOPULL;
-    cfg.Speed = GPIO_SPEED_HIGH;
-
-    /* Initialize pin as an output, setting proper mode */
-    HAL_GPIO_Init(portmap[port], &cfg);
-    HAL_GPIO_WritePin(portmap[port], mcu_pin_mask, val);
-
-    return 0;
-}
-
-/**
- * gpio init af
- *
- * Configure the specified pin for AF.
- */
-int
-hal_gpio_init_af(int pin, uint8_t af_type, enum hal_gpio_pull pull, uint8_t od)
-{
-    GPIO_InitTypeDef gpio;
-
-    if (!od) {
-        gpio.Mode = GPIO_MODE_AF_PP;
-    } else {
-        gpio.Mode = GPIO_MODE_AF_OD;
-    }
-    gpio.Speed = GPIO_SPEED_HIGH;
-    gpio.Pull = pull;
-    gpio.Alternate = af_type;
-
-    return hal_gpio_init_stm(pin, &gpio);
-}
-
-/**
- * gpio write
- *
- * Write a value (either high or low) to the specified pin.
- *
- * @param pin Pin to set
- * @param val Value to set pin (0:low 1:high)
- */
-void hal_gpio_write(int pin, int val)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-    GPIO_PinState state;
-
-    port = GPIO_PORT(pin);
-    mcu_pin_mask = GPIO_MASK(pin);
-
-    if (val) {
-        state = GPIO_PIN_SET;
-    } else {
-        state = GPIO_PIN_RESET;
-    }
-
-    HAL_GPIO_WritePin(portmap[port], mcu_pin_mask, state);
-}
-
-/**
- * gpio read
- *
- * Reads the specified pin.
- *
- * @param pin Pin number to read
- *
- * @return int 0: low, 1: high
- */
-int hal_gpio_read(int pin)
-{
-    int port;
-    uint32_t mcu_pin_mask;
-
-    port = GPIO_PORT(pin);
-    mcu_pin_mask = GPIO_MASK(pin);
-    return HAL_GPIO_ReadPin(portmap[port], mcu_pin_mask);
-}
-
-/**
- * gpio toggle
- *
- * Toggles the specified pin
- *
- * @param pin Pin number to toggle
- *
- * @return current pin state int 0: low 1 : high
- */
-int hal_gpio_toggle(int pin)
-{
-    int pin_state = (hal_gpio_read(pin) != 1);
-    hal_gpio_write(pin, pin_state);
-    return pin_state;
-}
-
-/**
- * gpio irq init
- *
- * Initialize an external interrupt on a gpio pin
- *
- * @param pin       Pin number to enable gpio.
- * @param handler   Interrupt handler
- * @param arg       Argument to pass to interrupt handler
- * @param trig      Trigger mode of interrupt
- * @param pull      Push/pull mode of input.
- *
- * @return int
- */
-int
-hal_gpio_irq_init(int pin, hal_gpio_irq_handler_t handler, void *arg,
-                  hal_gpio_irq_trig_t trig, hal_gpio_pull_t pull)
-{
-    int rc;
-    int irqn;
-    int index;
-    uint32_t pin_mask;
-    uint32_t mode;
-    GPIO_InitTypeDef init_cfg;
-
-    /* Configure the gpio for an external interrupt */
-    rc = 0;
-    switch (trig) {
-    case HAL_GPIO_TRIG_NONE:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_RISING:
-        mode = GPIO_MODE_IT_RISING;
-        break;
-    case HAL_GPIO_TRIG_FALLING:
-        mode = GPIO_MODE_IT_FALLING;
-        break;
-    case HAL_GPIO_TRIG_BOTH:
-        mode = GPIO_MODE_IT_RISING_FALLING;
-        break;
-    case HAL_GPIO_TRIG_LOW:
-        rc = -1;
-        break;
-    case HAL_GPIO_TRIG_HIGH:
-        rc = -1;
-        break;
-    default:
-        rc = -1;
-        break;
-    }
-
-    /* Check to make sure no error has occurred */
-    if (!rc) {
-        /* Disable interrupt and clear any pending */
-        hal_gpio_irq_disable(pin);
-        pin_mask = GPIO_MASK(pin);
-        __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-        /* Set the gpio irq handler */
-        index = GPIO_INDEX(pin);
-        gpio_irq_handlers[index].isr = handler;
-        gpio_irq_handlers[index].arg = arg;
-
-        /* Configure the GPIO */
-        init_cfg.Mode = mode;
-        init_cfg.Pull = pull;
-        rc = hal_gpio_init_stm(pin, &init_cfg);
-        if (!rc) {
-            /* Enable interrupt vector in NVIC */
-            irqn = hal_gpio_pin_to_irq(pin);
-            hal_gpio_set_nvic(irqn);
-        }
-    }
-
-    return rc;
-}
-
-/**
- * gpio irq release
- *
- * No longer interrupt when something occurs on the pin. NOTE: this function
- * does not change the GPIO push/pull setting nor does it change the
- * SYSCFG EXTICR registers. It also does not disable the NVIC interrupt enable
- * setting for the irq.
- *
- * @param pin
- */
-void
-hal_gpio_irq_release(int pin)
-{
-    int index;
-    uint32_t pin_mask;
-
-    /* Disable the interrupt */
-    hal_gpio_irq_disable(pin);
-
-    /* Clear any pending interrupts */
-    pin_mask = GPIO_MASK(pin);
-    __HAL_GPIO_EXTI_CLEAR_FLAG(pin_mask);
-
-    /* Clear out the irq handler */
-    index = GPIO_INDEX(pin);
-    gpio_irq_handlers[index].arg = NULL;
-    gpio_irq_handlers[index].isr = NULL;
-}
-
-/**
- * gpio irq enable
- *
- * Enable the irq on the specified pin
- *
- * @param pin
- */
-void
-hal_gpio_irq_enable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = GPIO_MASK(pin);
-
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR |= mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}
-
-/**
- * gpio irq disable
- *
- *
- * @param pin
- */
-void
-hal_gpio_irq_disable(int pin)
-{
-    uint32_t ctx;
-    uint32_t mask;
-
-    mask = GPIO_MASK(pin);
-    __HAL_DISABLE_INTERRUPTS(ctx);
-    EXTI->IMR &= ~mask;
-    __HAL_ENABLE_INTERRUPTS(ctx);
-}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services