cleanup for esp32

This commit is contained in:
hathach 2020-04-16 20:43:26 +07:00
parent 4c74140b31
commit 63655ac9d7
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581
1 changed files with 8 additions and 9 deletions

View File

@ -190,9 +190,6 @@ void dcd_init(uint8_t rhport)
USB_ENUMDONEMSK_M |
USB_RESETDETMSK_M |
USB_DISCONNINTMSK_M;
ESP_LOGV(TAG, "DCD init - Soft CONNECT");
USB0.dctl &= ~USB_SFTDISCON_M; // Connect
}
void dcd_set_address(uint8_t rhport, uint8_t dev_addr)
@ -216,18 +213,20 @@ void dcd_remote_wakeup(uint8_t rhport)
(void)rhport;
}
// disconnect by disabling internal pull-up resistor on D+/D-
void dcd_disconnect(uint8_t rhport)
{
USB0.dctl |= USB_SFTDISCON_M;
}
// connect by enabling internal pull-up resistor on D+/D-
void dcd_connect(uint8_t rhport)
{
(void) rhport;
USB0.dctl &= ~USB_SFTDISCON_M;
}
// disconnect by disabling internal pull-up resistor on D+/D-
void dcd_disconnect(uint8_t rhport)
{
(void) rhport;
USB0.dctl |= USB_SFTDISCON_M;
}
/*------------------------------------------------------------------*/
/* DCD Endpoint port
*------------------------------------------------------------------*/