From 65c7b5aa24e8e9e5dda1c5897be38fac05143d8d Mon Sep 17 00:00:00 2001 From: Dominic Spill Date: Tue, 27 Feb 2018 16:07:04 -0700 Subject: [PATCH 1/2] Open device counting: increment when opening a device Previously it incremented when the library was initialised, this worked for GNU Radio flowgraphs, but broke elsewhere --- host/libhackrf/src/hackrf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index f097f92b..1bf45749 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -348,7 +348,6 @@ extern "C" int ADDCALL hackrf_init(void) { int libusb_error; - open_devices++; if (g_libusb_context != NULL) { return HACKRF_SUCCESS; } @@ -357,7 +356,6 @@ int ADDCALL hackrf_init(void) if( libusb_error != 0 ) { last_libusb_error = libusb_error; - open_devices--; return HACKRF_ERROR_LIBUSB; } else { return HACKRF_SUCCESS; @@ -582,6 +580,7 @@ static int hackrf_open_setup(libusb_device_handle* usb_device, hackrf_device** d } *device = lib_device; + open_devices++; return HACKRF_SUCCESS; } From 370ee2dce5c5d26753ca7f725c2d1d5dbf832d1e Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Wed, 28 Feb 2018 12:12:32 -0700 Subject: [PATCH 2/2] HackRF One: replaced U20 with Winbond W25Q80JVSSIQ --- hardware/hackrf-one/hackrf-one.net | 4 ++-- hardware/hackrf-one/mcu.sch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/hackrf-one/hackrf-one.net b/hardware/hackrf-one/hackrf-one.net index f11f07b9..1fb1b32b 100644 --- a/hardware/hackrf-one/hackrf-one.net +++ b/hardware/hackrf-one/hackrf-one.net @@ -3456,7 +3456,7 @@ (footprint hackrf:GSG-SOIC8-208) (fields (field (name Manufacturer) Winbond) - (field (name "Part Number") W25Q80BVSSIG) + (field (name "Part Number") W25Q80JVSSIQ) (field (name Description) "IC FLASH 8MBIT 8SOIC")) (libsource (lib hackrf) (part W25Q80BV)) (sheetpath (names /mcu/usb/power/) (tstamps /5037043E/)) @@ -6570,4 +6570,4 @@ (net (code 378) (name "Net-(U4-Pad20)") (node (ref U4) (pin 20))) (net (code 379) (name "Net-(U4-Pad3)") - (node (ref U4) (pin 3))))) \ No newline at end of file + (node (ref U4) (pin 3))))) diff --git a/hardware/hackrf-one/mcu.sch b/hardware/hackrf-one/mcu.sch index 35bf7159..6df65110 100644 --- a/hardware/hackrf-one/mcu.sch +++ b/hardware/hackrf-one/mcu.sch @@ -2088,11 +2088,11 @@ L W25Q80BV U20 U 1 1 4F825D1B P 9800 1450 F 0 "U20" H 9800 1200 60 0000 C CNN -F 1 "W25Q80BV" H 9800 1700 60 0000 C CNN +F 1 "W25Q80JV" H 9800 1700 60 0000 C CNN F 2 "hackrf:GSG-SOIC8-208" H 9800 1450 60 0001 C CNN F 3 "" H 9800 1450 60 0001 C CNN F 4 "Winbond" H 9800 1450 60 0001 C CNN "Manufacturer" -F 5 "W25Q80BVSSIG" H 9800 1450 60 0001 C CNN "Part Number" +F 5 "W25Q80JVSSIQ" H 9800 1450 60 0001 C CNN "Part Number" F 6 "IC FLASH 8MBIT 8SOIC" H 9800 1450 60 0001 C CNN "Description" 1 9800 1450 1 0 0 -1