FreeCalypso > hg > fc-usbser-tools
diff fteeprom/fteeprom-erase.c @ 42:2746b160afb7
fteeprom-erase: we don't need to claim the interface
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 10 Sep 2023 21:26:04 +0000 |
parents | af801ab43a33 |
children | d682cac178c2 |
line wrap: on
line diff
--- a/fteeprom/fteeprom-erase.c Sun Sep 10 21:22:20 2023 +0000 +++ b/fteeprom/fteeprom-erase.c Sun Sep 10 21:26:04 2023 +0000 @@ -34,8 +34,12 @@ 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); + } ftmini_erase_eeprom(usbh); - usbwrap_close_dev(usbh); + usb_close(usbh); exit(0); }