Revert "Fix issue with USB CDC at reboot" (#237)

***NO_CI***
This commit is contained in:
José Simões 2024-04-29 16:52:13 +01:00 коммит произвёл GitHub
Родитель 8e22859af1
Коммит 721ccf9536
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 11 добавлений и 14 удалений

Просмотреть файл

@ -74,6 +74,17 @@ int main(void)
crcStart(NULL);
#endif
// Initializes a serial-over-USB CDC driver.
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
// Activates the USB driver and then the USB bus pull-up on D+.
// Note, a delay is inserted in order to not have to disconnect the cable after a reset
usbDisconnectBus(serusbcfg.usbp);
chThdSleepMilliseconds(100);
usbStart(serusbcfg.usbp, &usbcfg);
usbConnectBus(serusbcfg.usbp);
// create the receiver thread
osThreadCreate(osThread(ReceiverThread), NULL);
@ -97,17 +108,3 @@ int main(void)
osDelay(100);
}
}
void WP_Message_PrepareReception_Target()
{
// Initializes a serial-over-USB CDC driver.
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
// Activates the USB driver and then the USB bus pull-up on D+.
// Note, a delay is inserted in order to not have to disconnect the cable after a reset
usbDisconnectBus(serusbcfg.usbp);
chThdSleepMilliseconds(100);
usbStart(serusbcfg.usbp, &usbcfg);
usbConnectBus(serusbcfg.usbp);
}