diff --git a/serial.c b/serial.c index 0ca4fb0..ad06d0e 100644 --- a/serial.c +++ b/serial.c @@ -55,7 +55,7 @@ # include #endif -static char *dev_path; +//static char *dev_path; static const unsigned char CMD_PRG[] = "PROGRAM"; static const unsigned char CMD_PRG2[] = "\2"; @@ -576,21 +576,6 @@ char *find_path(int vid, int pid) // Connect to the specified device. // Initiate the programming session. // -int serial_init(int vid, int pid) -{ - dev_path = find_path(vid, pid); - if (!dev_path) { - if (trace_flag) { - fprintf(stderr, "Cannot find USB device %04x:%04x\n", - vid, pid); - } - return -1; - } - - // Succeeded. - printf("Serial port: %s\n", dev_path); - return 0; -} // // Send the command sequence and get back a response. @@ -612,7 +597,8 @@ static int send_recv(const unsigned char *cmd, int cmdlen, } if (serial_write(cmd, cmdlen) < 0) { - fprintf(stderr, "%s: write error\n", dev_path); + //fprintf(stderr, "%s: write error\n", dev_path); + fprintf(stderr, "serial write error\n"); exit(-1); }