diff options
| author | Ha Thach <[email protected]> | 2020-04-17 09:51:15 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-17 09:51:15 +0700 |
| commit | 19e2eb66c0181581010d0e26f2a29bf52268ff73 (patch) | |
| tree | b61a5c3e8f123e2f22a63f3392c949ba10c4c5cd /src/portable/st | |
| parent | 9aa553ccc2e8977522202fa4e346a66a47c8e442 (diff) | |
| parent | 3aaad8cd730d01a65065d9eb8b694221724151c3 (diff) | |
Merge pull request #350 from hathach/synopsys-msp430-dcd-disconnect-connect
Synopsys msp430 dcd disconnect connect
Diffstat (limited to 'src/portable/st')
| -rw-r--r-- | src/portable/st/synopsys/dcd_synopsys.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index dc752b37a..38c284c5a 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -209,10 +209,6 @@ void dcd_init (uint8_t rhport) // Enable USB transceiver. USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_PWRDWN; - - // Soft Connect -> Enable pullup on D+/D-. - // This step does not appear to be specified in the programmer's model. - dev->DCTL &= ~USB_OTG_DCTL_SDIS; } void dcd_int_enable (uint8_t rhport) @@ -250,6 +246,23 @@ void dcd_remote_wakeup(uint8_t rhport) (void) rhport; } +void dcd_connect(uint8_t rhport) +{ + (void) rhport; + USB_OTG_DeviceTypeDef * dev = DEVICE_BASE; + + dev->DCTL &= ~USB_OTG_DCTL_SDIS; +} + +void dcd_disconnect(uint8_t rhport) +{ + (void) rhport; + USB_OTG_DeviceTypeDef * dev = DEVICE_BASE; + + dev->DCTL |= USB_OTG_DCTL_SDIS; +} + + /*------------------------------------------------------------------*/ /* DCD Endpoint port *------------------------------------------------------------------*/ |
