summaryrefslogtreecommitdiff
path: root/ucoo/hal/usb/usb.stm32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ucoo/hal/usb/usb.stm32.cc')
-rw-r--r--ucoo/hal/usb/usb.stm32.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ucoo/hal/usb/usb.stm32.cc b/ucoo/hal/usb/usb.stm32.cc
index 70db92b..04f0b70 100644
--- a/ucoo/hal/usb/usb.stm32.cc
+++ b/ucoo/hal/usb/usb.stm32.cc
@@ -66,8 +66,8 @@ UsbStreamControl::UsbStreamControl (const char *vendor, const char *product)
instance_ = this;
strings[0] = vendor;
strings[1] = product;
- rcc_peripheral_enable_clock (&RCC_AHB2ENR, RCC_AHB2ENR_OTGFSEN);
- rcc_peripheral_enable_clock (&RCC_AHB1ENR, RCC_AHB1ENR_IOPAEN);
+ rcc_periph_clock_enable (RCC_OTGFS);
+ rcc_periph_clock_enable (RCC_GPIOA);
gpio_mode_setup (GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE,
GPIO9 | GPIO11 | GPIO12);
gpio_set_af (GPIOA, GPIO_AF10, GPIO9 | GPIO11 | GPIO12);