X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=examples%2Fasync.c;h=241bb7f17c7bc72b4d1159fbd8ddafec80a3331a;hb=31865800dffc58f2db3ae06a7bbba61bb279b265;hp=0589479ca4ce66844f38595ea4ff6ff3fa230181;hpb=91dbb659016da3166c3e11bb8f83d7aa5b93f4d6;p=libftdi diff --git a/examples/async.c b/examples/async.c index 0589479..241bb7f 100644 --- a/examples/async.c +++ b/examples/async.c @@ -3,7 +3,7 @@ This program is distributed under the GPL, version 2 */ -/* This programm switches to MPSSE mode, and sets and then reads back +/* This program switches to MPSSE mode, and sets and then reads back * the high byte 3 times with three different values. * The expected read values are hard coded in ftdi_init * with 0x00, 0x55 and 0xaa @@ -93,9 +93,9 @@ int main(int argc, char **argv) goto do_deinit; } ftdi_list_free(&devlist); - int err = ftdi_usb_purge_buffers(ftdi); + int err = ftdi_tcioflush(ftdi); if (err != 0) { - fprintf(stderr, "ftdi_usb_purge_buffer: %d: %s\n", + fprintf(stderr, "ftdi_tcioflush: %d: %s\n", err, ftdi_get_error_string(ftdi)); retval = -1; goto do_deinit; @@ -167,7 +167,7 @@ int main(int argc, char **argv) } } if (i < 1) { - printf("Async read unsuccessfull\n"); + printf("Async read unsuccessful\n"); } } printf("Read %02x %02x %02x\n", data[0], data[1], data[2]);