git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4581 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-08-18 17:53:25 +00:00
parent 4871d5b035
commit cd31eec2cf
1 changed files with 12 additions and 21 deletions

View File

@ -830,15 +830,6 @@ void usb_lld_start(USBDriver *usbp) {
/* Enables IRQ vector.*/
nvicEnableVector(STM32_OTG1_NUMBER,
CORTEX_PRIORITY_MASK(STM32_USB_OTG1_IRQ_PRIORITY));
/* Creates the hauler threads in a suspended state. Note, it is
created only once, the first time @p usbStart() is invoked.*/
if (usbp->thd_ptr == NULL)
usbp->thd_ptr = usbp->thd_wait = chThdCreateI(usbp->wa_pump,
sizeof usbp->wa_pump,
STM32_USB_THREAD_PRIORITY,
usb_lld_pump,
usbp);
}
#endif
#if STM32_USB_USE_OTG2
@ -850,18 +841,18 @@ void usb_lld_start(USBDriver *usbp) {
/* Enables IRQ vector.*/
nvicEnableVector(STM32_OTG2_NUMBER,
CORTEX_PRIORITY_MASK(STM32_USB_OTG2_IRQ_PRIORITY));
/* Creates the hauler threads in a suspended state. Note, it is
created only once, the first time @p usbStart() is invoked.*/
if (usbp->thd_ptr == NULL)
usbp->thd_ptr = usbp->thd_wait = chThdCreateI(usbp->wa_pump,
sizeof usbp->wa_pump,
STM32_USB_THREAD_PRIORITY,
usb_lld_pump,
usbp);
}
#endif
/* Creates the hauler threads in a suspended state. Note, it is
created only once, the first time @p usbStart() is invoked.*/
if (usbp->thd_ptr == NULL)
usbp->thd_ptr = usbp->thd_wait = chThdCreateI(usbp->wa_pump,
sizeof usbp->wa_pump,
STM32_USB_THREAD_PRIORITY,
usb_lld_pump,
usbp);
/* - Forced device mode.
- USB turn-around time = TRDT_VALUE.
- Full Speed 1.1 PHY.*/
@ -873,12 +864,12 @@ void usb_lld_start(USBDriver *usbp) {
/* PHY enabled.*/
otgp->PCGCCTL = 0;
/* Soft core reset.*/
otg_core_reset(otgp);
/* Internal FS PHY activation.*/
otgp->GCCFG = GCCFG_PWRDWN;
/* Soft core reset.*/
otg_core_reset(otgp);
/* Interrupts on TXFIFOs half empty.*/
otgp->GAHBCFG = 0;