diff options
author | Karl Palsson <karlp@tweak.net.au> | 2015-10-03 20:35:40 +0300 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2015-10-04 03:28:16 +0300 |
commit | c0973436340a7192e11a6e038c103aadbe8565d7 (patch) | |
tree | e6eb5eb8db478fc60d5de549977aae4880be94f4 /tests | |
parent | f5eb96caf310b7e288aba5678d2d77f13a5a2ed3 (diff) |
tests: gadget0: F0: drop unnecessary code.
* Only the L1 needed to include flash settings
* whitespace and comment cleanup
* drop redundant clock setting calls
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gadget-zero/main-stm32f072disco.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/gadget-zero/main-stm32f072disco.c b/tests/gadget-zero/main-stm32f072disco.c index 20286bee..f8fc7828 100644 --- a/tests/gadget-zero/main-stm32f072disco.c +++ b/tests/gadget-zero/main-stm32f072disco.c @@ -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"); |