Родитель
8e22859af1
Коммит
721ccf9536
|
@ -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);
|
||||
}
|
Загрузка…
Ссылка в новой задаче