FreeCalypso > hg > fc-usbser-tools
changeset 32:bb1d0956b0a8
fteeprom-read: we can do it without kicking off ftdi_sio driver
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Sep 2023 19:56:11 +0000 |
parents | 530ec3792de8 |
children | df284688d0c8 |
files | fteeprom/fteeprom-read.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/fteeprom/fteeprom-read.c Sat Sep 09 19:40:58 2023 +0000 +++ b/fteeprom/fteeprom-read.c Sat Sep 09 19:56:11 2023 +0000 @@ -60,7 +60,11 @@ fprintf(stderr, "error: specified USB device not found\n"); exit(1); } - usbh = usbwrap_open_dev(dev, 1); + usbh = usb_open(dev); + if (!usbh) { + fprintf(stderr, "error: usb_open() failed\n"); + exit(1); + } for (n = 0; n < eeprom_size; n++) { word = ftmini_read_eeprom_loc(usbh, n); col = n & 7; @@ -70,6 +74,6 @@ if (col == 7) putchar('\n'); } - usbwrap_close_dev(usbh); + usb_close(usbh); exit(0); }