From: Keith Packard Date: Thu, 19 Dec 2013 02:20:55 +0000 (-0800) Subject: altos/stm: Semantic error in STM usb disable caused it to not work X-Git-Tag: 1.3~10^2~2 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=0673344289772ed89483948184d6608c272c7c26 altos/stm: Semantic error in STM usb disable caused it to not work 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 --- diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index b00390ec..28a9f9f3 100644 --- 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(); }