+// SPDX-License-Identifier: GPL-2.0-or-later
+
/*
* Driver for USB-JTAG, Altera USB-Blaster II and compatibles
*
* Copyright (C) 2013 Franck Jullien franck.jullien@gmail.com
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifdef HAVE_CONFIG_H
#endif
#include <jtag/interface.h>
#include <jtag/commands.h>
+#include "helper/system.h"
#include <libusb_helper.h>
#include <target/image.h>
bool renumeration = false;
int ret;
- if (jtag_libusb_open(vids, pids, NULL, &temp, NULL) == ERROR_OK) {
+ if (jtag_libusb_open(vids, pids, &temp, NULL) == ERROR_OK) {
LOG_INFO("Altera USB-Blaster II (uninitialized) found");
LOG_INFO("Loading firmware...");
ret = load_usb_blaster_firmware(temp, low);
const uint16_t pids_renum[] = { low->ublast_pid, 0 };
if (renumeration == false) {
- if (jtag_libusb_open(vids_renum, pids_renum, NULL,
- &low->libusb_dev, NULL) != ERROR_OK) {
+ if (jtag_libusb_open(vids_renum, pids_renum, &low->libusb_dev, NULL) != ERROR_OK) {
LOG_ERROR("Altera USB-Blaster II not found");
return ERROR_FAIL;
}
} else {
int retry = 10;
- while (jtag_libusb_open(vids_renum, pids_renum, NULL,
- &low->libusb_dev, NULL) != ERROR_OK && retry--) {
+ while (jtag_libusb_open(vids_renum, pids_renum, &low->libusb_dev, NULL) != ERROR_OK && retry--) {
usleep(1000000);
LOG_INFO("Waiting for reenumerate...");
}