Skip to content

Commit

Permalink
Revert "Fix issue with USB CDC at reboot" (#237)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
josesimoes authored Apr 29, 2024
1 parent 8e22859 commit 721ccf9
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions ChibiOS/NESHTEC_NESHNODE_V1/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}

0 comments on commit 721ccf9

Please sign in to comment.