|
@@ -65,25 +65,19 @@ static void setup(void)
|
65
|
65
|
{
|
66
|
66
|
chEvtSignal(pdb_led_thread, PDB_EVT_LED_SLOW_BLINK);
|
67
|
67
|
|
68
|
|
- /* TODO: implement the configuration mode */
|
|
68
|
+ /* Disconnect from USB */
|
69
|
69
|
usbDisconnectBus(serusbcfg.usbp);
|
70
|
70
|
|
|
71
|
+ /* Start the USB serial interface */
|
71
|
72
|
sduObjectInit(&SDU1);
|
72
|
73
|
sduStart(&SDU1, &serusbcfg);
|
73
|
74
|
|
|
75
|
+ /* Start USB */
|
74
|
76
|
chThdSleepMilliseconds(100);
|
75
|
77
|
usbStart(serusbcfg.usbp, &usbcfg);
|
76
|
78
|
usbConnectBus(serusbcfg.usbp);
|
77
|
79
|
|
78
|
|
- //char text[] = "Hello, world!\r\n";
|
79
|
|
-
|
80
|
|
- while (true) {
|
81
|
|
- //sdWrite(&SDU1, (uint8_t *) text, 15);
|
82
|
|
- //obqWriteTimeout(&SDU1.obqueue, (uint8_t *) text, 15, TIME_INFINITE);
|
83
|
|
- //chprintf(&SDU1, "Hello, world! %d\r\n", ST2S(chVTGetSystemTime()));
|
84
|
|
- pdb_shell();
|
85
|
|
- chThdSleepMilliseconds(100);
|
86
|
|
- }
|
|
80
|
+ pdb_shell();
|
87
|
81
|
}
|
88
|
82
|
|
89
|
83
|
static void pd_buddy(void)
|