mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 05:38:33 +03:00
USB: implement USB reset by setting the on-board pull-up on D+ low
This commit is contained in:
committed by
Harald Welte
parent
4136c242a8
commit
f5869d4a59
@@ -603,11 +603,17 @@ static const USBDDriverDescriptors driverDescriptors = {
|
||||
|
||||
void SIMtrace_USB_Initialize(void)
|
||||
{
|
||||
|
||||
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
||||
const Pin usb_dp_pullup = PIN_USB_PULLUP;
|
||||
PIO_Configure(&usb_dp_pullup, 1);
|
||||
PIO_Set(&usb_dp_pullup);
|
||||
mdelay(15);
|
||||
PIO_Clear(&usb_dp_pullup);
|
||||
|
||||
// Get std USB driver
|
||||
USBDDriver *pUsbd = USBD_GetDriver();
|
||||
|
||||
TRACE_DEBUG(".");
|
||||
|
||||
// Initialize standard USB driver
|
||||
USBDDriver_Initialize(pUsbd, &driverDescriptors, 0); // Multiple interface settings not supported
|
||||
USBD_Init();
|
||||
|
||||
Reference in New Issue
Block a user