summaryrefslogtreecommitdiff
path: root/apps/examples/usbterm/usbterm_main.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-02-29 21:53:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-02-29 21:53:28 +0000
commit5faa1bd9cefb4e7a2319faaa5b36da9140aba16a (patch)
tree358673f55511cec814532fbf08a11847936c38cf /apps/examples/usbterm/usbterm_main.c
parent286b14b0c9d2dbad599e80cac9c269c9cd96b408 (diff)
downloadnuttx-5faa1bd9cefb4e7a2319faaa5b36da9140aba16a.tar.gz
nuttx-5faa1bd9cefb4e7a2319faaa5b36da9140aba16a.tar.bz2
nuttx-5faa1bd9cefb4e7a2319faaa5b36da9140aba16a.zip
A little more work (but not much progress) on the PIC32 USB device driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4440 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/usbterm/usbterm_main.c')
-rw-r--r--apps/examples/usbterm/usbterm_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/examples/usbterm/usbterm_main.c b/apps/examples/usbterm/usbterm_main.c
index 5bad8fffe..ba723e91b 100644
--- a/apps/examples/usbterm/usbterm_main.c
+++ b/apps/examples/usbterm/usbterm_main.c
@@ -229,11 +229,11 @@ int MAIN_NAME(int argc, char *argv[])
{
message(MAIN_STRING "Opening USB serial driver\n");
- g_usbterm.outstream = fopen("/dev/ttyUSB0", "w");
+ g_usbterm.outstream = fopen(USBTERM_DEVNAME, "w");
if (g_usbterm.outstream == NULL)
{
int errcode = errno;
- message(MAIN_STRING "ERROR: Failed to open /dev/ttyUSB0 for writing: %d\n",
+ message(MAIN_STRING "ERROR: Failed to open " USBTERM_DEVNAME " for writing: %d\n",
errcode);
/* ENOTCONN means that the USB device is not yet connected */
@@ -261,10 +261,10 @@ int MAIN_NAME(int argc, char *argv[])
* should not fail.
*/
- g_usbterm.instream = fopen("/dev/ttyUSB0", "r");
+ g_usbterm.instream = fopen(USBTERM_DEVNAME, "r");
if (g_usbterm.instream == NULL)
{
- message(MAIN_STRING "ERROR: Failed to open /dev/ttyUSB0 for reading: %d\n", errno);
+ message(MAIN_STRING "ERROR: Failed to open " USBTERM_DEVNAME " for reading: %d\n", errno);
goto errout_with_outstream;
}