summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/portable/ti/msp430x5xx/dcd_msp430x5xx.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
index edccec33f..680d63588 100644
--- a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
+++ b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
@@ -134,9 +134,6 @@ void dcd_init (uint8_t rhport)
// Enable reset and wait for it before continuing.
USBIE |= RSTRIE;
- // Enable pullup.
- USBCNF |= PUR_EN;
-
USBKEYPID = 0;
}
@@ -207,6 +204,24 @@ void dcd_remote_wakeup(uint8_t rhport)
(void) rhport;
}
+void dcd_connect(uint8_t rhport)
+{
+ (void) rhport;
+
+ USBKEYPID = USBKEY;
+ USBCNF |= PUR_EN; // Enable pullup.
+ USBKEYPID = 0;
+}
+
+void dcd_disconnect(uint8_t rhport)
+{
+ (void) rhport;
+
+ USBKEYPID = USBKEY;
+ USBCNF &= ~PUR_EN; // Disable pullup.
+ USBKEYPID = 0;
+}
+
/*------------------------------------------------------------------*/
/* DCD Endpoint port
*------------------------------------------------------------------*/