File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
ChibiOS/NESHTEC_NESHNODE_V1/nanoCLR Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,17 @@ int main(void)
7474 crcStart (NULL );
7575#endif
7676
77+ // Initializes a serial-over-USB CDC driver.
78+ sduObjectInit (& SDU1 );
79+ sduStart (& SDU1 , & serusbcfg );
80+
81+ // Activates the USB driver and then the USB bus pull-up on D+.
82+ // Note, a delay is inserted in order to not have to disconnect the cable after a reset
83+ usbDisconnectBus (serusbcfg .usbp );
84+ chThdSleepMilliseconds (100 );
85+ usbStart (serusbcfg .usbp , & usbcfg );
86+ usbConnectBus (serusbcfg .usbp );
87+
7788 // create the receiver thread
7889 osThreadCreate (osThread (ReceiverThread ), NULL );
7990
@@ -97,17 +108,3 @@ int main(void)
97108 osDelay (100 );
98109 }
99110}
100-
101- void WP_Message_PrepareReception_Target ()
102- {
103- // Initializes a serial-over-USB CDC driver.
104- sduObjectInit (& SDU1 );
105- sduStart (& SDU1 , & serusbcfg );
106-
107- // Activates the USB driver and then the USB bus pull-up on D+.
108- // Note, a delay is inserted in order to not have to disconnect the cable after a reset
109- usbDisconnectBus (serusbcfg .usbp );
110- chThdSleepMilliseconds (100 );
111- usbStart (serusbcfg .usbp , & usbcfg );
112- usbConnectBus (serusbcfg .usbp );
113- }
You can’t perform that action at this time.
0 commit comments