X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=lib%2Fcc-usb.c;h=09b06bb54054b2e71c2e5c8c7b4ea8b175fce2f0;hp=a85765af120d61aabe0421cc578108f4e98b94ad;hb=5221dc63cf3a059a32aca2bfa7828c215be814a1;hpb=2d9b8a83a2d9f495199033e43f519d26f27938fe diff --git a/lib/cc-usb.c b/lib/cc-usb.c index a85765af..09b06bb5 100644 --- a/lib/cc-usb.c +++ b/lib/cc-usb.c @@ -201,7 +201,7 @@ cc_usb_sync(struct cc_usb *cc) } } -static void +void cc_usb_printf(struct cc_usb *cc, char *format, ...) { char buf[1024], *b; @@ -226,6 +226,7 @@ cc_usb_printf(struct cc_usb *cc, char *format, ...) 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); } @@ -250,7 +251,7 @@ cc_usb_send_bytes(struct cc_usb *cc, uint8_t *bytes, int len) return ret; } -static void +void cc_queue_read(struct cc_usb *cc, uint8_t *buf, int len) { struct cc_read *read_buf;