git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f44dbec
)
read only what has really been written (seems not to make a difference though)
author
Gerd v. Egidy
<gerd.von.egidy@intra2net.com>
Sun, 6 Dec 2009 19:13:02 +0000 (20:13 +0100)
committer
Gerd v. Egidy
<gerd.von.egidy@intra2net.com>
Sun, 6 Dec 2009 19:13:02 +0000 (20:13 +0100)
write out real baudrate too
examples/baud_test.c
patch
|
blob
|
blame
|
history
diff --git
a/examples/baud_test.c
b/examples/baud_test.c
index
f6bcac9
..
029164a
100644
(file)
--- a/
examples/baud_test.c
+++ b/
examples/baud_test.c
@@
-186,12
+186,12
@@
int main(int argc, char **argv)
if(test_mode==BITMODE_SYNCBB)
{
// read the same amount of data as sent
- ftdi_read_data(&ftdic, rxbuf, txchunksize);
+ ftdi_read_data(&ftdic, rxbuf, sendsize);
}
}
duration=get_prec_time()-start;
- printf("and took %.4f seconds, this is factor %.3f\n",duration,plan/duration);
+ printf("and took %.4f seconds, this is %.0f baud or factor %.3f\n",duration,(plan*baud)/duration,plan/duration);
ftdi_usb_close(&ftdic);
ftdi_deinit(&ftdic);