mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
msp430 disconnect/connect
This commit is contained in:
parent
63655ac9d7
commit
18d936b414
@ -134,9 +134,6 @@ void dcd_init (uint8_t rhport)
|
|||||||
// Enable reset and wait for it before continuing.
|
// Enable reset and wait for it before continuing.
|
||||||
USBIE |= RSTRIE;
|
USBIE |= RSTRIE;
|
||||||
|
|
||||||
// Enable pullup.
|
|
||||||
USBCNF |= PUR_EN;
|
|
||||||
|
|
||||||
USBKEYPID = 0;
|
USBKEYPID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,6 +204,24 @@ void dcd_remote_wakeup(uint8_t rhport)
|
|||||||
(void) 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
|
/* DCD Endpoint port
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user