git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6923 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2014-05-08 13:14:52 +00:00
parent dd4f3da00e
commit 643b4167f4
1 changed files with 11 additions and 11 deletions

View File

@ -817,17 +817,6 @@ void usb_lld_start(USBDriver *usbp) {
usbp->txpending = 0; usbp->txpending = 0;
#if defined(_CHIBIOS_RT_)
/* Creates the data pump threads in a suspended state. Note, it is
created only once, the first time @p usbStart() is invoked.*/
if (usbp->tr == NULL)
usbp->tr = usbp->wait = chThdCreateI(usbp->wa_pump,
sizeof usbp->wa_pump,
STM32_USB_OTG_THREAD_PRIO,
usb_lld_pump,
usbp);
#endif
/* - Forced device mode. /* - Forced device mode.
- USB turn-around time = TRDT_VALUE. - USB turn-around time = TRDT_VALUE.
- Full Speed 1.1 PHY.*/ - Full Speed 1.1 PHY.*/
@ -869,6 +858,17 @@ void usb_lld_start(USBDriver *usbp) {
GINTMSK_ESUSPM */ | GINTMSK_SOFM; GINTMSK_ESUSPM */ | GINTMSK_SOFM;
otgp->GINTSTS = 0xFFFFFFFF; /* Clears all pending IRQs, if any. */ otgp->GINTSTS = 0xFFFFFFFF; /* Clears all pending IRQs, if any. */
#if defined(_CHIBIOS_RT_)
/* Creates the data pump thread. Note, it is created only once.*/
if (usbp->tr == NULL) {
usbp->tr = chThdCreateI(usbp->wa_pump, sizeof usbp->wa_pump,
STM32_USB_OTG_THREAD_PRIO,
usb_lld_pump, usbp);
chThdStartI(usbp->tr);
chSchRescheduleS();
}
#endif
/* Global interrupts enable.*/ /* Global interrupts enable.*/
otgp->GAHBCFG |= GAHBCFG_GINTMSK; otgp->GAHBCFG |= GAHBCFG_GINTMSK;
} }