summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-11-28 12:18:56 +0700
committerhathach <[email protected]>2019-11-28 12:18:56 +0700
commitac701c398b4e9a43eefe0ee0be38579ca17535df (patch)
treeaec5a25d00f781db0e2f913f6f7efafd93970053
parent552cc3ef33aee21eba3ea60ad07c461181eeaa58 (diff)
clean up
-rw-r--r--src/portable/microchip/samg/dcd_samg.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/portable/microchip/samg/dcd_samg.c b/src/portable/microchip/samg/dcd_samg.c
index 1d2e150d5..c38621e00 100644
--- a/src/portable/microchip/samg/dcd_samg.c
+++ b/src/portable/microchip/samg/dcd_samg.c
@@ -150,15 +150,12 @@ void dcd_edpt0_status_complete(uint8_t rhport, tusb_control_request_t const * re
if (request->bRequest == TUSB_REQ_SET_ADDRESS)
{
uint8_t const dev_addr = (uint8_t) request->wValue;
- TU_LOG2("dev address = %d", dev_addr);
// Enable addressed state
UDP->UDP_GLB_STAT |= UDP_GLB_STAT_FADDEN_Msk;
// Set new address & Function enable bit
- UDP->UDP_FADDR |= UDP_FADDR_FADD(dev_addr);
-
- UDP->UDP_FADDR |= UDP_FADDR_FEN_Msk;
+ UDP->UDP_FADDR = UDP_FADDR_FEN_Msk | UDP_FADDR_FADD(dev_addr);
}
}