diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2015-09-04 08:04:11 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2015-09-04 08:04:11 +0000 |
commit | c1f3c5cb218e185c805f0b7a50a8ad81aa6e2de0 (patch) | |
tree | e288f9ab662f7b42bf2f56f146b389a402a393ee /testhal/STM32/STM32F7xx/USB_CDC/main.c | |
parent | fc3f6b32fcbfda905ed747126bd79cb15d1c188e (diff) | |
download | ChibiOS-c1f3c5cb218e185c805f0b7a50a8ad81aa6e2de0.tar.gz ChibiOS-c1f3c5cb218e185c805f0b7a50a8ad81aa6e2de0.tar.bz2 ChibiOS-c1f3c5cb218e185c805f0b7a50a8ad81aa6e2de0.zip |
Fixed bug #377.
Tested ULPI support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8274 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F7xx/USB_CDC/main.c')
-rw-r--r-- | testhal/STM32/STM32F7xx/USB_CDC/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testhal/STM32/STM32F7xx/USB_CDC/main.c b/testhal/STM32/STM32F7xx/USB_CDC/main.c index b4e41c396..92894ee5a 100644 --- a/testhal/STM32/STM32F7xx/USB_CDC/main.c +++ b/testhal/STM32/STM32F7xx/USB_CDC/main.c @@ -27,7 +27,7 @@ #include "usbcfg.h"
/* Virtual serial port over USB.*/
-SerialUSBDriver SDU1;
+SerialUSBDriver SDU2;
/*===========================================================================*/
/* Command line related. */
@@ -113,7 +113,7 @@ static void cmd_write(BaseSequentialStream *chp, int argc, char *argv[]) { }
while (chnGetTimeout((BaseChannel *)chp, TIME_IMMEDIATE) == Q_TIMEOUT) {
- chSequentialStreamWrite(&SDU1, buf, sizeof buf - 1);
+ chSequentialStreamWrite(&SDU2, buf, sizeof buf - 1);
}
chprintf(chp, "\r\n\nstopped\r\n");
}
@@ -127,7 +127,7 @@ static const ShellCommand commands[] = { };
static const ShellConfig shell_cfg1 = {
- (BaseSequentialStream *)&SDU1,
+ (BaseSequentialStream *)&SDU2,
commands
};
@@ -173,8 +173,8 @@ int main(void) { /*
* Initializes a serial-over-USB CDC driver.
*/
- sduObjectInit(&SDU1);
- sduStart(&SDU1, &serusbcfg);
+ sduObjectInit(&SDU2);
+ sduStart(&SDU2, &serusbcfg);
/*
* GPIOI1 is programmed as output (board LED).
@@ -207,7 +207,7 @@ int main(void) { * sleeping in a loop and check the button state.
*/
while (true) {
- if (!shelltp && (SDU1.config->usbp->state == USB_ACTIVE))
+ if (!shelltp && (SDU2.config->usbp->state == USB_ACTIVE))
shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
else if (chThdTerminatedX(shelltp)) {
chThdRelease(shelltp); /* Recovers memory of the previous shell. */
|