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

This commit is contained in:
gdisirio 2012-04-15 09:53:25 +00:00
parent 0d927aae48
commit b42882d139
2 changed files with 7 additions and 3 deletions

View File

@ -479,6 +479,9 @@ void usb_lld_start(USBDriver *usbp) {
/* Soft core reset.*/
otg_core_reset();
/* Internal FS PHY activation.*/
OTG->GCCFG = GCCFG_PWRDWN;
/* - Forced device mode.
- USB turn-around time = TRDT_VALUE.
- Full Speed 1.1 PHY.*/
@ -528,6 +531,7 @@ void usb_lld_stop(USBDriver *usbp) {
}
#endif
}
OTG->GCCFG = 0;
}
/**
@ -720,9 +724,7 @@ usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep) {
*/
void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf) {
(void)usbp;
(void)ep;
(void)buf;
memcpy(buf, usbp->epc[ep]->setup_buf, 8);
}
/**

View File

@ -421,6 +421,8 @@ int main(void) {
*/
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
usbDisconnectBus(serusbcfg.usbp);
chThdSleepMilliseconds(100);
usbConnectBus(serusbcfg.usbp);
/*