X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/bf3f2c5f96cdfc7629e93d810f42550349388122..3db3fc270d517ca76518b47950f5240990e84cc5:/binwire.c diff --git a/binwire.c b/binwire.c index ed6b98c..a878a5d 100644 --- a/binwire.c +++ b/binwire.c @@ -45,7 +45,7 @@ void expect_no_chars() { int cs = 0; - while (waitchar(10) == 1) + while (waitchar(100) == 1) { char c; if (read(0, &c, 1) == 0) @@ -77,10 +77,11 @@ void main(int argc, char **argv) exit(1); } - dowrite("\x1B" "A\x00\x00\x00...", 8); + dowrite("\x1B" "A\x00\x00\x00", 5); fprintf(stderr, "Address sent\n"); - expect("A...", 4); - while ((sz = read(rfd, buf+3, 128)) > 0) + expect("A", 1); + expect_no_chars(); + while ((sz = read(rfd, buf+3, 255)) > 0) { buf[0] = 0x1B; buf[1] = 'D';