From 5526d840a837829000d1e19b0fa49ab22c117fc5 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Fri, 8 Feb 2019 12:05:44 -0500 Subject: [PATCH] stm32f4: Do some comment/dead code (per 6048a3b) cleanups. --- src/portable/stm/stm32f4/dcd_stm32f4.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/portable/stm/stm32f4/dcd_stm32f4.c b/src/portable/stm/stm32f4/dcd_stm32f4.c index 4a99d6ec..78f40042 100644 --- a/src/portable/stm/stm32f4/dcd_stm32f4.c +++ b/src/portable/stm/stm32f4/dcd_stm32f4.c @@ -7,7 +7,8 @@ Software License Agreement (BSD License) - Copyright (c) 2018, Scott Shawcroft for Adafruit Industries + Copyright (c) 2018, Scott Shawcroft, 2019 William D. Jones for + Adafruit Industries All rights reserved. Redistribution and use in source and binary forms, with or without @@ -63,7 +64,6 @@ typedef struct { } xfer_ctl_t; xfer_ctl_t xfer_status[4][2]; - #define XFER_CTL_BASE(_ep, _dir) &xfer_status[_ep][_dir] @@ -71,7 +71,6 @@ xfer_ctl_t xfer_status[4][2]; static void bus_reset(void) { USB_OTG_DeviceTypeDef * dev = DEVICE_BASE; USB_OTG_OUTEndpointTypeDef * out_ep = OUT_EP_BASE; - // USB_OTG_INEndpointTypeDef * in_ep = IN_EP_BASE; for(int n = 0; n < 4; n++) { out_ep[n].DOEPCTL |= USB_OTG_DOEPCTL_SNAK; @@ -151,11 +150,10 @@ bool dcd_init (uint8_t rhport) // If USB host misbehaves during status portion of control xfer // (non zero-length packet), send STALL back and discard. Full speed. dev->DCFG |= USB_OTG_DCFG_NZLSOHSK | (3 << USB_OTG_DCFG_DSPD_Pos); - /* USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_USBRST | USB_OTG_GINTMSK_ENUMDNEM | \ - USB_OTG_GINTMSK_ESUSPM | USB_OTG_GINTMSK_USBSUSPM | \ - USB_OTG_GINTMSK_SOFM; */ + USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_USBRST | USB_OTG_GINTMSK_ENUMDNEM | \ - USB_OTG_GINTMSK_SOFM | USB_OTG_GINTMSK_RXFLVLM; + USB_OTG_GINTMSK_SOFM | USB_OTG_GINTMSK_RXFLVLM /* SB_OTG_GINTMSK_ESUSPM | \ + USB_OTG_GINTMSK_USBSUSPM */; // Enable pullup, enable peripheral. USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSBSEN | USB_OTG_GCCFG_PWRDWN; @@ -175,16 +173,6 @@ void dcd_int_disable (uint8_t rhport) NVIC_DisableIRQ(OTG_FS_IRQn); } -void dcd_connect (uint8_t rhport) -{ - -} - -void dcd_disconnect (uint8_t rhport) -{ - -} - void dcd_set_address (uint8_t rhport, uint8_t dev_addr) { (void) rhport;