}
}
-static void
+void
cc_usb_printf(struct cc_usb *cc, char *format, ...)
{
char buf[1024], *b;
memcpy(cc->out_buf + cc->out_count, b, this_time);
cc->out_count += this_time;
ret -= this_time;
+ b += this_time;
while (cc->out_count >= CC_BUF)
cc_usb_sync(cc);
}
return ret;
}
-static void
+void
cc_queue_read(struct cc_usb *cc, uint8_t *buf, int len)
{
struct cc_read *read_buf;
static struct termios save_termios;
struct cc_usb *
-cc_usb_open(void)
+cc_usb_open(char *tty)
{
struct cc_usb *cc;
- char *tty;
struct termios termios;
- tty = getenv("CCDBG_TTY");
if (!tty)
tty = DEFAULT_TTY;
cc = calloc (sizeof (struct cc_usb), 1);