mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 01:20:19 +00:00
implement dcd disconnect/connect for lpc ip3511
This commit is contained in:
parent
969121df4f
commit
418b69f2db
@ -219,11 +219,13 @@ void dcd_remote_wakeup(uint8_t rhport)
|
||||
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
sie_write(SIE_CMDCODE_DEVICE_STATUS, 1, SIE_DEV_STATUS_CONNECT_STATUS_MASK);
|
||||
}
|
||||
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
sie_write(SIE_CMDCODE_DEVICE_STATUS, 1, 0);
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ enum {
|
||||
CMDSTAT_DEVICE_ADDR_MASK = TU_BIT(7 )-1,
|
||||
CMDSTAT_DEVICE_ENABLE_MASK = TU_BIT(7 ),
|
||||
CMDSTAT_SETUP_RECEIVED_MASK = TU_BIT(8 ),
|
||||
CMDSTAT_DEVICE_CONNECT_MASK = TU_BIT(16), ///< reflect the softconnect only, does not reflect the actual attached state
|
||||
CMDSTAT_DEVICE_CONNECT_MASK = TU_BIT(16), ///< reflect the soft-connect only, does not reflect the actual attached state
|
||||
CMDSTAT_DEVICE_SUSPEND_MASK = TU_BIT(17),
|
||||
CMDSTAT_CONNECT_CHANGE_MASK = TU_BIT(24),
|
||||
CMDSTAT_SUSPEND_CHANGE_MASK = TU_BIT(25),
|
||||
@ -209,6 +209,18 @@ void dcd_remote_wakeup(uint8_t rhport)
|
||||
(void) rhport;
|
||||
}
|
||||
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
DCD_REGS->DEVCMDSTAT |= CMDSTAT_DEVICE_CONNECT_MASK;
|
||||
}
|
||||
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
DCD_REGS->DEVCMDSTAT &= ~CMDSTAT_DEVICE_CONNECT_MASK;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// DCD Endpoint Port
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -91,6 +91,18 @@ void dcd_remote_wakeup (uint8_t rhport)
|
||||
(void) rhport;
|
||||
}
|
||||
|
||||
// Connect by enabling internal pull-up resistor on D+/D-
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
}
|
||||
|
||||
// Disconnect by disabling internal pull-up resistor on D+/D-
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Endpoint API
|
||||
//--------------------------------------------------------------------+
|
||||
|
Loading…
x
Reference in New Issue
Block a user