aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/USBv1
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-16 17:38:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-16 17:38:22 +0000
commit3a94137eb38857d9780a5ef65be30736804dea46 (patch)
tree3f2742af90d08db7c09a6ba9d0304a49225000fd /os/hal/platforms/STM32/USBv1
parent46538d795be83d1d54b132e7d57213cb6d975c51 (diff)
downloadChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.tar.gz
ChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.tar.bz2
ChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3320 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/USBv1')
-rw-r--r--os/hal/platforms/STM32/USBv1/usb_lld.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/USBv1/usb_lld.c b/os/hal/platforms/STM32/USBv1/usb_lld.c
index 34b8d9bf0..b22f8f0da 100644
--- a/os/hal/platforms/STM32/USBv1/usb_lld.c
+++ b/os/hal/platforms/STM32/USBv1/usb_lld.c
@@ -330,7 +330,7 @@ void usb_lld_start(USBDriver *usbp) {
#if STM32_USB_USE_USB1
if (&USBD1 == usbp) {
/* USB clock enabled.*/
- RCC->APB1ENR |= RCC_APB1ENR_USBEN;
+ rccEnableUSB(FALSE);
/* Powers up the transceiver while holding the USB in reset state.*/
STM32_USB->CNTR = CNTR_FRES;
/* Enabling the USB IRQ vectors, this also gives enough time to allow
@@ -360,12 +360,12 @@ void usb_lld_stop(USBDriver *usbp) {
/* If in ready state then disables the USB clock.*/
if (usbp->state == USB_STOP) {
-#if STM32_ADC_USE_ADC1
+#if STM32_USB_USE_USB1
if (&USBD1 == usbp) {
NVICDisableVector(19);
NVICDisableVector(20);
STM32_USB->CNTR = CNTR_PDWN | CNTR_FRES;
- RCC->APB1ENR &= ~RCC_APB1ENR_USBEN;
+ rccDisableUSB(FALSE);
}
#endif
}