diff --git a/src/bootloader/usbdfu.c b/src/bootloader/usbdfu.c index 67d3218..a84ebd6 100644 --- a/src/bootloader/usbdfu.c +++ b/src/bootloader/usbdfu.c @@ -244,6 +244,15 @@ static usbd_device *usb_init(void) gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO11 | GPIO12); gpio_clear(GPIOA, GPIO11 || GPIO12); + +#ifdef USE_MAPLEMINI + /* add support for Maplemini board */ + rcc_periph_clock_enable(RCC_GPIOB); + gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, + GPIO9); + gpio_clear(GPIOB, GPIO9); +#endif + t = time_now() + 10000; while (cyclecmp32(time_now(), t) < 0) ; diff --git a/src/i2c-stm32f1-usb/i2c-stm32f1-usb.c b/src/i2c-stm32f1-usb/i2c-stm32f1-usb.c index 07a33d0..bd7b2b0 100644 --- a/src/i2c-stm32f1-usb/i2c-stm32f1-usb.c +++ b/src/i2c-stm32f1-usb/i2c-stm32f1-usb.c @@ -328,6 +328,15 @@ static int usb_fibre(fibre_t *fibre) gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO11 | GPIO12); gpio_clear(GPIOA, GPIO11 | GPIO12); + +#ifdef USE_MAPLEMINI + /* add support for Maplemini board */ + rcc_periph_clock_enable(RCC_GPIOB); + gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, + GPIO9); + gpio_clear(GPIOB, GPIO9); +#endif + t = time_now() + 10000; PT_WAIT_UNTIL(fibre_timeout(t));