projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
122f491
)
altos/stm: Semantic error in STM usb disable caused it to not work
author
Keith Packard
<keithp@keithp.com>
Thu, 19 Dec 2013 02:20:55 +0000
(18:20 -0800)
committer
Keith Packard
<keithp@keithp.com>
Thu, 19 Dec 2013 02:20:55 +0000
(18:20 -0800)
The USB enable register wasn't actually getting rewritten with the
enable bit turned off, so the USB device was still powered on in flight.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_usb_stm.c
patch
|
blob
|
history
diff --git
a/src/stm/ao_usb_stm.c
b/src/stm/ao_usb_stm.c
index b00390ec0318b14901a68156ad29597df5b08f2f..28a9f9f3e4643beac09b0db8a0dcf6e56c348fc9 100644
(file)
--- a/
src/stm/ao_usb_stm.c
+++ b/
src/stm/ao_usb_stm.c
@@
-965,7
+965,7
@@
ao_usb_disable(void)
stm_usb.cntr = (1 << STM_USB_CNTR_PDWN) | (1 << STM_USB_CNTR_FRES);
/* Disable the interface */
- stm_rcc.apb1enr &
+
~(1 << STM_RCC_APB1ENR_USBEN);
+ stm_rcc.apb1enr &
=
~(1 << STM_RCC_APB1ENR_USBEN);
ao_arch_release_interrupts();
}