From 2e5a3b195d4c363dd756b93b3f9eff8964b07775 Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Sat, 8 Jul 2017 07:48:51 +0000 Subject: Fixed Bug #857 git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10305 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32L053-DISCOVERY/main.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'demos/STM32/RT-STM32L053-DISCOVERY/main.c') diff --git a/demos/STM32/RT-STM32L053-DISCOVERY/main.c b/demos/STM32/RT-STM32L053-DISCOVERY/main.c index 80498c166..ffa768f53 100644 --- a/demos/STM32/RT-STM32L053-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32L053-DISCOVERY/main.c @@ -16,8 +16,6 @@ #include "ch.h" #include "hal.h" -#include "usbcfg.h" - #include "ch_test.h" /* @@ -52,21 +50,10 @@ int main(void) { chSysInit(); /* - * Initializes a serial-over-USB CDC driver. + * Activates the serial driver 1 using the driver default configuration. */ - sduObjectInit(&SDU1); - sduStart(&SDU1, &serusbcfg); + sdStart(&SD1, NULL); - /* - * 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(1000); - usbStart(serusbcfg.usbp, &usbcfg); - usbConnectBus(serusbcfg.usbp); - chThdSleepMilliseconds(1000); /* * Creates the blinker thread. */ @@ -78,7 +65,7 @@ int main(void) { */ while (true) { if (palReadLine(LINE_BUTTON)) - test_execute((BaseSequentialStream *)&SDU1); + test_execute((BaseSequentialStream *)&SD1); chThdSleepMilliseconds(500); } } -- cgit v1.2.3