mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-17 08:45:13 +00:00
stm32 sysnopsys disconnect/connect
This commit is contained in:
parent
33888519dd
commit
4c74140b31
@ -201,6 +201,18 @@ void dcd_remote_wakeup(uint8_t rhport)
|
||||
DEV_WAKEUP(usbdev);
|
||||
}
|
||||
|
||||
#if 0 // TODO implement for Spresense
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
}
|
||||
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
}
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Endpoint API
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -209,10 +209,6 @@ void dcd_init (uint8_t rhport)
|
||||
|
||||
// Enable USB transceiver.
|
||||
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_PWRDWN;
|
||||
|
||||
// Soft Connect -> Enable pullup on D+/D-.
|
||||
// This step does not appear to be specified in the programmer's model.
|
||||
dev->DCTL &= ~USB_OTG_DCTL_SDIS;
|
||||
}
|
||||
|
||||
void dcd_int_enable (uint8_t rhport)
|
||||
@ -250,6 +246,23 @@ void dcd_remote_wakeup(uint8_t rhport)
|
||||
(void) rhport;
|
||||
}
|
||||
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
USB_OTG_DeviceTypeDef * dev = DEVICE_BASE;
|
||||
|
||||
dev->DCTL &= ~USB_OTG_DCTL_SDIS;
|
||||
}
|
||||
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
USB_OTG_DeviceTypeDef * dev = DEVICE_BASE;
|
||||
|
||||
dev->DCTL |= USB_OTG_DCTL_SDIS;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* DCD Endpoint port
|
||||
*------------------------------------------------------------------*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user