STM32: USB: reduce logging verbosity
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Sep 2010 10:18:34 +0000 (10:18 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Sep 2010 10:18:34 +0000 (10:18 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4257 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/drv/usb_stm32.c

index eff625a45d60868d6c82815d0f6a894b55170f56..f314f99f2f17470190dd381434fb807447c3b73a 100644 (file)
@@ -1147,7 +1147,6 @@ ssize_t usb_ep_write(int ep, const void *buffer, ssize_t size)
        if (ep_num == CTRL_ENP_IN)
        {
                size = usb_size(size, setup_packet.wLength);
-               LOG_INFO("%s: size = %d\n", __func__, size);
                if (!size)
                        USB_StatusHandler(ep_num);
                else
@@ -1677,13 +1676,8 @@ static void usb_hw_reset(void)
        usb_set_address(0);
 
        /* Enable all the device interrupts */
-#if 0
        usb->CNTR = bmCTRM | bmRESETM | bmSOFM | bmERRM | bmPMAOVRM |
                        bmSUSPM | bmWKUPM;
-#else
-       /* XXX: disable frame interrupts for now (too much noise!) */
-       usb->CNTR = bmCTRM | bmRESETM | bmERRM | bmPMAOVRM | bmSUSPM | bmWKUPM;
-#endif
 }
 
 /* Handle a correct transfer under ISR */
@@ -1773,9 +1767,13 @@ static void usb_isr(void)
        }
        if (interrupt.SOF)
        {
+#if 0
+               /*
+                * XXX: disable logging of frame interrupts (too much noise!)
+                */
                uint16_t frame_nr = usb->FNR & 0x0fff;
-
                LOG_INFO("%s: frame %#x\n", __func__, frame_nr);
+#endif
                usb->ISTR = ~bmSOFM;
        }
        if (interrupt.WKUP)