aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-15 09:53:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-15 09:53:25 +0000
commitb42882d13952219febf49029771939df3fc6210f (patch)
tree6303321ce8aa218052522bbfde2094b75dc2917a /os/hal
parent0d927aae48e9e84af8df0376c7520b0f4abc0f10 (diff)
downloadChibiOS-b42882d13952219febf49029771939df3fc6210f.tar.gz
ChibiOS-b42882d13952219febf49029771939df3fc6210f.tar.bz2
ChibiOS-b42882d13952219febf49029771939df3fc6210f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4094 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32/OTGv1/usb_lld.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c
index 36ef53298..a33f7810d 100644
--- a/os/hal/platforms/STM32/OTGv1/usb_lld.c
+++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c
@@ -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);
}
/**