mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-11 18:40:45 +00:00
samg implement dcd connect/disconnect
This commit is contained in:
parent
33888519dd
commit
36d4efa077
@ -138,9 +138,6 @@ void dcd_init (uint8_t rhport)
|
|||||||
(void) rhport;
|
(void) rhport;
|
||||||
|
|
||||||
tu_memclr(_dcd_xfer, sizeof(_dcd_xfer));
|
tu_memclr(_dcd_xfer, sizeof(_dcd_xfer));
|
||||||
|
|
||||||
// Enable pull-up, disable transceiver
|
|
||||||
UDP->UDP_TXVC = UDP_TXVC_PUON | UDP_TXVC_TXVDIS_Msk;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable device interrupt
|
// Enable device interrupt
|
||||||
@ -186,6 +183,23 @@ void dcd_remote_wakeup (uint8_t rhport)
|
|||||||
(void) rhport;
|
(void) rhport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dcd_connect(uint8_t rhport)
|
||||||
|
{
|
||||||
|
(void) rhport;
|
||||||
|
|
||||||
|
// Enable pull-up, disable transceiver
|
||||||
|
UDP->UDP_TXVC = UDP_TXVC_PUON | UDP_TXVC_TXVDIS_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
void dcd_disconnect(uint8_t rhport)
|
||||||
|
{
|
||||||
|
(void) rhport;
|
||||||
|
|
||||||
|
// disable both pullup and transceiver
|
||||||
|
UDP->UDP_TXVC = UDP_TXVC_TXVDIS_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// Endpoint API
|
// Endpoint API
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user