From 0673344289772ed89483948184d6608c272c7c26 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Dec 2013 18:20:55 -0800 Subject: [PATCH] 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 --- src/stm/ao_usb_stm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.30.2