diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2017-07-08 07:48:51 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2017-07-08 07:48:51 +0000 |
commit | 2e5a3b195d4c363dd756b93b3f9eff8964b07775 (patch) | |
tree | 87fdef426c4c3b21dd0ac6aaf15670908b751960 /demos/STM32/RT-STM32L053-DISCOVERY/main.c | |
parent | 2fc72ef5f81f3fa4eb0cb908a7138b43b1478ff4 (diff) | |
download | ChibiOS-2e5a3b195d4c363dd756b93b3f9eff8964b07775.tar.gz ChibiOS-2e5a3b195d4c363dd756b93b3f9eff8964b07775.tar.bz2 ChibiOS-2e5a3b195d4c363dd756b93b3f9eff8964b07775.zip |
Fixed Bug #857
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10305 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM32/RT-STM32L053-DISCOVERY/main.c')
-rw-r--r-- | demos/STM32/RT-STM32L053-DISCOVERY/main.c | 19 |
1 files changed, 3 insertions, 16 deletions
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,22 +50,11 @@ 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.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL);
@@ -78,7 +65,7 @@ int main(void) { */
while (true) {
if (palReadLine(LINE_BUTTON))
- test_execute((BaseSequentialStream *)&SDU1);
+ test_execute((BaseSequentialStream *)&SD1);
chThdSleepMilliseconds(500);
}
}
|