diff options
author | mux <freelancer.c@gmail.com> | 2014-01-23 18:27:29 +0200 |
---|---|---|
committer | mux <freelancer.c@gmail.com> | 2014-01-23 18:27:29 +0200 |
commit | 1d1e4e1bd5e95d609460e022ea395cd676b5e009 (patch) | |
tree | 34924f3904b03e02916898bd3cd6266265de6cb8 /stm/lib | |
parent | 638179fb9cea822c30a84f35dd7685660e6d6c41 (diff) | |
download | micropython-1d1e4e1bd5e95d609460e022ea395cd676b5e009.tar.gz micropython-1d1e4e1bd5e95d609460e022ea395cd676b5e009.zip |
Fix USB CORE PCGCCTL Wrong Address
* Fix PCGCCTL bug using address instead of value.
* Fix issue #211
Diffstat (limited to 'stm/lib')
-rw-r--r-- | stm/lib/usb_core.c | 4 | ||||
-rw-r--r-- | stm/lib/usb_dcd_int.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/stm/lib/usb_core.c b/stm/lib/usb_core.c index b0cce88046..64dd3e4fc6 100644 --- a/stm/lib/usb_core.c +++ b/stm/lib/usb_core.c @@ -1961,7 +1961,7 @@ void USB_OTG_ActiveRemoteWakeup(USB_OTG_CORE_HANDLE *pdev) if(pdev->cfg.low_power)
{
/* un-gate USB Core clock */
- power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL); // dpgeorge: taking the address here might be wrong...
+ power.d32 = USB_OTG_READ_REG32(pdev->regs.PCGCCTL);
power.b.gatehclk = 0;
power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
@@ -1995,7 +1995,7 @@ void USB_OTG_UngateClock(USB_OTG_CORE_HANDLE *pdev) if(dsts.b.suspsts == 1)
{
/* un-gate USB Core clock */
- power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL); // dpgeorge: taking the address here might be wrong...
+ power.d32 = USB_OTG_READ_REG32(pdev->regs.PCGCCTL);
power.b.gatehclk = 0;
power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
diff --git a/stm/lib/usb_dcd_int.c b/stm/lib/usb_dcd_int.c index 7089f34978..4dd9ce8396 100644 --- a/stm/lib/usb_dcd_int.c +++ b/stm/lib/usb_dcd_int.c @@ -352,7 +352,7 @@ static uint32_t DCD_HandleResume_ISR(USB_OTG_CORE_HANDLE *pdev) if(pdev->cfg.low_power)
{
/* un-gate USB Core clock */
- power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL); // dpgeorge: taking the address here might be wrong...
+ power.d32 = USB_OTG_READ_REG32(pdev->regs.PCGCCTL);
power.b.gatehclk = 0;
power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
|