diff --git a/src/portable/microchip/samg/dcd_samg.c b/src/portable/microchip/samg/dcd_samg.c index 93d9029d6..c122b9bee 100644 --- a/src/portable/microchip/samg/dcd_samg.c +++ b/src/portable/microchip/samg/dcd_samg.c @@ -138,9 +138,6 @@ void dcd_init (uint8_t rhport) (void) rhport; tu_memclr(_dcd_xfer, sizeof(_dcd_xfer)); - - // Enable pull-up, disable transceiver - UDP->UDP_TXVC = UDP_TXVC_PUON | UDP_TXVC_TXVDIS_Msk; } // Enable device interrupt @@ -186,6 +183,23 @@ void dcd_remote_wakeup (uint8_t rhport) (void) rhport; } +void dcd_connect(uint8_t rhport) +{ + (void) rhport; + + // Enable pull-up, disable transceiver + UDP->UDP_TXVC = UDP_TXVC_PUON | UDP_TXVC_TXVDIS_Msk; +} + +void dcd_disconnect(uint8_t rhport) +{ + (void) rhport; + + // disable both pullup and transceiver + UDP->UDP_TXVC = UDP_TXVC_TXVDIS_Msk; +} + + //--------------------------------------------------------------------+ // Endpoint API //--------------------------------------------------------------------+