mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-19 05:42:28 +00:00
add int enable/disable for pullup
This commit is contained in:
parent
18d936b414
commit
3aaad8cd73
@ -206,20 +206,24 @@ void dcd_remote_wakeup(uint8_t rhport)
|
||||
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
dcd_int_disable(rhport);
|
||||
|
||||
USBKEYPID = USBKEY;
|
||||
USBCNF |= PUR_EN; // Enable pullup.
|
||||
USBKEYPID = 0;
|
||||
|
||||
dcd_int_enable(rhport);
|
||||
}
|
||||
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
dcd_int_disable(rhport);
|
||||
|
||||
USBKEYPID = USBKEY;
|
||||
USBCNF &= ~PUR_EN; // Disable pullup.
|
||||
USBKEYPID = 0;
|
||||
|
||||
dcd_int_enable(rhport);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user