tests: gadget0: F0: drop unnecessary code.

* Only the L1 needed to include flash settings
* whitespace and comment cleanup
* drop redundant clock setting calls
This commit is contained in:
Karl Palsson 2015-10-03 17:35:40 +00:00
parent f5eb96caf3
commit c097343634
1 changed files with 3 additions and 5 deletions

View File

@ -20,7 +20,6 @@
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/crs.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/rcc.h>
#include <stdio.h>
@ -47,11 +46,10 @@ int main(void)
rcc_clock_setup_in_hsi48_out_48mhz();
crs_autotrim_usb_enable();
rcc_set_usbclk_source(HSI48);
rcc_set_sysclk_source(HSI48);
/* LED on custom board for boot progress */
rcc_periph_clock_enable(RCC_GPIOC);
gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO7);
/* LED on for boot progress */
rcc_periph_clock_enable(RCC_GPIOC);
gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO7);
gpio_set(GPIOC, GPIO7);
usbd_device *usbd_dev = gadget0_init(&st_usbfs_v2_usb_driver, "stm32f072disco");