├── .travis.yml ├── CMakeLists.txt ├── README.md ├── airspy-tools ├── 52-airspy.rules ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── getopt │ ├── LICENSE.md │ ├── getopt.c │ └── getopt.h └── src │ ├── CMakeLists.txt │ ├── airspy_calibrate.c │ ├── airspy_gpio.c │ ├── airspy_gpiodir.c │ ├── airspy_info.c │ ├── airspy_lib_version.c │ ├── airspy_r820t.c │ ├── airspy_rx.c │ ├── airspy_si5351c.c │ └── airspy_spiflash.c ├── cmake ├── cmake_uninstall.cmake.in └── modules │ ├── FindLIBAIRSPY.cmake │ ├── FindLIBUSB.cmake │ └── FindThreads.cmake └── libairspy ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── libairspy.pc.in ├── src ├── CMakeLists.txt ├── airspy.c ├── airspy.h ├── airspy_commands.h ├── filters.h ├── iqconverter_float.c ├── iqconverter_float.h ├── iqconverter_int16.c ├── iqconverter_int16.h └── win32 │ └── airspy.rc └── vc ├── airspy_2013.vcxproj ├── airspy_2019.sln ├── airspy_calibrate_2013.vcxproj ├── airspy_gpio_2013.vcxproj ├── airspy_gpiodir_2013.vcxproj ├── airspy_info_2013.vcxproj ├── airspy_lib_version_2013.vcxproj ├── airspy_r820t_2013.vcxproj ├── airspy_rx_2013.vcxproj ├── airspy_si5351c_2013.vcxproj ├── airspy_spiflash_2013.vcxproj ├── getopt ├── LICENSE.md ├── getopt.c ├── getopt.h └── getopt1.c ├── getopt_2013.vcxproj └── libs ├── Win32 ├── libusb-1.0.dll └── pthreadVCE2.dll └── x64 ├── libusb-1.0.dll └── pthreadVC2.dll /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: 3 | - gcc 4 | - clang 5 | 6 | before_install: 7 | - sudo apt-get update -qq 8 | - sudo apt-get install -qq libusb-1.0-0-dev 9 | 10 | script: cmake . && make && sudo make install 11 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #top dir cmake project for libairspy + airspy-tools 2 | 3 | cmake_minimum_required(VERSION 2.8.12.1) 4 | project (airspy_all) 5 | 6 | #provide missing strtoull() for VC11 7 | if(MSVC11) 8 | add_definitions(-Dstrtoull=_strtoui64) 9 | endif(MSVC11) 10 | 11 | if (MSVC) 12 | add_compile_options(/std:c17) 13 | else() 14 | add_compile_options(-std=gnu17) 15 | endif() 16 | 17 | add_subdirectory(libairspy) 18 | add_subdirectory(airspy-tools) 19 | 20 | ######################################################################## 21 | # Create uninstall target 22 | ######################################################################## 23 | 24 | configure_file( 25 | ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in 26 | ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake 27 | @ONLY) 28 | 29 | 30 | add_custom_target(uninstall 31 | ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake 32 | ) 33 | 34 | ######################################################################## 35 | # Copy Files Win32 only 36 | ######################################################################## 37 | 38 | if(WIN32 AND NOT CMAKE_CROSSCOMPILING) 39 | if (NOT MINGW) 40 | if (NOT DEFINED LIBUSB_LIBRARIES) 41 | configure_file( 42 | ${CMAKE_CURRENT_BINARY_DIR}/../libs_win32/libusb-1.0.dll 43 | ${CMAKE_CURRENT_BINARY_DIR}/airspy-tools/src/libusb-1.0.dll 44 | COPYONLY) 45 | endif() 46 | 47 | if (NOT DEFINED THREADS_PTHREADS_WIN32_LIBRARY) 48 | configure_file( 49 | ${CMAKE_CURRENT_BINARY_DIR}/../libs_win32/pthreadGC2.dll 50 | ${CMAKE_CURRENT_BINARY_DIR}/airspy-tools/src/pthreadGC2.dll 51 | COPYONLY) 52 | endif() 53 | endif() 54 | endif() 55 | 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AirSpy 2 | ====== 3 | 4 | A tiny and efficient software defined radio. 5 | 6 | This repository contains host software (Linux/Windows) for AirSpy, a project to 7 | produce a low cost, open source software radio platform. 8 | 9 | AirSpy: http://www.airspy.com 10 | 11 | ## How to build host software on Windows: 12 | 13 | ### For VisualStudio 2013 or later: 14 | 15 | * `git clone https://github.com/airspy/airspyone_host.git host` 16 | * Download https://github.com/libusb/libusb/releases/download/v1.0.20/libusb-1.0.20.7z 17 | * Extract **libusb-1.0.20.7z** to host directory 18 | * You should have **host\libusb-1.0.20** 19 | * Inside this directory there is README.txt, libusb-1.0.def and some directories 20 | * Download ftp://mirrors.kernel.org/sourceware/pthreads-win32/pthreads-w32-2-9-1-release.zip 21 | * Extract **pthreads-w32-2-9-1-release.zip** to host directory 22 | * You should have **host\libpthread-2-9-1-win** 23 | * Inside this directory there is lot of README files and some directories (dll, include, lib) 24 | * Launch host\libairspy\vc\airspy_2013.sln with VisualStudio 2013, choose **Release** and **Build Solution** 25 | 26 | ### Windows MSYS2/mingw64 27 | - Install MSYS2/mingw64 from https://www.msys2.org 28 | - Start mingw64 console 29 | - `pacman -Syu` 30 | - `pacman -S git mingw-w64-x86_64-make mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gcc mingw-w64-x86_64-libusb` 31 | 32 | - For Windows OS less than Vista Install Windows driver for AirSpy hardware or use Zadig see http://sourceforge.net/projects/libwdi/files/zadig 33 | - If you want to use Zadig select AirSpy USB device and just install/replace it with WinUSB driver. 34 | 35 | >**Note for Windows build:** 36 | You shall always execute airspy_tools from Windows command shell and not from Cygwin or Mingw shell because on Cygwin/Mingw 37 | Ctrl C is not managed correctly and especially for airspy_rx the Ctrl C(abort) will not stop correctly and will corrupt the file. 38 | 39 | ``` 40 | git clone https://github.com/airspy/airspyone_host.git host 41 | cd host 42 | mkdir build 43 | cd build 44 | ``` 45 | 46 | #### Release version 47 | ``` 48 | cmake ../ -G "MinGW Makefiles" 49 | mingw32-make.exe clean all 50 | ``` 51 | - Optional copy libusb-1.0.dll & libwinpthread-1.dll to same directory as the executable(if it is not in your path) 52 | - `cp /mingw64/bin/libusb-1.0.dll ./airspy-tools/src/` 53 | - `cp /mingw64/bin/libwinpthread-1.dll ./airspy-tools/src/` 54 | 55 | #### Debug version 56 | ``` 57 | cmake ../ -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug 58 | mingw32-make.exe clean all 59 | ``` 60 | - Optional copy libusb-1.0.dll & libwinpthread-1.dll to same directory as the executable(if it is not in your path) 61 | - `cp /mingw64/bin/libusb-1.0.dll ./airspy-tools/src/` 62 | - `cp /mingw64/bin/libwinpthread-1.dll ./airspy-tools/src/` 63 | 64 | ## How to build the host software on Linux: 65 | 66 | ### Prerequisites for Linux (Debian/Ubuntu/Raspbian): 67 | 68 | 69 | `sudo apt-get install build-essential cmake libusb-1.0-0-dev pkg-config` 70 | 71 | 72 | ### Build host software on Linux: 73 | 74 | ``` 75 | wget https://github.com/airspy/airspyone_host/archive/master.zip 76 | unzip master.zip 77 | cd airspyone_host-master 78 | mkdir build 79 | cd build 80 | cmake ../ -DINSTALL_UDEV_RULES=ON 81 | make 82 | sudo make install 83 | sudo ldconfig 84 | ``` 85 | 86 | ## Clean CMake temporary files/dirs: 87 | ``` 88 | cd airspyone_host-master/build 89 | rm -rf * 90 | ``` 91 | ## How to build host software on FreeBSD. 92 | 93 | ### Get the prerequisites (from root) 94 | 95 | `pkg install git cmake` 96 | 97 | ### Build 98 | ``` 99 | git clone https:\\github.com\airspy\airspyone_host.git 100 | cd airspyone_host 101 | mkdir build 102 | cd build 103 | cmake .. -DLIBUSB_LIBRARIES=/usr/lib/libusb.so 104 | make 105 | ``` 106 | (from root) 107 | `make install` 108 | 109 | ### Add users to group plugdev 110 | 111 | (from root) 112 | `usermod -a -G plugdev ` 113 | 114 | ## Principal authors: 115 | 116 | Benjamin Vernoux and Youssef Touil 117 | 118 | 119 | http://www.airspy.com 120 | 121 | This file is part of AirSpy (based on HackRF project see http://greatscottgadgets.com/hackrf/). 122 | -------------------------------------------------------------------------------- /airspy-tools/52-airspy.rules: -------------------------------------------------------------------------------- 1 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="60a1", SYMLINK+="airspy-%k", MODE="660", GROUP="plugdev" 2 | -------------------------------------------------------------------------------- /airspy-tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2012 Jared Boone 2 | # Copyright 2013/2014 Benjamin Vernoux 3 | # 4 | # This file is part of AirSpy (based on HackRF project). 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2, or (at your option) 9 | # any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | # 21 | 22 | # Based heavily upon the libftdi cmake setup. 23 | 24 | cmake_minimum_required(VERSION 2.8.12.1) 25 | project(airspy-tools C) 26 | set(MAJOR_VERSION 0) 27 | set(MINOR_VERSION 2) 28 | set(PACKAGE airspy-tools) 29 | set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) 30 | set(VERSION ${VERSION_STRING}) 31 | set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/modules) 32 | set(CMAKE_BUILD_TYPE Release) 33 | add_definitions(-D_FILE_OFFSET_BITS=64) 34 | 35 | if(MSVC) 36 | include_directories(getopt) 37 | add_definitions(/D _CRT_SECURE_NO_WARNINGS) 38 | else() 39 | add_definitions(-Wall) 40 | endif() 41 | 42 | if(NOT libairspy_SOURCE_DIR) 43 | find_package(LIBAIRSPY REQUIRED) 44 | include_directories(${LIBAIRSPY_INCLUDE_DIR}) 45 | else() 46 | include_directories(${libairspy_SOURCE_DIR}/src) 47 | endif() 48 | 49 | add_subdirectory(src) 50 | 51 | ######################################################################## 52 | # Create uninstall target 53 | ######################################################################## 54 | 55 | if(NOT airspy_all_SOURCE_DIR) 56 | configure_file( 57 | ${PROJECT_SOURCE_DIR}/../cmake/cmake_uninstall.cmake.in 58 | ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake 59 | @ONLY) 60 | 61 | 62 | add_custom_target(uninstall 63 | ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake 64 | ) 65 | endif() 66 | 67 | ######################################################################## 68 | # Install udev rules 69 | ######################################################################## 70 | option(INSTALL_UDEV_RULES "Install udev rules for AirSpy" OFF) 71 | if (INSTALL_UDEV_RULES) 72 | install ( 73 | FILES 52-airspy.rules 74 | DESTINATION "/etc/udev/rules.d" 75 | COMPONENT "udev" 76 | ) 77 | else (INSTALL_UDEV_RULES) 78 | message (STATUS "Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON") 79 | endif (INSTALL_UDEV_RULES) 80 | -------------------------------------------------------------------------------- /airspy-tools/README.md: -------------------------------------------------------------------------------- 1 | AirSpy 2 | ====== 3 | 4 | A tiny but efficient software defined radio. 5 | 6 | This repository contains host software (Linux/Windows) for AirSpy, a project to 7 | produce a low cost, open source software radio platform. 8 | 9 | AirSpy: http://www.airspy.com 10 | 11 | For more details on how to build airspy-tools see previous directory host README.md file. 12 | 13 | ## Principal authors: 14 | 15 | Benjamin Vernoux and Youssef Touil 16 | 17 | 18 | http://www.airspy.com 19 | 20 | This file is part of AirSpy (based on HackRF project see http://greatscottgadgets.com/hackrf/). 21 | -------------------------------------------------------------------------------- /airspy-tools/getopt/getopt.h: -------------------------------------------------------------------------------- 1 | /* Declarations for getopt. 2 | Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. 3 | This file is part of the GNU C Library. 4 | 5 | The GNU C Library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | The GNU C Library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with the GNU C Library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 | 02111-1307 USA. */ 19 | 20 | #ifndef _GETOPT_H 21 | 22 | #ifndef __need_getopt 23 | # define _GETOPT_H 1 24 | #endif 25 | 26 | /* If __GNU_LIBRARY__ is not already defined, either we are being used 27 | standalone, or this is the first header included in the source file. 28 | If we are being used with glibc, we need to include , but 29 | that does not exist if we are standalone. So: if __GNU_LIBRARY__ is 30 | not defined, include , which will pull in for us 31 | if it's from glibc. (Why ctype.h? It's guaranteed to exist and it 32 | doesn't flood the namespace with stuff the way some other headers do.) */ 33 | #if !defined __GNU_LIBRARY__ 34 | # include 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /* For communication from `getopt' to the caller. 42 | When `getopt' finds an option that takes an argument, 43 | the argument value is returned here. 44 | Also, when `ordering' is RETURN_IN_ORDER, 45 | each non-option ARGV-element is returned here. */ 46 | 47 | extern char *optarg; 48 | 49 | /* Index in ARGV of the next element to be scanned. 50 | This is used for communication to and from the caller 51 | and for communication between successive calls to `getopt'. 52 | 53 | On entry to `getopt', zero means this is the first call; initialize. 54 | 55 | When `getopt' returns -1, this is the index of the first of the 56 | non-option elements that the caller should itself scan. 57 | 58 | Otherwise, `optind' communicates from one call to the next 59 | how much of ARGV has been scanned so far. */ 60 | 61 | extern int optind; 62 | 63 | /* Callers store zero here to inhibit the error message `getopt' prints 64 | for unrecognized options. */ 65 | 66 | extern int opterr; 67 | 68 | /* Set to an option character which was unrecognized. */ 69 | 70 | extern int optopt; 71 | 72 | #ifndef __need_getopt 73 | /* Describe the long-named options requested by the application. 74 | The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector 75 | of `struct option' terminated by an element containing a name which is 76 | zero. 77 | 78 | The field `has_arg' is: 79 | no_argument (or 0) if the option does not take an argument, 80 | required_argument (or 1) if the option requires an argument, 81 | optional_argument (or 2) if the option takes an optional argument. 82 | 83 | If the field `flag' is not NULL, it points to a variable that is set 84 | to the value given in the field `val' when the option is found, but 85 | left unchanged if the option is not found. 86 | 87 | To have a long-named option do something other than set an `int' to 88 | a compiled-in constant, such as set a value from `optarg', set the 89 | option's `flag' field to zero and its `val' field to a nonzero 90 | value (the equivalent single-letter option character, if there is 91 | one). For long options that have a zero `flag' field, `getopt' 92 | returns the contents of the `val' field. */ 93 | 94 | struct option 95 | { 96 | # if (defined __STDC__ && __STDC__) || defined __cplusplus 97 | const char *name; 98 | # else 99 | char *name; 100 | # endif 101 | /* has_arg can't be an enum because some compilers complain about 102 | type mismatches in all the code that assumes it is an int. */ 103 | int has_arg; 104 | int *flag; 105 | int val; 106 | }; 107 | 108 | /* Names for the values of the `has_arg' field of `struct option'. */ 109 | 110 | # define no_argument 0 111 | # define required_argument 1 112 | # define optional_argument 2 113 | #endif /* need getopt */ 114 | 115 | 116 | /* Get definitions and prototypes for functions to process the 117 | arguments in ARGV (ARGC of them, minus the program name) for 118 | options given in OPTS. 119 | 120 | Return the option character from OPTS just read. Return -1 when 121 | there are no more options. For unrecognized options, or options 122 | missing arguments, `optopt' is set to the option letter, and '?' is 123 | returned. 124 | 125 | The OPTS string is a list of characters which are recognized option 126 | letters, optionally followed by colons, specifying that that letter 127 | takes an argument, to be placed in `optarg'. 128 | 129 | If a letter in OPTS is followed by two colons, its argument is 130 | optional. This behavior is specific to the GNU `getopt'. 131 | 132 | The argument `--' causes premature termination of argument 133 | scanning, explicitly telling `getopt' that there are no more 134 | options. 135 | 136 | If OPTS begins with `--', then non-option arguments are treated as 137 | arguments to the option '\0'. This behavior is specific to the GNU 138 | `getopt'. */ 139 | 140 | #if (defined __STDC__ && __STDC__) || defined __cplusplus 141 | # ifdef __GNU_LIBRARY__ 142 | /* Many other libraries have conflicting prototypes for getopt, with 143 | differences in the consts, in stdlib.h. To avoid compilation 144 | errors, only prototype getopt for the GNU C library. */ 145 | extern int getopt (int __argc, char *const *__argv, const char *__shortopts); 146 | # else /* not __GNU_LIBRARY__ */ 147 | extern int getopt (); 148 | # endif /* __GNU_LIBRARY__ */ 149 | 150 | # ifndef __need_getopt 151 | extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, 152 | const struct option *__longopts, int *__longind); 153 | extern int getopt_long_only (int __argc, char *const *__argv, 154 | const char *__shortopts, 155 | const struct option *__longopts, int *__longind); 156 | 157 | /* Internal only. Users should not call this directly. */ 158 | extern int _getopt_internal (int __argc, char *const *__argv, 159 | const char *__shortopts, 160 | const struct option *__longopts, int *__longind, 161 | int __long_only); 162 | # endif 163 | #else /* not __STDC__ */ 164 | extern int getopt (); 165 | # ifndef __need_getopt 166 | extern int getopt_long (); 167 | extern int getopt_long_only (); 168 | 169 | extern int _getopt_internal (); 170 | # endif 171 | #endif /* __STDC__ */ 172 | 173 | #ifdef __cplusplus 174 | } 175 | #endif 176 | 177 | /* Make sure we later can get all the definitions and declarations. */ 178 | #undef __need_getopt 179 | 180 | #endif /* getopt.h */ 181 | -------------------------------------------------------------------------------- /airspy-tools/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2012 Jared Boone 2 | # Copyright 2013/2014/2024 Benjamin Vernoux 3 | # 4 | # This file is part of AirSpy (based on HackRF project). 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2, or (at your option) 9 | # any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | # 21 | 22 | # Based heavily upon the libftdi cmake setup. 23 | 24 | set(INSTALL_DEFAULT_BINDIR "bin" CACHE STRING "Appended to CMAKE_INSTALL_PREFIX") 25 | 26 | if(MSVC) 27 | add_library(libgetopt_static STATIC 28 | ${CMAKE_CURRENT_SOURCE_DIR}/../getopt/getopt.c 29 | ) 30 | endif() 31 | 32 | add_executable(airspy_gpio airspy_gpio.c) 33 | install(TARGETS airspy_gpio RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 34 | 35 | add_executable(airspy_gpiodir airspy_gpiodir.c) 36 | install(TARGETS airspy_gpiodir RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 37 | 38 | add_executable(airspy_lib_version airspy_lib_version.c) 39 | install(TARGETS airspy_lib_version RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 40 | 41 | add_executable(airspy_si5351c airspy_si5351c.c) 42 | install(TARGETS airspy_si5351c RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 43 | 44 | add_executable(airspy_r820t airspy_r820t.c) 45 | install(TARGETS airspy_r820t RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 46 | 47 | add_executable(airspy_spiflash airspy_spiflash.c) 48 | install(TARGETS airspy_spiflash RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 49 | 50 | add_executable(airspy_calibrate airspy_calibrate.c) 51 | install(TARGETS airspy_calibrate RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 52 | 53 | add_executable(airspy_info airspy_info.c) 54 | install(TARGETS airspy_info RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 55 | 56 | add_executable(airspy_rx airspy_rx.c) 57 | install(TARGETS airspy_rx RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) 58 | 59 | if(NOT libairspy_SOURCE_DIR) 60 | include_directories(${LIBAIRSPY_INCLUDE_DIR}) 61 | LIST(APPEND TOOLS_LINK_LIBS ${LIBAIRSPY_LIBRARIES}) 62 | else() 63 | LIST(APPEND TOOLS_LINK_LIBS airspy) 64 | endif() 65 | 66 | if(MSVC) 67 | LIST(APPEND TOOLS_LINK_LIBS libgetopt_static) 68 | endif() 69 | 70 | target_link_libraries(airspy_gpio ${TOOLS_LINK_LIBS}) 71 | target_link_libraries(airspy_gpiodir ${TOOLS_LINK_LIBS}) 72 | target_link_libraries(airspy_lib_version ${TOOLS_LINK_LIBS}) 73 | target_link_libraries(airspy_si5351c ${TOOLS_LINK_LIBS}) 74 | target_link_libraries(airspy_r820t ${TOOLS_LINK_LIBS}) 75 | target_link_libraries(airspy_spiflash ${TOOLS_LINK_LIBS}) 76 | target_link_libraries(airspy_calibrate ${TOOLS_LINK_LIBS}) 77 | target_link_libraries(airspy_info ${TOOLS_LINK_LIBS}) 78 | target_link_libraries(airspy_rx ${TOOLS_LINK_LIBS}) 79 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_calibrate.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Benjamin Vernoux 3 | * 4 | * This file is part of AirSpy. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | #include 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #ifndef bool 30 | typedef int bool; 31 | #define true 1 32 | #define false 0 33 | #endif 34 | 35 | #define AIRSPY_FLASH_CALIB_OFFSET (0x20000) /* After 128KB (Reserved for Firmware + 64KB Spare) */ 36 | #define AIRSPY_FLASH_CALIB_HEADER (0xCA1B0001) 37 | 38 | typedef struct 39 | { 40 | uint32_t header; /* Shall be equal to AIRSPY_FLASH_CALIB_HEADER */ 41 | uint32_t timestamp; /* Epoch Unix Time Stamp */ 42 | int32_t correction_ppb; 43 | } airspy_calib_t; 44 | 45 | static void usage() 46 | { 47 | printf("Usage:\n"); 48 | printf("\t-r: Read and display calibration data.\n"); 49 | printf("\t-w : Erase and Write calibration in ppb.\n"); 50 | } 51 | 52 | int main(int argc, char **argv) 53 | { 54 | int opt; 55 | struct airspy_device* device = NULL; 56 | int result; 57 | bool read = false; 58 | bool write = false; 59 | int32_t calibration_ppb = 0; 60 | airspy_calib_t calib; 61 | 62 | while ((opt = getopt(argc, argv, "rw:")) != EOF) 63 | { 64 | switch (opt) { 65 | case 'r': 66 | read = true; 67 | break; 68 | 69 | case 'w': 70 | write = true; 71 | calibration_ppb = atoi(optarg); 72 | break; 73 | 74 | default: 75 | fprintf(stderr, "opt error: %d\n", opt); 76 | usage(); 77 | return EXIT_FAILURE; 78 | } 79 | } 80 | 81 | if (write == read) { 82 | if (write == true) { 83 | fprintf(stderr, "Read and write options are mutually exclusive.\n"); 84 | } else { 85 | fprintf(stderr, "Specify either read or write option.\n"); 86 | } 87 | usage(); 88 | return EXIT_FAILURE; 89 | } 90 | 91 | result = airspy_init(); 92 | if (result != AIRSPY_SUCCESS) { 93 | fprintf(stderr, "airspy_init() failed: %s (%d)\n", airspy_error_name(result), result); 94 | return EXIT_FAILURE; 95 | } 96 | 97 | result = airspy_open(&device); 98 | if (result != AIRSPY_SUCCESS) { 99 | fprintf(stderr, "Failed to open airspy device.\n"); 100 | return 1; 101 | } 102 | 103 | if (read) { 104 | printf("Reading %d bytes from 0x%06x.\n", (int)sizeof(calib), AIRSPY_FLASH_CALIB_OFFSET); 105 | result = airspy_spiflash_read(device, AIRSPY_FLASH_CALIB_OFFSET, (int)sizeof(calib), (uint8_t *)&calib); 106 | if (result != AIRSPY_SUCCESS) { 107 | fprintf(stderr, "airspy_spiflash_read() failed: %s (%d)\n", airspy_error_name(result), result); 108 | return EXIT_FAILURE; 109 | } 110 | time_t epoch_time = calib.timestamp; 111 | struct tm *local_time = localtime(&epoch_time); 112 | printf("Calibration timestamp: %04d/%02d/%02d %02d:%02d:%02d\nCalibration correction in ppb: %d\n", 113 | local_time->tm_year + 1900, 114 | local_time->tm_mon + 1, 115 | local_time->tm_mday, 116 | local_time->tm_hour, 117 | local_time->tm_min, 118 | local_time->tm_sec, 119 | calib.correction_ppb); 120 | } 121 | if(write) { 122 | printf("Erasing sector 2 (calibration) in SPI flash.\n"); 123 | result = airspy_spiflash_erase_sector(device, 2); 124 | if (result != AIRSPY_SUCCESS) { 125 | fprintf(stderr, "Failed to erase sector 2.\n"); 126 | return 1; 127 | } 128 | 129 | calib.header = AIRSPY_FLASH_CALIB_HEADER; 130 | calib.timestamp = (uint32_t)time(NULL); 131 | calib.correction_ppb = calibration_ppb; 132 | 133 | printf("Writing calibration %d bytes at 0x%06x.\n", (int)sizeof(calib), AIRSPY_FLASH_CALIB_OFFSET); 134 | time_t epoch_time = calib.timestamp; 135 | struct tm *local_time = localtime(&epoch_time); 136 | printf("Calibration timestamp: %04d/%02d/%02d %02d:%02d:%02d\nCalibration correction in ppb: %d\n", 137 | local_time->tm_year + 1900, 138 | local_time->tm_mon + 1, 139 | local_time->tm_mday, 140 | local_time->tm_hour, 141 | local_time->tm_min, 142 | local_time->tm_sec, 143 | calib.correction_ppb); 144 | result = airspy_spiflash_write(device, AIRSPY_FLASH_CALIB_OFFSET, sizeof(calib), (uint8_t *)&calib); 145 | if (result != AIRSPY_SUCCESS) { 146 | fprintf(stderr, "Failed to write calibration data.\n"); 147 | return 1; 148 | } 149 | } 150 | 151 | result = airspy_close(device); 152 | if (result != AIRSPY_SUCCESS) { 153 | fprintf(stderr, "airspy_close() failed: %s (%d)\n", airspy_error_name(result), result); 154 | return EXIT_FAILURE; 155 | } 156 | 157 | airspy_exit(); 158 | 159 | return EXIT_SUCCESS; 160 | } 161 | 162 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_gpio.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013/2014 Benjamin Vernoux 3 | * 4 | * This file is part of AirSpy (based on HackRF project). 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #ifndef bool 30 | typedef int bool; 31 | #define true 1 32 | #define false 0 33 | #endif 34 | 35 | #define PORT_NUM_INVALID (255) 36 | #define PIN_NUM_INVALID (255) 37 | 38 | #define PORT_NUM_MIN (0) 39 | #define PORT_NUM_MAX (7) 40 | 41 | #define PIN_NUM_MIN (0) 42 | #define PIN_NUM_MAX (31) 43 | 44 | static void usage() { 45 | printf("Usage:\n"); 46 | printf("\t-p, --port_no

: set port number

[0,7] for subsequent read/write operations\n"); 47 | printf("\t-n, --pin_no : set pin number[0,31] for subsequent read/write operations\n"); 48 | printf("\t-r, --read: read port number/pin number value and direction specified by last -n argument, or all port/pin\n"); 49 | printf("\t-w, --write : write value specified by last -n argument with value[0,1]\n"); 50 | printf("\t[-s serial_number_64bits]: Open board with specified 64bits serial number.\n"); 51 | printf("\nExamples:\n"); 52 | printf("\t -p 0 -n 12 -r # reads from port 0 pin number 12\n"); 53 | printf("\t -r # reads all pins on all ports\n"); 54 | printf("\t -p 0 -n 10 -w 1 # writes port 0 pin number 10 with 1 decimal\n"); 55 | printf("\nHardware Info AirSpy:\n"); 56 | printf("LED1(out): -p 0 -n 12 (0=OFF, 1=ON)\n"); 57 | printf("Enable R820T(out): -p 1 -n 7 (0=OFF, 1=ON)\n"); 58 | printf("Enable BiasT(out): -p 1 -n 13 (0=OFF, 1=ON)\n"); 59 | } 60 | 61 | static struct option long_options[] = { 62 | { "port_no", required_argument, 0, 'p' }, 63 | { "pin_no", required_argument, 0, 'n' }, 64 | { "write", required_argument, 0, 'w' }, 65 | { "read", no_argument, 0, 'r' }, 66 | { 0, 0, 0, 0 }, 67 | }; 68 | 69 | int parse_u8(char* const s, uint8_t* const value) { 70 | char* s_end = s; 71 | const long int long_value = strtol(s, &s_end, 10); 72 | if( (s != s_end) && (*s_end == 0) ) { 73 | if((long_value >=0 ) && (long_value < 256)) { 74 | *value = (uint8_t)long_value; 75 | return AIRSPY_SUCCESS; 76 | } else { 77 | return AIRSPY_ERROR_INVALID_PARAM; 78 | } 79 | } else { 80 | return AIRSPY_ERROR_INVALID_PARAM; 81 | } 82 | } 83 | 84 | int parse_u64(char* s, uint64_t* const value) { 85 | uint_fast8_t base = 10; 86 | char* s_end; 87 | uint64_t u64_value; 88 | 89 | if( strlen(s) > 2 ) { 90 | if( s[0] == '0' ) { 91 | if( (s[1] == 'x') || (s[1] == 'X') ) { 92 | base = 16; 93 | s += 2; 94 | } else if( (s[1] == 'b') || (s[1] == 'B') ) { 95 | base = 2; 96 | s += 2; 97 | } 98 | } 99 | } 100 | 101 | s_end = s; 102 | u64_value = strtoull(s, &s_end, base); 103 | if( (s != s_end) && (*s_end == 0) ) { 104 | *value = u64_value; 105 | return AIRSPY_SUCCESS; 106 | } else { 107 | return AIRSPY_ERROR_INVALID_PARAM; 108 | } 109 | } 110 | 111 | int dump_port_pin(struct airspy_device* device, 112 | airspy_gpio_port_t port_number, 113 | airspy_gpio_pin_t pin_number) 114 | { 115 | uint8_t value; 116 | int result = airspy_gpio_read(device, port_number, pin_number, &value); 117 | 118 | if( result == AIRSPY_SUCCESS ) { 119 | printf("gpio[%1d][%2d] -> 0x%02X", port_number, pin_number, value); 120 | 121 | result = airspy_gpiodir_read(device, port_number, pin_number, &value); 122 | if( result == AIRSPY_SUCCESS ) { 123 | if(value == 1) 124 | printf(" out(1)\n"); 125 | else 126 | printf(" in(0)\n"); 127 | } else { 128 | printf("airspy_gpiodir_read() failed: %s (%d)\n", airspy_error_name(result), result); 129 | } 130 | } else { 131 | printf("airspy_gpio_read() failed: %s (%d)\n", airspy_error_name(result), result); 132 | } 133 | 134 | return result; 135 | } 136 | 137 | int dump_port(struct airspy_device* device, airspy_gpio_port_t port_number) 138 | { 139 | airspy_gpio_pin_t pin_number; 140 | int result = AIRSPY_SUCCESS; 141 | 142 | for(pin_number = GPIO_PIN0; pin_number < (GPIO_PIN31+1); pin_number++) 143 | { 144 | result = dump_port_pin(device, port_number, pin_number); 145 | } 146 | return result; 147 | } 148 | 149 | int dump_ports(struct airspy_device* device) 150 | { 151 | uint8_t port_number; 152 | int result = AIRSPY_SUCCESS; 153 | 154 | for(port_number = GPIO_PORT0; port_number < (GPIO_PORT7+1); port_number++) 155 | { 156 | result = dump_port(device, port_number); 157 | if( result != AIRSPY_SUCCESS ) { 158 | break; 159 | } 160 | } 161 | return result; 162 | } 163 | 164 | int write_port_pin(struct airspy_device* device, 165 | airspy_gpio_port_t port_number, 166 | airspy_gpio_pin_t pin_number, 167 | uint8_t value) 168 | { 169 | int result; 170 | result = airspy_gpio_write(device, port_number, pin_number, value); 171 | 172 | if( result == AIRSPY_SUCCESS ) { 173 | printf("0x%02X -> gpio[%1d][%2d]\n", value, port_number, pin_number); 174 | } else { 175 | printf("airspy_gpio_write() failed: %s (%d)\n", airspy_error_name(result), result); 176 | } 177 | return result; 178 | } 179 | 180 | bool serial_number = false; 181 | uint64_t serial_number_val; 182 | 183 | int main(int argc, char** argv) { 184 | int opt; 185 | uint8_t port_number = PORT_NUM_INVALID; 186 | uint8_t pin_number = PIN_NUM_INVALID; 187 | uint8_t value; 188 | struct airspy_device* device = NULL; 189 | int option_index; 190 | uint32_t serial_number_msb_val; 191 | uint32_t serial_number_lsb_val; 192 | int result; 193 | 194 | option_index = 0; 195 | while( (opt = getopt_long(argc, argv, "p:n:rw:s:", long_options, &option_index)) != EOF ) 196 | { 197 | switch( opt ) { 198 | 199 | case 's': 200 | serial_number = true; 201 | result = parse_u64(optarg, &serial_number_val); 202 | serial_number_msb_val = (uint32_t)(serial_number_val >> 32); 203 | serial_number_lsb_val = (uint32_t)(serial_number_val & 0xFFFFFFFF); 204 | printf("Board serial number to open: 0x%08X%08X\n", serial_number_msb_val, serial_number_lsb_val); 205 | break; 206 | } 207 | } 208 | 209 | result = airspy_init(); 210 | if( result ) { 211 | printf("airspy_init() failed: %s (%d)\n", airspy_error_name(result), result); 212 | return EXIT_FAILURE; 213 | } 214 | 215 | if(serial_number == true) 216 | { 217 | result = airspy_open_sn(&device, serial_number_val); 218 | if( result != AIRSPY_SUCCESS ) { 219 | printf("airspy_open_sn() failed: %s (%d)\n", airspy_error_name(result), result); 220 | usage(); 221 | airspy_exit(); 222 | return EXIT_FAILURE; 223 | } 224 | }else 225 | { 226 | result = airspy_open(&device); 227 | if( result != AIRSPY_SUCCESS ) { 228 | printf("airspy_open() failed: %s (%d)\n", airspy_error_name(result), result); 229 | usage(); 230 | airspy_exit(); 231 | return EXIT_FAILURE; 232 | } 233 | } 234 | 235 | result = AIRSPY_ERROR_OTHER; 236 | option_index = 0; 237 | optind = 0; 238 | while( (opt = getopt_long(argc, argv, "p:n:rw:", long_options, &option_index)) != EOF ) 239 | { 240 | switch( opt ){ 241 | case 'p': 242 | result = parse_u8(optarg, &port_number); 243 | if((result != AIRSPY_SUCCESS) || (port_number > PORT_NUM_MAX)) 244 | { 245 | printf("Error parameter -p shall be between %d and %d\n", PORT_NUM_MIN, PORT_NUM_MAX); 246 | result = AIRSPY_ERROR_OTHER; 247 | } 248 | break; 249 | 250 | case 'n': 251 | result = parse_u8(optarg, &pin_number); 252 | if((result != AIRSPY_SUCCESS) || (pin_number > PIN_NUM_MAX)) 253 | { 254 | printf("Error parameter -n shall be between %d and %d\n", PIN_NUM_MIN, PIN_NUM_MAX); 255 | result = AIRSPY_ERROR_OTHER; 256 | } 257 | break; 258 | 259 | case 'r': 260 | if( port_number == PORT_NUM_INVALID ) 261 | { 262 | result = dump_ports(device); 263 | } else 264 | { 265 | if( pin_number == PORT_NUM_INVALID ) 266 | { 267 | result = dump_port(device, port_number); 268 | } else 269 | { 270 | result = dump_port_pin(device, port_number, pin_number); 271 | } 272 | } 273 | if( result != AIRSPY_SUCCESS ) 274 | printf("argument error: %s (%d)\n", airspy_error_name(result), result); 275 | break; 276 | 277 | case 'w': 278 | result = parse_u8(optarg, &value); 279 | if( result == AIRSPY_SUCCESS ) { 280 | result = write_port_pin(device, port_number, pin_number, value); 281 | if( result != AIRSPY_SUCCESS ) 282 | printf("argument error: %s (%d)\n", airspy_error_name(result), result); 283 | } 284 | break; 285 | } 286 | 287 | if( result != AIRSPY_SUCCESS ) 288 | { 289 | break; 290 | } 291 | } 292 | 293 | if( result != AIRSPY_SUCCESS ) 294 | { 295 | usage(); 296 | } 297 | 298 | result = airspy_close(device); 299 | if( result ) { 300 | printf("airspy_close() failed: %s (%d)\n", airspy_error_name(result), result); 301 | airspy_exit(); 302 | return EXIT_FAILURE; 303 | } 304 | 305 | airspy_exit(); 306 | 307 | return 0; 308 | } 309 | 310 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_gpiodir.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013/2014 Benjamin Vernoux 3 | * 4 | * This file is part of AirSpy (based on HackRF project). 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #ifndef bool 30 | typedef int bool; 31 | #define true 1 32 | #define false 0 33 | #endif 34 | 35 | #define PORT_NUM_INVALID (255) 36 | #define PIN_NUM_INVALID (255) 37 | 38 | #define PORT_NUM_MIN (0) 39 | #define PORT_NUM_MAX (7) 40 | 41 | #define PIN_NUM_MIN (0) 42 | #define PIN_NUM_MAX (31) 43 | 44 | static void usage() { 45 | printf("WARNING this tool reconfigure GPIO Direction IN/OUT and can destroy GPIO/MCU in case of mistake\n"); 46 | printf("Usage:\n"); 47 | printf("\t-p, --port_no

: set port number

[0,7] for subsequent read/write operations\n"); 48 | printf("\t-n, --pin_no : set pin number[0,31] for subsequent read/write operations\n"); 49 | printf("\t-r, --read: read port number/pin number direction specified by last -n argument, or all port/pin\n"); 50 | printf("\t-w, --write : write value port direction specified by last -n argument with value[0,1](0=IN,1=OUT)\n"); 51 | printf("\t[-s serial_number_64bits]: Open board with specified 64bits serial number.\n"); 52 | printf("\nExamples:\n"); 53 | printf("\t -p 0 -n 12 -r # reads gpio direction from port 0 pin number 12\n"); 54 | printf("\t -r # reads gpio direction on all pins and all ports\n"); 55 | printf("\t -p 0 -n 10 -w 1 # writes gpio direction port 0 pin number 10 with 1(output) decimal\n"); 56 | } 57 | 58 | static struct option long_options[] = { 59 | { "port_no", required_argument, 0, 'p' }, 60 | { "pin_no", required_argument, 0, 'n' }, 61 | { "write", required_argument, 0, 'w' }, 62 | { "read", no_argument, 0, 'r' }, 63 | { 0, 0, 0, 0 }, 64 | }; 65 | 66 | int parse_u8(char* const s, uint8_t* const value) { 67 | char* s_end = s; 68 | const long int long_value = strtol(s, &s_end, 10); 69 | if( (s != s_end) && (*s_end == 0) ) { 70 | if((long_value >=0 ) && (long_value < 256)) { 71 | *value = (uint8_t)long_value; 72 | return AIRSPY_SUCCESS; 73 | } else { 74 | return AIRSPY_ERROR_INVALID_PARAM; 75 | } 76 | } else { 77 | return AIRSPY_ERROR_INVALID_PARAM; 78 | } 79 | } 80 | 81 | int parse_u64(char* s, uint64_t* const value) { 82 | uint_fast8_t base = 10; 83 | char* s_end; 84 | uint64_t u64_value; 85 | 86 | if( strlen(s) > 2 ) { 87 | if( s[0] == '0' ) { 88 | if( (s[1] == 'x') || (s[1] == 'X') ) { 89 | base = 16; 90 | s += 2; 91 | } else if( (s[1] == 'b') || (s[1] == 'B') ) { 92 | base = 2; 93 | s += 2; 94 | } 95 | } 96 | } 97 | 98 | s_end = s; 99 | u64_value = strtoull(s, &s_end, base); 100 | if( (s != s_end) && (*s_end == 0) ) { 101 | *value = u64_value; 102 | return AIRSPY_SUCCESS; 103 | } else { 104 | return AIRSPY_ERROR_INVALID_PARAM; 105 | } 106 | } 107 | 108 | int dump_port_pin(struct airspy_device* device, 109 | airspy_gpio_port_t port_number, 110 | airspy_gpio_pin_t pin_number) 111 | { 112 | uint8_t value; 113 | int result; 114 | 115 | result = airspy_gpiodir_read(device, port_number, pin_number, &value); 116 | if( result == AIRSPY_SUCCESS ) { 117 | if(value == 1) 118 | printf("gpiodir[%1d][%2d] -> out(1)\n", port_number, pin_number); 119 | else 120 | printf("gpiodir[%1d][%2d] -> in(0)\n", port_number, pin_number); 121 | } else { 122 | printf("airspy_gpiodir_read() failed: %s (%d)\n", airspy_error_name(result), result); 123 | } 124 | return result; 125 | } 126 | 127 | int dump_port(struct airspy_device* device, airspy_gpio_port_t port_number) 128 | { 129 | airspy_gpio_pin_t pin_number; 130 | int result = AIRSPY_SUCCESS; 131 | 132 | for(pin_number = GPIO_PIN0; pin_number < (GPIO_PIN31+1); pin_number++) 133 | { 134 | result = dump_port_pin(device, port_number, pin_number); 135 | } 136 | return result; 137 | } 138 | 139 | int dump_ports(struct airspy_device* device) 140 | { 141 | uint8_t port_number; 142 | int result = AIRSPY_SUCCESS; 143 | 144 | for(port_number = GPIO_PORT0; port_number < (GPIO_PORT7+1); port_number++) 145 | { 146 | result = dump_port(device, port_number); 147 | if( result != AIRSPY_SUCCESS ) { 148 | break; 149 | } 150 | } 151 | return result; 152 | } 153 | 154 | int write_port_pin(struct airspy_device* device, 155 | airspy_gpio_port_t port_number, 156 | airspy_gpio_pin_t pin_number, 157 | uint8_t value) 158 | { 159 | int result; 160 | result = airspy_gpiodir_write(device, port_number, pin_number, value); 161 | 162 | if( result == AIRSPY_SUCCESS ) { 163 | printf("0x%02X -> gpiodir[%1d][%2d]\n", value, port_number, pin_number); 164 | } else { 165 | printf("airspy_gpiodir_write() failed: %s (%d)\n", airspy_error_name(result), result); 166 | } 167 | 168 | return result; 169 | } 170 | 171 | bool serial_number = false; 172 | uint64_t serial_number_val; 173 | 174 | int main(int argc, char** argv) { 175 | int opt; 176 | uint8_t port_number = PORT_NUM_INVALID; 177 | uint8_t pin_number = PIN_NUM_INVALID; 178 | uint8_t value; 179 | struct airspy_device* device = NULL; 180 | int option_index; 181 | uint32_t serial_number_msb_val; 182 | uint32_t serial_number_lsb_val; 183 | int result; 184 | 185 | option_index = 0; 186 | while( (opt = getopt_long(argc, argv, "p:n:rw:s:", long_options, &option_index)) != EOF ) 187 | { 188 | switch( opt ) { 189 | 190 | case 's': 191 | serial_number = true; 192 | result = parse_u64(optarg, &serial_number_val); 193 | serial_number_msb_val = (uint32_t)(serial_number_val >> 32); 194 | serial_number_lsb_val = (uint32_t)(serial_number_val & 0xFFFFFFFF); 195 | printf("Board serial number to open: 0x%08X%08X\n", serial_number_msb_val, serial_number_lsb_val); 196 | break; 197 | } 198 | } 199 | 200 | result = airspy_init(); 201 | if( result ) { 202 | printf("airspy_init() failed: %s (%d)\n", airspy_error_name(result), result); 203 | return EXIT_FAILURE; 204 | } 205 | 206 | if(serial_number == true) 207 | { 208 | result = airspy_open_sn(&device, serial_number_val); 209 | if( result != AIRSPY_SUCCESS ) { 210 | printf("airspy_open_sn() failed: %s (%d)\n", airspy_error_name(result), result); 211 | usage(); 212 | airspy_exit(); 213 | return EXIT_FAILURE; 214 | } 215 | }else 216 | { 217 | result = airspy_open(&device); 218 | if( result != AIRSPY_SUCCESS ) { 219 | printf("airspy_open() failed: %s (%d)\n", airspy_error_name(result), result); 220 | usage(); 221 | airspy_exit(); 222 | return EXIT_FAILURE; 223 | } 224 | } 225 | 226 | result = AIRSPY_ERROR_OTHER; 227 | option_index = 0; 228 | optind = 0; 229 | while( (opt = getopt_long(argc, argv, "p:n:rw:", long_options, &option_index)) != EOF ) 230 | { 231 | switch( opt ) { 232 | case 'p': 233 | result = parse_u8(optarg, &port_number); 234 | if((result != AIRSPY_SUCCESS) || (port_number > PORT_NUM_MAX)) 235 | { 236 | printf("Error parameter -p shall be between %d and %d\n", PORT_NUM_MIN, PORT_NUM_MAX); 237 | result = AIRSPY_ERROR_OTHER; 238 | } 239 | break; 240 | 241 | case 'n': 242 | result = parse_u8(optarg, &pin_number); 243 | if((result != AIRSPY_SUCCESS) || (pin_number > PIN_NUM_MAX)) 244 | { 245 | printf("Error parameter -n shall be between %d and %d\n", PIN_NUM_MIN, PIN_NUM_MAX); 246 | result = AIRSPY_ERROR_OTHER; 247 | } 248 | break; 249 | 250 | case 'r': 251 | if( port_number == PORT_NUM_INVALID ) 252 | { 253 | result = dump_ports(device); 254 | } else 255 | { 256 | if( pin_number == PORT_NUM_INVALID ) 257 | { 258 | result = dump_port(device, port_number); 259 | } else 260 | { 261 | result = dump_port_pin(device, port_number, pin_number); 262 | } 263 | } 264 | if( result != AIRSPY_SUCCESS ) 265 | printf("argument error: %s (%d)\n", airspy_error_name(result), result); 266 | break; 267 | 268 | case 'w': 269 | result = parse_u8(optarg, &value); 270 | if( result == AIRSPY_SUCCESS ) { 271 | result = write_port_pin(device, port_number, pin_number, value); 272 | if( result != AIRSPY_SUCCESS ) 273 | printf("argument error: %s (%d)\n", airspy_error_name(result), result); 274 | } 275 | break; 276 | } 277 | 278 | if( result != AIRSPY_SUCCESS ) 279 | { 280 | break; 281 | } 282 | } 283 | 284 | if( result != AIRSPY_SUCCESS ) 285 | { 286 | usage(); 287 | } 288 | 289 | result = airspy_close(device); 290 | if( result ) { 291 | printf("airspy_close() failed: %s (%d)\n", airspy_error_name(result), result); 292 | airspy_exit(); 293 | return EXIT_FAILURE; 294 | } 295 | 296 | airspy_exit(); 297 | 298 | return 0; 299 | } 300 | 301 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_info.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Jared Boone 3 | * Copyright 2013 Michael Ossmann 4 | * Copyright 2013/2014 Benjamin Vernoux 5 | * 6 | * This file is part of AirSpy (based on HackRF project). 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2, or (at your option) 11 | * any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; see the file COPYING. If not, write to 20 | * the Free Software Foundation, Inc., 51 Franklin Street, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #ifndef bool 32 | typedef int bool; 33 | #define true 1 34 | #define false 0 35 | #endif 36 | 37 | #define AIRSPY_MAX_DEVICE (32) 38 | char version[255 + 1]; 39 | airspy_read_partid_serialno_t read_partid_serialno; 40 | struct airspy_device* devices[AIRSPY_MAX_DEVICE+1] = { NULL }; 41 | 42 | int parse_u64(char* s, uint64_t* const value) { 43 | uint_fast8_t base = 10; 44 | char* s_end; 45 | uint64_t u64_value; 46 | 47 | if( strlen(s) > 2 ) { 48 | if( s[0] == '0' ) { 49 | if( (s[1] == 'x') || (s[1] == 'X') ) { 50 | base = 16; 51 | s += 2; 52 | } else if( (s[1] == 'b') || (s[1] == 'B') ) { 53 | base = 2; 54 | s += 2; 55 | } 56 | } 57 | } 58 | 59 | s_end = s; 60 | u64_value = strtoull(s, &s_end, base); 61 | if( (s != s_end) && (*s_end == 0) ) { 62 | *value = u64_value; 63 | return AIRSPY_SUCCESS; 64 | } else { 65 | return AIRSPY_ERROR_INVALID_PARAM; 66 | } 67 | } 68 | 69 | static void usage(void) 70 | { 71 | printf("Usage:\n"); 72 | printf("\t[-s serial_number_64bits]: Open board with specified 64bits serial number.\n"); 73 | } 74 | 75 | bool serial_number = false; 76 | uint64_t serial_number_val; 77 | 78 | int main(int argc, char** argv) 79 | { 80 | int i; 81 | uint32_t j; 82 | int result; 83 | int opt; 84 | uint32_t count; 85 | uint32_t *samplerates; 86 | uint32_t serial_number_msb_val; 87 | uint32_t serial_number_lsb_val; 88 | airspy_lib_version_t lib_version; 89 | uint8_t board_id = AIRSPY_BOARD_ID_INVALID; 90 | 91 | while( (opt = getopt(argc, argv, "s:")) != EOF ) 92 | { 93 | result = AIRSPY_SUCCESS; 94 | switch( opt ) 95 | { 96 | case 's': 97 | serial_number = true; 98 | result = parse_u64(optarg, &serial_number_val); 99 | serial_number_msb_val = (uint32_t)(serial_number_val >> 32); 100 | serial_number_lsb_val = (uint32_t)(serial_number_val & 0xFFFFFFFF); 101 | printf("Board serial number to open: 0x%08X%08X\n", serial_number_msb_val, serial_number_lsb_val); 102 | break; 103 | 104 | default: 105 | printf("unknown argument '-%c %s'\n", opt, optarg); 106 | usage(); 107 | return EXIT_FAILURE; 108 | } 109 | 110 | if( result != AIRSPY_SUCCESS ) { 111 | printf("argument error: '-%c %s' %s (%d)\n", opt, optarg, airspy_error_name(result), result); 112 | usage(); 113 | return EXIT_FAILURE; 114 | } 115 | } 116 | 117 | result = airspy_init(); 118 | if (result != AIRSPY_SUCCESS) { 119 | fprintf(stderr, "airspy_init() failed: %s (%d)\n", 120 | airspy_error_name(result), result); 121 | return EXIT_FAILURE; 122 | } 123 | 124 | airspy_lib_version(&lib_version); 125 | printf("airspy_lib_version: %d.%d.%d\n", 126 | lib_version.major_version, lib_version.minor_version, lib_version.revision); 127 | 128 | for (i = 0; i < AIRSPY_MAX_DEVICE; i++) 129 | { 130 | if(serial_number == true) 131 | { 132 | result = airspy_open_sn(&devices[i], serial_number_val); 133 | }else 134 | { 135 | result = airspy_open(&devices[i]); 136 | } 137 | if (result != AIRSPY_SUCCESS) 138 | { 139 | if(i == 0) 140 | { 141 | fprintf(stderr, "airspy_open() board %d failed: %s (%d)\n", 142 | i+1, airspy_error_name(result), result); 143 | } 144 | break; 145 | } 146 | } 147 | 148 | for(i = 0; i < AIRSPY_MAX_DEVICE; i++) 149 | { 150 | if(devices[i] != NULL) 151 | { 152 | printf("\nFound AirSpy board %d\n", i + 1); 153 | fflush(stdout); 154 | result = airspy_board_id_read(devices[i], &board_id); 155 | if (result != AIRSPY_SUCCESS) { 156 | fprintf(stderr, "airspy_board_id_read() failed: %s (%d)\n", 157 | airspy_error_name(result), result); 158 | continue; 159 | } 160 | printf("Board ID Number: %d (%s)\n", board_id, 161 | airspy_board_id_name(board_id)); 162 | 163 | result = airspy_version_string_read(devices[i], &version[0], 255); 164 | if (result != AIRSPY_SUCCESS) { 165 | fprintf(stderr, "airspy_version_string_read() failed: %s (%d)\n", 166 | airspy_error_name(result), result); 167 | continue; 168 | } 169 | printf("Firmware Version: %s\n", version); 170 | 171 | result = airspy_board_partid_serialno_read(devices[i], &read_partid_serialno); 172 | if (result != AIRSPY_SUCCESS) { 173 | fprintf(stderr, "airspy_board_partid_serialno_read() failed: %s (%d)\n", 174 | airspy_error_name(result), result); 175 | continue; 176 | } 177 | printf("Part ID Number: 0x%08X 0x%08X\n", 178 | read_partid_serialno.part_id[0], 179 | read_partid_serialno.part_id[1]); 180 | printf("Serial Number: 0x%08X%08X\n", 181 | read_partid_serialno.serial_no[2], 182 | read_partid_serialno.serial_no[3]); 183 | 184 | printf("Supported sample rates:\n"); 185 | airspy_get_samplerates(devices[i], &count, 0); 186 | samplerates = (uint32_t *) malloc(count * sizeof(uint32_t)); 187 | airspy_get_samplerates(devices[i], samplerates, count); 188 | for (j = 0; j < count; j++) 189 | { 190 | printf("\t%f MSPS\n", samplerates[j] * 0.000001f); 191 | } 192 | free(samplerates); 193 | 194 | printf("Close board %d\n", i+1); 195 | result = airspy_close(devices[i]); 196 | if (result != AIRSPY_SUCCESS) { 197 | fprintf(stderr, "airspy_close() board %d failed: %s (%d)\n", 198 | i+1, airspy_error_name(result), result); 199 | continue; 200 | } 201 | } 202 | } 203 | 204 | airspy_exit(); 205 | return EXIT_SUCCESS; 206 | } 207 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_lib_version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Benjamin Vernoux 3 | * 4 | * This file is part of AirSpy. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | 27 | int main(int argc, char** argv) 28 | { 29 | airspy_lib_version_t lib_version; 30 | 31 | airspy_lib_version(&lib_version); 32 | printf("AirSpy lib version: %d.%d.%d\n",lib_version.major_version, 33 | lib_version.minor_version, 34 | lib_version.revision); 35 | 36 | return EXIT_SUCCESS; 37 | } 38 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_r820t.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013/2014 Benjamin Vernoux 3 | * 4 | * This file is part of AirSpy (based on HackRF project). 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; see the file COPYING. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #ifndef bool 30 | typedef int bool; 31 | #define true 1 32 | #define false 0 33 | #endif 34 | 35 | #define REGISTER_NUM_MIN (0) 36 | #define REGISTER_NUM_MAX (31) 37 | 38 | static void usage() { 39 | printf("Usage:\n"); 40 | printf("\t-n, --register : set register [%d,%d] for subsequent read/write operations\n", REGISTER_NUM_MIN, REGISTER_NUM_MAX); 41 | printf("\t-r, --read: read register specified by last -n argument, or all registers\n"); 42 | printf("\t-w, --write : write register specified by last -n argument with value [0,255]\n"); 43 | printf("\t-c, --config: configure registers to r820t default mode for test\n"); 44 | printf("\t[-s serial_number_64bits]: Open board with specified 64bits serial number.\n"); 45 | printf("\nExamples:\n"); 46 | printf("\t -n 12 -r # reads from register 12\n"); 47 | printf("\t -r # reads all registers\n"); 48 | printf("\t -n 10 -w 22 # writes register 10 with 22 decimal\n"); 49 | } 50 | 51 | static struct option long_options[] = { 52 | { "register", required_argument, 0, 'n' }, 53 | { "write", required_argument, 0, 'w' }, 54 | { "read", no_argument, 0, 'r' }, 55 | { "config", no_argument, 0, 'c' }, 56 | { 0, 0, 0, 0 }, 57 | }; 58 | 59 | int parse_u8(char* const s, uint8_t* const value) { 60 | char* s_end = s; 61 | const long int long_value = strtol(s, &s_end, 10); 62 | if( (s != s_end) && (*s_end == 0) ) { 63 | if((long_value >=0 ) && (long_value < 256)) { 64 | *value = (uint8_t)long_value; 65 | return AIRSPY_SUCCESS; 66 | } else { 67 | return AIRSPY_ERROR_INVALID_PARAM; 68 | } 69 | } else { 70 | return AIRSPY_ERROR_INVALID_PARAM; 71 | } 72 | } 73 | 74 | int parse_u64(char* s, uint64_t* const value) { 75 | uint_fast8_t base = 10; 76 | char* s_end; 77 | uint64_t u64_value; 78 | 79 | if( strlen(s) > 2 ) { 80 | if( s[0] == '0' ) { 81 | if( (s[1] == 'x') || (s[1] == 'X') ) { 82 | base = 16; 83 | s += 2; 84 | } else if( (s[1] == 'b') || (s[1] == 'B') ) { 85 | base = 2; 86 | s += 2; 87 | } 88 | } 89 | } 90 | 91 | s_end = s; 92 | u64_value = strtoull(s, &s_end, base); 93 | if( (s != s_end) && (*s_end == 0) ) { 94 | *value = u64_value; 95 | return AIRSPY_SUCCESS; 96 | } else { 97 | return AIRSPY_ERROR_INVALID_PARAM; 98 | } 99 | } 100 | 101 | int dump_register(struct airspy_device* device, const uint8_t register_number) 102 | { 103 | uint8_t register_value; 104 | int result = airspy_r820t_read(device, register_number, ®ister_value); 105 | 106 | if( result == AIRSPY_SUCCESS ) { 107 | printf("[%3d] -> 0x%02X\n", register_number, register_value); 108 | } else { 109 | printf("airspy_r820t_read() failed: %s (%d)\n", airspy_error_name(result), result); 110 | } 111 | 112 | return result; 113 | } 114 | 115 | int dump_registers(struct airspy_device* device) 116 | { 117 | uint8_t register_number; 118 | int result = AIRSPY_SUCCESS; 119 | 120 | for(register_number=0; register_number<32; register_number++) 121 | { 122 | result = dump_register(device, register_number); 123 | if( result != AIRSPY_SUCCESS ) { 124 | break; 125 | } 126 | } 127 | 128 | return result; 129 | } 130 | 131 | int write_register(struct airspy_device* device, const uint8_t register_number, const uint8_t register_value) 132 | { 133 | int result = AIRSPY_SUCCESS; 134 | result = airspy_r820t_write(device, register_number, register_value); 135 | 136 | if( result == AIRSPY_SUCCESS ) { 137 | printf("0x%02X -> [%3d]\n", register_value, register_number); 138 | } else { 139 | printf("airspy_r820t_write() failed: %s (%d)\n", airspy_error_name(result), result); 140 | } 141 | 142 | return result; 143 | } 144 | 145 | #define CONF_R820T_START_REG (5) 146 | uint8_t conf_r820t[] = 147 | { 148 | 0x12, 0x32, 0x75, /* 05 to 07 */ 149 | 0xc0, 0x40, 0xd6, 0x6c, /* 08 to 11 */ 150 | 0x40, 0x63, 0x75, 0x68, /* 12 to 15 */ 151 | 0x6c, 0x83, 0x80, 0x00, /* 16 to 19 */ 152 | 0x0f, 0x00, 0xc0, 0x30, /* 20 to 23 */ 153 | 0x48, 0xcc, 0x60, 0x00, /* 24 to 27 */ 154 | 0x54, 0xae, 0x4a, 0xc0 /* 28 to 31 */ 155 | }; 156 | 157 | int configure_registers(struct airspy_device* device) 158 | { 159 | int i, j; 160 | uint8_t register_number; 161 | uint8_t register_value; 162 | int result = AIRSPY_SUCCESS; 163 | 164 | j=0; 165 | for(i=0; i [%3d]\n", register_value, register_number); 174 | } else { 175 | printf("airspy_r820t_write() failed: %s (%d)\n", airspy_error_name(result), result); 176 | return result; 177 | } 178 | } 179 | return result; 180 | } 181 | 182 | #define REGISTER_INVALID 255 183 | bool serial_number = false; 184 | uint64_t serial_number_val; 185 | 186 | int main(int argc, char** argv) { 187 | int opt; 188 | uint8_t register_number = REGISTER_INVALID; 189 | uint8_t register_value; 190 | struct airspy_device* device = NULL; 191 | int option_index; 192 | uint32_t serial_number_msb_val; 193 | uint32_t serial_number_lsb_val; 194 | int result; 195 | 196 | option_index = 0; 197 | while( (opt = getopt_long(argc, argv, "cn:rw:s:", long_options, &option_index)) != EOF ) 198 | { 199 | switch( opt ) { 200 | 201 | case 's': 202 | serial_number = true; 203 | result = parse_u64(optarg, &serial_number_val); 204 | serial_number_msb_val = (uint32_t)(serial_number_val >> 32); 205 | serial_number_lsb_val = (uint32_t)(serial_number_val & 0xFFFFFFFF); 206 | printf("Board serial number to open: 0x%08X%08X\n", serial_number_msb_val, serial_number_lsb_val); 207 | break; 208 | } 209 | } 210 | 211 | result = airspy_init(); 212 | if( result ) { 213 | printf("airspy_init() failed: %s (%d)\n", airspy_error_name(result), result); 214 | return EXIT_FAILURE; 215 | } 216 | 217 | if(serial_number == true) 218 | { 219 | result = airspy_open_sn(&device, serial_number_val); 220 | if( result != AIRSPY_SUCCESS ) { 221 | printf("airspy_open_sn() failed: %s (%d)\n", airspy_error_name(result), result); 222 | usage(); 223 | airspy_exit(); 224 | return EXIT_FAILURE; 225 | } 226 | }else 227 | { 228 | result = airspy_open(&device); 229 | if( result != AIRSPY_SUCCESS ) { 230 | printf("airspy_open() failed: %s (%d)\n", airspy_error_name(result), result); 231 | usage(); 232 | airspy_exit(); 233 | return EXIT_FAILURE; 234 | } 235 | } 236 | 237 | result = AIRSPY_ERROR_OTHER; 238 | option_index = 0; 239 | optind = 0; 240 | while( (opt = getopt_long(argc, argv, "cn:rw:", long_options, &option_index)) != EOF ) 241 | { 242 | switch( opt ) { 243 | case 'n': 244 | result = parse_u8(optarg, ®ister_number); 245 | if((result != AIRSPY_SUCCESS) || (register_number > REGISTER_NUM_MAX)) 246 | { 247 | register_number = REGISTER_INVALID; 248 | printf("Error parameter -n shall be between %d and %d\n", REGISTER_NUM_MIN, REGISTER_NUM_MAX); 249 | result = AIRSPY_ERROR_OTHER; 250 | } 251 | break; 252 | 253 | case 'w': 254 | result = parse_u8(optarg, ®ister_value); 255 | if( result == AIRSPY_SUCCESS ) { 256 | result = write_register(device, register_number, register_value); 257 | }else 258 | { 259 | printf("Error parameter -w shall be between 0 and 255\n"); 260 | result = AIRSPY_ERROR_OTHER; 261 | } 262 | break; 263 | 264 | case 'r': 265 | if( register_number == REGISTER_INVALID ) { 266 | result = dump_registers(device); 267 | } else { 268 | result = dump_register(device, register_number); 269 | } 270 | break; 271 | 272 | case 'c': 273 | result = configure_registers(device); 274 | break; 275 | } 276 | 277 | if( result != AIRSPY_SUCCESS ) 278 | { 279 | break; 280 | } 281 | } 282 | 283 | if( result != AIRSPY_SUCCESS ) 284 | { 285 | usage(); 286 | } 287 | 288 | result = airspy_close(device); 289 | if( result ) { 290 | printf("airspy_close() failed: %s (%d)\n", airspy_error_name(result), result); 291 | airspy_exit(); 292 | return EXIT_FAILURE; 293 | } 294 | 295 | airspy_exit(); 296 | 297 | return 0; 298 | } 299 | 300 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_si5351c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Jared Boone 3 | * Copyright 2013/2014 Benjamin Vernoux 4 | * 5 | * This file is part of AirSpy (based on HackRF project). 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2, or (at your option) 10 | * any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #ifndef bool 31 | typedef int bool; 32 | #define true 1 33 | #define false 0 34 | #endif 35 | 36 | static void usage() { 37 | printf("\nUsage:\n"); 38 | printf("\t-c, --config: print textual configuration information\n"); 39 | printf("\t-n, --register : set register number for subsequent read/write operations\n"); 40 | printf("\t-r, --read: read register specified by last -n argument, or all registers\n"); 41 | printf("\t-w, --write : write register specified by last -n argument with value \n"); 42 | printf("\t[-s serial_number_64bits]: Open board with specified 64bits serial number.\n"); 43 | printf("\nExamples:\n"); 44 | printf("\t -n 12 -r # reads from register 12\n"); 45 | printf("\t -r # reads all registers\n"); 46 | printf("\t -n 10 -w 22 # writes register 10 with 22 decimal\n"); 47 | } 48 | 49 | static struct option long_options[] = { 50 | { "config", no_argument, 0, 'c' }, 51 | { "register", required_argument, 0, 'n' }, 52 | { "write", required_argument, 0, 'w' }, 53 | { "read", no_argument, 0, 'r' }, 54 | { "serial", required_argument, 0, 's' }, 55 | { 0, 0, 0, 0 }, 56 | }; 57 | 58 | int parse_int(char* const s, uint8_t* const value) { 59 | char* s_end = s; 60 | const long long_value = strtol(s, &s_end, 10); 61 | if( (s != s_end) && (*s_end == 0) ) { 62 | *value = (uint8_t)long_value; 63 | return AIRSPY_SUCCESS; 64 | } else { 65 | return AIRSPY_ERROR_INVALID_PARAM; 66 | } 67 | } 68 | 69 | int parse_u64(char* s, uint64_t* const value) { 70 | uint_fast8_t base = 10; 71 | char* s_end; 72 | uint64_t u64_value; 73 | 74 | if( strlen(s) > 2 ) { 75 | if( s[0] == '0' ) { 76 | if( (s[1] == 'x') || (s[1] == 'X') ) { 77 | base = 16; 78 | s += 2; 79 | } else if( (s[1] == 'b') || (s[1] == 'B') ) { 80 | base = 2; 81 | s += 2; 82 | } 83 | } 84 | } 85 | 86 | s_end = s; 87 | u64_value = strtoull(s, &s_end, base); 88 | if( (s != s_end) && (*s_end == 0) ) { 89 | *value = u64_value; 90 | return AIRSPY_SUCCESS; 91 | } else { 92 | return AIRSPY_ERROR_INVALID_PARAM; 93 | } 94 | } 95 | 96 | int dump_register(struct airspy_device* device, const uint8_t register_number) { 97 | uint8_t register_value; 98 | int result; 99 | 100 | result = airspy_si5351c_read(device, register_number, ®ister_value); 101 | 102 | if( result == AIRSPY_SUCCESS ) { 103 | printf("[%3d] -> 0x%02x\n", register_number, register_value); 104 | } else { 105 | printf("airspy_si5351c_read() failed: %s (%d)\n", airspy_error_name(result), result); 106 | } 107 | 108 | return result; 109 | } 110 | 111 | int dump_registers(struct airspy_device* device) { 112 | int register_number; 113 | int result = AIRSPY_SUCCESS; 114 | 115 | for(register_number=0; register_number<256; register_number++) { 116 | result = dump_register(device, (uint8_t)register_number); 117 | if( result != AIRSPY_SUCCESS ) { 118 | break; 119 | } 120 | } 121 | 122 | return result; 123 | } 124 | 125 | int write_register( struct airspy_device* device, const uint8_t register_number, const uint8_t register_value) 126 | { 127 | int result = AIRSPY_SUCCESS; 128 | result = airspy_si5351c_write(device, register_number, register_value); 129 | 130 | if( result == AIRSPY_SUCCESS ) { 131 | printf("0x%2x -> [%3d]\n", register_value, register_number); 132 | } else { 133 | printf("airspy_si5351c_write() failed: %s (%d)\n", airspy_error_name(result), result); 134 | } 135 | 136 | return result; 137 | } 138 | 139 | int dump_multisynth_config(struct airspy_device* device, const uint_fast8_t ms_number) { 140 | uint_fast8_t i; 141 | uint_fast8_t reg_base; 142 | uint8_t parameters[8]; 143 | uint32_t p1,p2,p3,r_div; 144 | uint_fast8_t div_lut[] = {1,2,4,8,16,32,64,128}; 145 | 146 | printf("MS%d:", ms_number); 147 | if(ms_number <6){ 148 | reg_base = 42 + (ms_number * 8); 149 | for(i=0; i<8; i++) { 150 | uint8_t reg_number = reg_base + i; 151 | int result = airspy_si5351c_read(device, reg_number, ¶meters[i]); 152 | if( result != AIRSPY_SUCCESS ) { 153 | return result; 154 | } 155 | } 156 | 157 | p1 = 158 | ((parameters[2] & 0x03) << 16) 159 | | (parameters[3] << 8) 160 | | parameters[4] 161 | ; 162 | p2 = 163 | ((parameters[5] & 0x0F) << 16) 164 | | (parameters[6] << 8) 165 | | parameters[7] 166 | ; 167 | p3 = 168 | ((parameters[5] & 0xF0) << 12) 169 | | (parameters[0] << 8) 170 | | parameters[1] 171 | ; 172 | r_div = 173 | (parameters[2] >> 4) & 0x7 174 | ; 175 | 176 | printf("\tp1 = %u\n", p1); 177 | printf("\tp2 = %u\n", p2); 178 | printf("\tp3 = %u\n", p3); 179 | if(p3) 180 | printf("\tOutput (800Mhz PLL): %#.10f Mhz\n", ((double)800 / (double)(((double)p1*p3 + p2 + 512*p3)/(double)(128*p3))) / div_lut[r_div] ); 181 | } else { 182 | // MS6 and 7 are integer only 183 | unsigned int parms; 184 | reg_base = 90; 185 | 186 | for(i=0; i<3; i++) { 187 | uint_fast8_t reg_number = reg_base + i; 188 | int result = airspy_si5351c_read(device, reg_number, ¶meters[i]); 189 | if( result != AIRSPY_SUCCESS ) { 190 | return result; 191 | } 192 | } 193 | 194 | r_div = (ms_number == 6) ? parameters[2] & 0x7 : (parameters[2] & 0x70) >> 4 ; 195 | parms = (ms_number == 6) ? parameters[0] : parameters[1]; 196 | printf("\tp1_int = %u\n", parms); 197 | if(parms) 198 | printf("\tOutput (800Mhz PLL): %#.10f Mhz\n", (800.0f / parms) / div_lut[r_div] ); 199 | } 200 | printf("\toutput divider = %u\n", div_lut[r_div]); 201 | 202 | return AIRSPY_SUCCESS; 203 | } 204 | 205 | int dump_configuration(struct airspy_device* device) { 206 | uint_fast8_t ms_number; 207 | int result; 208 | 209 | for(ms_number=0; ms_number<8; ms_number++) { 210 | result = dump_multisynth_config(device, ms_number); 211 | if( result != AIRSPY_SUCCESS ) { 212 | return result; 213 | } 214 | } 215 | 216 | return AIRSPY_SUCCESS; 217 | } 218 | 219 | bool serial_number = false; 220 | uint64_t serial_number_val; 221 | 222 | int main(int argc, char** argv) { 223 | int opt; 224 | int n_opt = 0; 225 | uint8_t register_number = 0; 226 | uint8_t register_value; 227 | struct airspy_device* device = NULL; 228 | int option_index; 229 | uint32_t serial_number_msb_val; 230 | uint32_t serial_number_lsb_val; 231 | int result; 232 | 233 | option_index = 0; 234 | while( (opt = getopt_long(argc, argv, "cn:rw:s:", long_options, &option_index)) != EOF ) 235 | { 236 | switch( opt ) { 237 | 238 | case 's': 239 | serial_number = true; 240 | result = parse_u64(optarg, &serial_number_val); 241 | serial_number_msb_val = (uint32_t)(serial_number_val >> 32); 242 | serial_number_lsb_val = (uint32_t)(serial_number_val & 0xFFFFFFFF); 243 | printf("Board serial number to open: 0x%08X%08X\n", serial_number_msb_val, serial_number_lsb_val); 244 | break; 245 | } 246 | } 247 | 248 | result = airspy_init(); 249 | if( result ) { 250 | printf("airspy_init() failed: %s (%d)\n", airspy_error_name(result), result); 251 | return EXIT_FAILURE; 252 | } 253 | 254 | if(serial_number == true) 255 | { 256 | result = airspy_open_sn(&device, serial_number_val); 257 | if( result != AIRSPY_SUCCESS ) { 258 | printf("airspy_open_sn() failed: %s (%d)\n", airspy_error_name(result), result); 259 | usage(); 260 | airspy_exit(); 261 | return EXIT_FAILURE; 262 | } 263 | }else 264 | { 265 | result = airspy_open(&device); 266 | if( result != AIRSPY_SUCCESS ) { 267 | printf("airspy_open() failed: %s (%d)\n", airspy_error_name(result), result); 268 | usage(); 269 | airspy_exit(); 270 | return EXIT_FAILURE; 271 | } 272 | } 273 | 274 | result = AIRSPY_ERROR_OTHER; 275 | option_index = 0; 276 | optind = 0; 277 | while( (opt = getopt_long(argc, argv, "cn:rw:s:", long_options, &option_index)) != EOF ) { 278 | switch( opt ) { 279 | case 'n': 280 | result = parse_int(optarg, ®ister_number); 281 | n_opt = 1; 282 | break; 283 | 284 | case 'w': 285 | result = parse_int(optarg, ®ister_value); 286 | if( result == AIRSPY_SUCCESS ) { 287 | result = write_register(device, register_number, register_value); 288 | } 289 | break; 290 | 291 | case 'r': 292 | if( n_opt == 0 ) { 293 | result = dump_registers(device); 294 | } else { 295 | result = dump_register(device, register_number); 296 | } 297 | break; 298 | 299 | case 'c': 300 | result = dump_configuration(device); 301 | break; 302 | case 's': 303 | serial_number = true; 304 | result = parse_u64(optarg, &serial_number_val); 305 | break; 306 | default: 307 | usage(); 308 | } 309 | 310 | if( result != AIRSPY_SUCCESS ) 311 | { 312 | break; 313 | } 314 | } 315 | 316 | if( result != AIRSPY_SUCCESS ) 317 | { 318 | usage(); 319 | } 320 | 321 | result = airspy_close(device); 322 | if( result ) { 323 | printf("airspy_close() failed: %s (%d)\n", airspy_error_name(result), result); 324 | airspy_exit(); 325 | return EXIT_FAILURE; 326 | } 327 | 328 | airspy_exit(); 329 | 330 | return 0; 331 | } 332 | -------------------------------------------------------------------------------- /airspy-tools/src/airspy_spiflash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Jared Boone 3 | * Copyright 2013 Michael Ossmann 4 | * Copyright 2013/2014 Benjamin Vernoux 5 | * 6 | * This file is part of AirSpy (based on HackRF project). 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2, or (at your option) 11 | * any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; see the file COPYING. If not, write to 20 | * the Free Software Foundation, Inc., 51 Franklin Street, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #ifndef bool 34 | typedef int bool; 35 | #define true 1 36 | #define false 0 37 | #endif 38 | 39 | #ifdef _WIN32 40 | #include 41 | #ifdef _MSC_VER 42 | #ifdef _WIN64 43 | typedef int64_t ssize_t; 44 | #else 45 | typedef int32_t ssize_t; 46 | #endif 47 | #endif 48 | 49 | #define sleep(a) Sleep( (a*1000) ) 50 | #endif 51 | 52 | /* 8 Mbit flash */ 53 | #define MAX_LENGTH 0x100000 54 | 55 | static struct option long_options[] = { 56 | { "address", required_argument, 0, 'a' }, 57 | { "length", required_argument, 0, 'l' }, 58 | { "read", required_argument, 0, 'r' }, 59 | { "write", required_argument, 0, 'w' }, 60 | { "reset", no_argument, 0, 't' }, 61 | { 0, 0, 0, 0 }, 62 | }; 63 | 64 | int parse_u32(char* s, uint32_t* const value) 65 | { 66 | char* s_end; 67 | uint_fast8_t base = 10; 68 | uint32_t u32_value; 69 | 70 | if (strlen(s) > 2) { 71 | if (s[0] == '0') { 72 | if ((s[1] == 'x') || (s[1] == 'X')) { 73 | base = 16; 74 | s += 2; 75 | } else if ((s[1] == 'b') || (s[1] == 'B')) { 76 | base = 2; 77 | s += 2; 78 | } 79 | } 80 | } 81 | 82 | s_end = s; 83 | u32_value = strtoul(s, &s_end, base); 84 | if ((s != s_end) && (*s_end == 0)) { 85 | *value = u32_value; 86 | return AIRSPY_SUCCESS; 87 | } else { 88 | return AIRSPY_ERROR_INVALID_PARAM; 89 | } 90 | } 91 | 92 | int parse_u64(char* s, uint64_t* const value) { 93 | uint_fast8_t base = 10; 94 | char* s_end; 95 | uint64_t u64_value; 96 | 97 | if( strlen(s) > 2 ) { 98 | if( s[0] == '0' ) { 99 | if( (s[1] == 'x') || (s[1] == 'X') ) { 100 | base = 16; 101 | s += 2; 102 | } else if( (s[1] == 'b') || (s[1] == 'B') ) { 103 | base = 2; 104 | s += 2; 105 | } 106 | } 107 | } 108 | 109 | s_end = s; 110 | u64_value = strtoull(s, &s_end, base); 111 | if( (s != s_end) && (*s_end == 0) ) { 112 | *value = u64_value; 113 | return AIRSPY_SUCCESS; 114 | } else { 115 | return AIRSPY_ERROR_INVALID_PARAM; 116 | } 117 | } 118 | 119 | static void usage() 120 | { 121 | printf("Usage:\n"); 122 | printf("\t-a, --address : starting address (default: 0)\n"); 123 | printf("\t-l, --length : number of bytes to read (default: 0)\n"); 124 | printf("\t-r : Read data into file (SPIFI@0x80000000).\n"); 125 | printf("\t-w : Write data from file.\n"); 126 | printf("\t[-s serial_number_64bits]: Open board with specified 64bits serial number.\n"); 127 | } 128 | 129 | bool serial_number = false; 130 | uint64_t serial_number_val; 131 | 132 | int main(int argc, char** argv) 133 | { 134 | int opt; 135 | uint32_t address = 0; 136 | uint32_t length = 0; 137 | uint32_t tmp_length; 138 | uint16_t xfer_len = 0; 139 | const char* path = NULL; 140 | struct airspy_device* device = NULL; 141 | int result = AIRSPY_SUCCESS; 142 | int option_index = 0; 143 | static uint8_t data[MAX_LENGTH]; 144 | uint8_t* pdata = &data[0]; 145 | FILE* fd = NULL; 146 | bool read = false; 147 | bool write = false; 148 | uint32_t serial_number_msb_val; 149 | uint32_t serial_number_lsb_val; 150 | 151 | while ((opt = getopt_long(argc, argv, "a:l:r:w:s:", long_options, &option_index)) != EOF) 152 | { 153 | switch (opt) { 154 | case 'a': 155 | result = parse_u32(optarg, &address); 156 | break; 157 | 158 | case 'l': 159 | result = parse_u32(optarg, &length); 160 | break; 161 | 162 | case 'r': 163 | read = true; 164 | path = optarg; 165 | break; 166 | 167 | case 'w': 168 | write = true; 169 | path = optarg; 170 | break; 171 | 172 | case 's': 173 | serial_number = true; 174 | result = parse_u64(optarg, &serial_number_val); 175 | serial_number_msb_val = (uint32_t)(serial_number_val >> 32); 176 | serial_number_lsb_val = (uint32_t)(serial_number_val & 0xFFFFFFFF); 177 | printf("Board serial number to open: 0x%08X%08X\n", serial_number_msb_val, serial_number_lsb_val); 178 | break; 179 | 180 | default: 181 | fprintf(stderr, "opt error: %d\n", opt); 182 | usage(); 183 | return EXIT_FAILURE; 184 | } 185 | 186 | if (result != AIRSPY_SUCCESS) { 187 | fprintf(stderr, "argument error: %s (%d)\n", airspy_error_name(result), result); 188 | usage(); 189 | return EXIT_FAILURE; 190 | } 191 | } 192 | 193 | if (write == read) { 194 | if (write == true) { 195 | fprintf(stderr, "Read and write options are mutually exclusive.\n"); 196 | } else { 197 | fprintf(stderr, "Specify either read or write option.\n"); 198 | } 199 | usage(); 200 | return EXIT_FAILURE; 201 | } 202 | 203 | if (path == NULL) { 204 | fprintf(stderr, "Specify a path to a file.\n"); 205 | usage(); 206 | return EXIT_FAILURE; 207 | } 208 | 209 | if( write ) 210 | { 211 | fd = fopen(path, "rb"); 212 | if(fd == NULL) 213 | { 214 | printf("Error to open file %s\n", path); 215 | return EXIT_FAILURE; 216 | } 217 | /* Get size of the file */ 218 | fseek(fd, 0, SEEK_END); /* Not really portable but work on major OS Linux/Win32 */ 219 | length = ftell(fd); 220 | /* Move to start */ 221 | rewind(fd); 222 | printf("File size %d bytes.\n", length); 223 | } 224 | 225 | if (length == 0) { 226 | fprintf(stderr, "Requested transfer of zero bytes.\n"); 227 | if(fd != NULL) 228 | fclose(fd); 229 | usage(); 230 | return EXIT_FAILURE; 231 | } 232 | 233 | if(length > MAX_LENGTH) 234 | { 235 | fprintf(stderr, "Request exceeds size of flash memory.\n"); 236 | fprintf(stderr, "address=0x%08X size=%d Bytes.\n", address, length); 237 | if(fd != NULL) 238 | fclose(fd); 239 | usage(); 240 | return EXIT_FAILURE; 241 | } 242 | 243 | if (read) { 244 | fd = fopen(path, "wb"); 245 | if(fd == NULL) 246 | { 247 | printf("Error to open file %s\n", path); 248 | return EXIT_FAILURE; 249 | } 250 | } 251 | 252 | if (fd == NULL) { 253 | fprintf(stderr, "Failed to open file: %s\n", path); 254 | return EXIT_FAILURE; 255 | } 256 | 257 | result = airspy_init(); 258 | if (result != AIRSPY_SUCCESS) { 259 | fprintf(stderr, "airspy_init() failed: %s (%d)\n", airspy_error_name(result), result); 260 | fclose(fd); 261 | return EXIT_FAILURE; 262 | } 263 | 264 | if(serial_number == true) 265 | { 266 | result = airspy_open_sn(&device, serial_number_val); 267 | if( result != AIRSPY_SUCCESS ) { 268 | printf("airspy_open_sn() failed: %s (%d)\n", airspy_error_name(result), result); 269 | usage(); 270 | fclose(fd); 271 | return EXIT_FAILURE; 272 | } 273 | }else 274 | { 275 | result = airspy_open(&device); 276 | if( result != AIRSPY_SUCCESS ) { 277 | printf("airspy_open() failed: %s (%d)\n", airspy_error_name(result), result); 278 | usage(); 279 | fclose(fd); 280 | return EXIT_FAILURE; 281 | } 282 | } 283 | 284 | if (read) 285 | { 286 | ssize_t bytes_written; 287 | tmp_length = length; 288 | while (tmp_length) 289 | { 290 | xfer_len = (tmp_length > 256) ? 256 : tmp_length; 291 | printf("Reading %d bytes from 0x%06x.\n", xfer_len, address); 292 | result = airspy_spiflash_read(device, address, xfer_len, pdata); 293 | if (result != AIRSPY_SUCCESS) { 294 | fprintf(stderr, "airspy_spiflash_read() failed: %s (%d)\n", airspy_error_name(result), result); 295 | fclose(fd); 296 | return EXIT_FAILURE; 297 | } 298 | address += xfer_len; 299 | pdata += xfer_len; 300 | tmp_length -= xfer_len; 301 | } 302 | bytes_written = fwrite(data, 1, length, fd); 303 | if (bytes_written != length) { 304 | fprintf(stderr, "Failed write to file (wrote %d bytes).\n", (int)bytes_written); 305 | fclose(fd); 306 | return EXIT_FAILURE; 307 | } 308 | } else 309 | { 310 | /* Write Firmware */ 311 | ssize_t bytes_read = fread(data, 1, length, fd); 312 | if (bytes_read != length) { 313 | fprintf(stderr, "Failed read file (read %d bytes).\n", (int)bytes_read); 314 | fclose(fd); 315 | return EXIT_FAILURE; 316 | } 317 | printf("Erasing 1st 64KB in SPI flash.\n"); 318 | result = airspy_spiflash_erase(device); 319 | if (result != AIRSPY_SUCCESS) { 320 | fprintf(stderr, "airspy_spiflash_erase() failed: %s (%d)\n", airspy_error_name(result), result); 321 | fclose(fd); 322 | return EXIT_FAILURE; 323 | } 324 | while (length) 325 | { 326 | xfer_len = (length > 256) ? 256 : length; 327 | printf("Writing %d bytes at 0x%06x.\n", xfer_len, address); 328 | result = airspy_spiflash_write(device, address, xfer_len, pdata); 329 | if (result != AIRSPY_SUCCESS) { 330 | fprintf(stderr, "airspy_spiflash_write() failed: %s (%d)\n", airspy_error_name(result), result); 331 | fclose(fd); 332 | return EXIT_FAILURE; 333 | } 334 | address += xfer_len; 335 | pdata += xfer_len; 336 | length -= xfer_len; 337 | } 338 | } 339 | 340 | result = airspy_close(device); 341 | if (result != AIRSPY_SUCCESS) { 342 | fprintf(stderr, "airspy_close() failed: %s (%d)\n", airspy_error_name(result), result); 343 | fclose(fd); 344 | return EXIT_FAILURE; 345 | } 346 | 347 | airspy_exit(); 348 | 349 | if (fd != NULL) { 350 | fclose(fd); 351 | } 352 | 353 | return EXIT_SUCCESS; 354 | } 355 | -------------------------------------------------------------------------------- /cmake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F 2 | 3 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 5 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 6 | 7 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 8 | STRING(REGEX REPLACE "\n" ";" files "${files}") 9 | FOREACH(file ${files}) 10 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | IF(EXISTS "$ENV{DESTDIR}${file}") 12 | EXEC_PROGRAM( 13 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 14 | OUTPUT_VARIABLE rm_out 15 | RETURN_VALUE rm_retval 16 | ) 17 | IF(NOT "${rm_retval}" STREQUAL 0) 18 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 19 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 20 | ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}") 21 | EXEC_PROGRAM( 22 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 23 | OUTPUT_VARIABLE rm_out 24 | RETURN_VALUE rm_retval 25 | ) 26 | IF(NOT "${rm_retval}" STREQUAL 0) 27 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 28 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 29 | ELSE(EXISTS "$ENV{DESTDIR}${file}") 30 | MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 31 | ENDIF(EXISTS "$ENV{DESTDIR}${file}") 32 | ENDFOREACH(file) 33 | -------------------------------------------------------------------------------- /cmake/modules/FindLIBAIRSPY.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find the libairspy library 2 | # Once done this defines 3 | # 4 | # LIBAIRSPY_FOUND - system has libairspy 5 | # LIBAIRSPY_INCLUDE_DIR - the libairspy include directory 6 | # LIBAIRSPY_LIBRARIES - Link these to use libairspy 7 | 8 | # Copyright (c) 2013 Benjamin Vernoux 9 | # 10 | 11 | 12 | if (LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES) 13 | 14 | # in cache already 15 | set(LIBAIRSPY_FOUND TRUE) 16 | 17 | else (LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES) 18 | IF (NOT WIN32) 19 | # use pkg-config to get the directories and then use these values 20 | # in the FIND_PATH() and FIND_LIBRARY() calls 21 | find_package(PkgConfig) 22 | pkg_check_modules(PC_LIBAIRSPY QUIET libairspy) 23 | ENDIF(NOT WIN32) 24 | 25 | FIND_PATH(LIBAIRSPY_INCLUDE_DIR 26 | NAMES airspy.h 27 | HINTS $ENV{LIBAIRSPY_DIR}/include ${PC_LIBAIRSPY_INCLUDEDIR} 28 | PATHS /usr/local/include/libairspy /usr/include/libairspy /usr/local/include 29 | /usr/include ${CMAKE_SOURCE_DIR}/../libairspy/src 30 | /opt/local/include/libairspy 31 | ${LIBAIRSPY_INCLUDE_DIR} 32 | ) 33 | 34 | set(libairspy_library_names airspy) 35 | 36 | FIND_LIBRARY(LIBAIRSPY_LIBRARIES 37 | NAMES ${libairspy_library_names} 38 | HINTS $ENV{LIBAIRSPY_DIR}/lib ${PC_LIBAIRSPY_LIBDIR} 39 | PATHS /usr/local/lib /usr/lib /opt/local/lib ${PC_LIBAIRSPY_LIBDIR} ${PC_LIBAIRSPY_LIBRARY_DIRS} ${CMAKE_SOURCE_DIR}/../libairspy/src 40 | ) 41 | 42 | if(LIBAIRSPY_INCLUDE_DIR) 43 | set(CMAKE_REQUIRED_INCLUDES ${LIBAIRSPY_INCLUDE_DIR}) 44 | endif() 45 | 46 | if(LIBAIRSPY_LIBRARIES) 47 | set(CMAKE_REQUIRED_LIBRARIES ${LIBAIRSPY_LIBRARIES}) 48 | endif() 49 | 50 | include(FindPackageHandleStandardArgs) 51 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBAIRSPY DEFAULT_MSG LIBAIRSPY_LIBRARIES LIBAIRSPY_INCLUDE_DIR) 52 | 53 | MARK_AS_ADVANCED(LIBAIRSPY_INCLUDE_DIR LIBAIRSPY_LIBRARIES) 54 | 55 | endif (LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES) -------------------------------------------------------------------------------- /cmake/modules/FindLIBUSB.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find the freetype library 2 | # Once done this defines 3 | # 4 | # LIBUSB_FOUND - system has libusb 5 | # LIBUSB_INCLUDE_DIR - the libusb include directory 6 | # LIBUSB_LIBRARIES - Link these to use libusb 7 | 8 | # Copyright (c) 2006, 2008 Laurent Montel, 9 | # 10 | # Redistribution and use is allowed according to the terms of the BSD license. 11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 12 | 13 | 14 | if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) 15 | 16 | # in cache already 17 | set(LIBUSB_FOUND TRUE) 18 | 19 | else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) 20 | 21 | find_package(PkgConfig) 22 | if(PKG_CONFIG_FOUND) 23 | pkg_check_modules(PC_LIBUSB libusb-1.0) 24 | endif(PKG_CONFIG_FOUND) 25 | 26 | FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h 27 | PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) 28 | 29 | FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 30 | PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) 31 | 32 | include(FindPackageHandleStandardArgs) 33 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) 34 | 35 | MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) 36 | 37 | endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) 38 | -------------------------------------------------------------------------------- /cmake/modules/FindThreads.cmake: -------------------------------------------------------------------------------- 1 | # Updated FindThreads.cmake that supports pthread-win32 2 | # Downloaded from http://www.vtk.org/Bug/bug_view_advanced_page.php?bug_id=6399 3 | 4 | # - This module determines the thread library of the system. 5 | # 6 | # The following variables are set 7 | # CMAKE_THREAD_LIBS_INIT - the thread library 8 | # CMAKE_USE_SPROC_INIT - are we using sproc? 9 | # CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads? 10 | # CMAKE_USE_PTHREADS_INIT - are we using pthreads 11 | # CMAKE_HP_PTHREADS_INIT - are we using hp pthreads 12 | # 13 | # If use of pthreads-win32 is desired, the following variables 14 | # can be set. 15 | # 16 | # THREADS_USE_PTHREADS_WIN32 - 17 | # Setting this to true searches for the pthreads-win32 18 | # port (since CMake 2.8.0) 19 | # 20 | # THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME 21 | # C = no exceptions (default) 22 | # (NOTE: This is the default scheme on most POSIX thread 23 | # implementations and what you should probably be using) 24 | # CE = C++ Exception Handling 25 | # SE = Structure Exception Handling (MSVC only) 26 | # (NOTE: Changing this option from the default may affect 27 | # the portability of your application. See pthreads-win32 28 | # documentation for more details.) 29 | # 30 | #====================================================== 31 | # Example usage where threading library 32 | # is provided by the system: 33 | # 34 | # find_package(Threads REQUIRED) 35 | # add_executable(foo foo.cc) 36 | # target_link_libraries(foo ${CMAKE_THREAD_LIBS_INIT}) 37 | # 38 | # Example usage if pthreads-win32 is desired on Windows 39 | # or a system provided thread library: 40 | # 41 | # set(THREADS_USE_PTHREADS_WIN32 true) 42 | # find_package(Threads REQUIRED) 43 | # include_directories(${THREADS_PTHREADS_INCLUDE_DIR}) 44 | # 45 | # add_executable(foo foo.cc) 46 | # target_link_libraries(foo ${CMAKE_THREAD_LIBS_INIT}) 47 | # 48 | 49 | INCLUDE (CheckIncludeFiles) 50 | INCLUDE (CheckLibraryExists) 51 | SET(Threads_FOUND FALSE) 52 | 53 | IF(WIN32 AND NOT CYGWIN AND THREADS_USE_PTHREADS_WIN32) 54 | SET(_Threads_ptwin32 true) 55 | ENDIF() 56 | 57 | # Do we have sproc? 58 | IF(CMAKE_SYSTEM MATCHES IRIX) 59 | CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H) 60 | ENDIF() 61 | 62 | IF(CMAKE_HAVE_SPROC_H) 63 | # We have sproc 64 | SET(CMAKE_USE_SPROC_INIT 1) 65 | 66 | ELSEIF(_Threads_ptwin32) 67 | 68 | IF(NOT DEFINED THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME) 69 | # Assign the default scheme 70 | SET(THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME "C") 71 | ELSE() 72 | # Validate the scheme specified by the user 73 | IF(NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "C" AND 74 | NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "CE" AND 75 | NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE") 76 | MESSAGE(FATAL_ERROR "See documentation for FindPthreads.cmake, only C, CE, and SE modes are allowed") 77 | ENDIF() 78 | IF(NOT MSVC AND THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE") 79 | MESSAGE(FATAL_ERROR "Structured Exception Handling is only allowed for MSVC") 80 | ENDIF(NOT MSVC AND THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE") 81 | ENDIF() 82 | 83 | FIND_PATH(THREADS_PTHREADS_INCLUDE_DIR pthread.h) 84 | 85 | # Determine the library filename 86 | IF(MSVC) 87 | SET(_Threads_pthreads_libname 88 | pthreadV${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2) 89 | ELSEIF(MINGW) 90 | SET(_Threads_pthreads_libname 91 | pthreadG${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2) 92 | ELSE() 93 | MESSAGE(FATAL_ERROR "This should never happen") 94 | ENDIF() 95 | 96 | # Use the include path to help find the library if possible 97 | SET(_Threads_lib_paths "") 98 | IF(THREADS_PTHREADS_INCLUDE_DIR) 99 | GET_FILENAME_COMPONENT(_Threads_root_dir 100 | ${THREADS_PTHREADS_INCLUDE_DIR} PATH) 101 | SET(_Threads_lib_paths ${_Threads_root_dir}/lib) 102 | ENDIF() 103 | FIND_LIBRARY(THREADS_PTHREADS_WIN32_LIBRARY 104 | NAMES ${_Threads_pthreads_libname} 105 | PATHS ${_Threads_lib_paths} 106 | DOC "The Portable Threads Library for Win32" 107 | NO_SYSTEM_PATH 108 | ) 109 | 110 | IF(THREADS_PTHREADS_INCLUDE_DIR AND THREADS_PTHREADS_WIN32_LIBRARY) 111 | MARK_AS_ADVANCED(THREADS_PTHREADS_INCLUDE_DIR) 112 | SET(CMAKE_THREAD_LIBS_INIT ${THREADS_PTHREADS_WIN32_LIBRARY}) 113 | SET(CMAKE_HAVE_THREADS_LIBRARY 1) 114 | SET(Threads_FOUND TRUE) 115 | ENDIF() 116 | 117 | MARK_AS_ADVANCED(THREADS_PTHREADS_WIN32_LIBRARY) 118 | 119 | ELSE() 120 | # Do we have pthreads? 121 | CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H) 122 | IF(CMAKE_HAVE_PTHREAD_H) 123 | 124 | # 125 | # We have pthread.h 126 | # Let's check for the library now. 127 | # 128 | SET(CMAKE_HAVE_THREADS_LIBRARY) 129 | IF(NOT THREADS_HAVE_PTHREAD_ARG) 130 | 131 | # Do we have -lpthreads 132 | CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE) 133 | IF(CMAKE_HAVE_PTHREADS_CREATE) 134 | SET(CMAKE_THREAD_LIBS_INIT "-lpthreads") 135 | SET(CMAKE_HAVE_THREADS_LIBRARY 1) 136 | SET(Threads_FOUND TRUE) 137 | ENDIF() 138 | 139 | # Ok, how about -lpthread 140 | CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE) 141 | IF(CMAKE_HAVE_PTHREAD_CREATE) 142 | SET(CMAKE_THREAD_LIBS_INIT "-lpthread") 143 | SET(Threads_FOUND TRUE) 144 | SET(CMAKE_HAVE_THREADS_LIBRARY 1) 145 | ENDIF() 146 | 147 | IF(CMAKE_SYSTEM MATCHES "SunOS.*") 148 | # On sun also check for -lthread 149 | CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE) 150 | IF(CMAKE_HAVE_THR_CREATE) 151 | SET(CMAKE_THREAD_LIBS_INIT "-lthread") 152 | SET(CMAKE_HAVE_THREADS_LIBRARY 1) 153 | SET(Threads_FOUND TRUE) 154 | ENDIF() 155 | ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*") 156 | 157 | ENDIF(NOT THREADS_HAVE_PTHREAD_ARG) 158 | 159 | IF(NOT CMAKE_HAVE_THREADS_LIBRARY) 160 | # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread 161 | IF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") 162 | MESSAGE(STATUS "Check if compiler accepts -pthread") 163 | TRY_RUN(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG 164 | ${CMAKE_BINARY_DIR} 165 | ${CMAKE_ROOT}/Modules/CheckForPthreads.c 166 | CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread 167 | COMPILE_OUTPUT_VARIABLE OUTPUT) 168 | 169 | IF(THREADS_HAVE_PTHREAD_ARG) 170 | IF(THREADS_PTHREAD_ARG MATCHES "^2$") 171 | SET(Threads_FOUND TRUE) 172 | MESSAGE(STATUS "Check if compiler accepts -pthread - yes") 173 | ELSE() 174 | MESSAGE(STATUS "Check if compiler accepts -pthread - no") 175 | FILE(APPEND 176 | ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 177 | "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n") 178 | ENDIF() 179 | ELSE() 180 | MESSAGE(STATUS "Check if compiler accepts -pthread - no") 181 | FILE(APPEND 182 | ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 183 | "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") 184 | ENDIF() 185 | 186 | ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") 187 | 188 | IF(THREADS_HAVE_PTHREAD_ARG) 189 | SET(Threads_FOUND TRUE) 190 | SET(CMAKE_THREAD_LIBS_INIT "-pthread") 191 | ENDIF() 192 | 193 | ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY) 194 | ENDIF(CMAKE_HAVE_PTHREAD_H) 195 | ENDIF() 196 | 197 | IF(CMAKE_THREAD_LIBS_INIT) 198 | SET(CMAKE_USE_PTHREADS_INIT 1) 199 | SET(Threads_FOUND TRUE) 200 | ENDIF() 201 | 202 | IF(CMAKE_SYSTEM MATCHES "Windows" 203 | AND NOT THREADS_USE_PTHREADS_WIN32) 204 | SET(CMAKE_USE_WIN32_THREADS_INIT 1) 205 | SET(Threads_FOUND TRUE) 206 | ENDIF() 207 | 208 | IF(CMAKE_USE_PTHREADS_INIT) 209 | IF(CMAKE_SYSTEM MATCHES "HP-UX-*") 210 | # Use libcma if it exists and can be used. It provides more 211 | # symbols than the plain pthread library. CMA threads 212 | # have actually been deprecated: 213 | # http://docs.hp.com/en/B3920-90091/ch12s03.html#d0e11395 214 | # http://docs.hp.com/en/947/d8.html 215 | # but we need to maintain compatibility here. 216 | # The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads 217 | # are available. 218 | CHECK_LIBRARY_EXISTS(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA) 219 | IF(CMAKE_HAVE_HP_CMA) 220 | SET(CMAKE_THREAD_LIBS_INIT "-lcma") 221 | SET(CMAKE_HP_PTHREADS_INIT 1) 222 | SET(Threads_FOUND TRUE) 223 | ENDIF(CMAKE_HAVE_HP_CMA) 224 | SET(CMAKE_USE_PTHREADS_INIT 1) 225 | ENDIF() 226 | 227 | IF(CMAKE_SYSTEM MATCHES "OSF1-V*") 228 | SET(CMAKE_USE_PTHREADS_INIT 0) 229 | SET(CMAKE_THREAD_LIBS_INIT ) 230 | ENDIF() 231 | 232 | IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*") 233 | SET(CMAKE_USE_PTHREADS_INIT 1) 234 | SET(Threads_FOUND TRUE) 235 | SET(CMAKE_THREAD_LIBS_INIT ) 236 | SET(CMAKE_USE_WIN32_THREADS_INIT 0) 237 | ENDIF() 238 | ENDIF(CMAKE_USE_PTHREADS_INIT) 239 | 240 | INCLUDE(FindPackageHandleStandardArgs) 241 | IF(_Threads_ptwin32) 242 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG 243 | THREADS_PTHREADS_WIN32_LIBRARY THREADS_PTHREADS_INCLUDE_DIR) 244 | ELSE() 245 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND) 246 | ENDIF() 247 | -------------------------------------------------------------------------------- /libairspy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2012 Jared Boone 2 | # Copyright 2013/2014 Benjamin Vernoux 3 | # 4 | # This file is part of AirSpy (based on HackRF project). 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2, or (at your option) 9 | # any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; see the file COPYING. If not, write to 18 | # the Free Software Foundation, Inc., 51 Franklin Street, 19 | # Boston, MA 02110-1301, USA. 20 | # 21 | 22 | # Based heavily upon the libftdi cmake setup. 23 | 24 | cmake_minimum_required(VERSION 2.8.12.1) 25 | project(libairspy C) 26 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/airspy.h AIRSPY_H_CONTENTS) 27 | 28 | STRING(REGEX MATCH "\#define AIRSPY_VER_MAJOR[ \t]+([0-9]+)" AIRSPY_VER_MJ ${AIRSPY_H_CONTENTS}) 29 | STRING(REGEX MATCH "([0-9]+)" AIRSPY_VER_MJ ${AIRSPY_VER_MJ}) 30 | 31 | STRING(REGEX MATCH "\#define AIRSPY_VER_MINOR[ \t]+([0-9]+)" AIRSPY_VER_MI ${AIRSPY_H_CONTENTS}) 32 | STRING(REGEX MATCH "([0-9]+)" AIRSPY_VER_MI ${AIRSPY_VER_MI}) 33 | 34 | STRING(REGEX MATCH "\#define AIRSPY_VER_REVISION[ \t]+([0-9]+)" AIRSPY_VER_RE ${AIRSPY_H_CONTENTS}) 35 | STRING(REGEX MATCH "([0-9]+)" AIRSPY_VER_RE ${AIRSPY_VER_RE}) 36 | 37 | set(AIRSPY_VER_MAJOR ${AIRSPY_VER_MJ}) 38 | set(AIRSPY_VER_MINOR ${AIRSPY_VER_MI}) 39 | set(AIRSPY_VER_REVISION ${AIRSPY_VER_RE}) 40 | 41 | set(PACKAGE libairspy) 42 | set(VERSION_STRING ${AIRSPY_VER_MAJOR}.${AIRSPY_VER_MINOR}) 43 | set(VERSION ${VERSION_STRING}) 44 | set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/modules) 45 | set(CMAKE_BUILD_TYPE Release) 46 | 47 | if(APPLE) 48 | set(GR_LIBRARY_DIR "lib") 49 | if(NOT CMAKE_INSTALL_NAME_DIR) 50 | set(CMAKE_INSTALL_NAME_DIR 51 | ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE 52 | PATH "Library Install Name Destination Directory" FORCE) 53 | endif(NOT CMAKE_INSTALL_NAME_DIR) 54 | if(NOT CMAKE_INSTALL_RPATH) 55 | set(CMAKE_INSTALL_RPATH 56 | ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE 57 | PATH "Library Install RPath" FORCE) 58 | endif(NOT CMAKE_INSTALL_RPATH) 59 | if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH) 60 | set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE 61 | BOOL "Do Build Using Library Install RPath" FORCE) 62 | endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH) 63 | endif(APPLE) 64 | 65 | if(MSVC) 66 | set(THREADS_USE_PTHREADS_WIN32 true) 67 | else() 68 | add_definitions(-Wall) 69 | 70 | INCLUDE(TestBigEndian) 71 | TEST_BIG_ENDIAN(BIGENDIAN) 72 | if(${BIGENDIAN}) 73 | add_definitions(-DAIRSPY_BIG_ENDIAN) 74 | endif(${BIGENDIAN}) 75 | endif() 76 | find_package(LIBUSB REQUIRED) 77 | find_package(Threads REQUIRED) 78 | 79 | include_directories(${LIBUSB_INCLUDE_DIR} ${THREADS_PTHREADS_INCLUDE_DIR}) 80 | 81 | add_subdirectory(src) 82 | 83 | ######################################################################## 84 | # Create Pkg Config File 85 | ######################################################################## 86 | FOREACH(inc ${LIBUSB_INCLUDE_DIR}) 87 | LIST(APPEND AIRSPY_PC_CFLAGS "-I${inc}") 88 | ENDFOREACH(inc) 89 | 90 | # use space-separation format for the pc file 91 | STRING(REPLACE ";" " " AIRSPY_PC_CFLAGS "${AIRSPY_PC_CFLAGS}") 92 | STRING(REPLACE ";" " " AIRSPY_PC_LIBS "${AIRSPY_PC_LIBS}") 93 | 94 | # unset these vars to avoid hard-coded paths to cross environment 95 | IF(CMAKE_CROSSCOMPILING) 96 | UNSET(AIRSPY_PC_CFLAGS) 97 | UNSET(AIRSPY_PC_LIBS) 98 | ENDIF(CMAKE_CROSSCOMPILING) 99 | 100 | set(prefix ${CMAKE_INSTALL_PREFIX}) 101 | set(exec_prefix \${prefix}) 102 | set(libdir \${exec_prefix}/lib${LIB_SUFFIX}) 103 | set(includedir \${prefix}/include) 104 | 105 | CONFIGURE_FILE( 106 | ${CMAKE_CURRENT_SOURCE_DIR}/libairspy.pc.in 107 | ${CMAKE_CURRENT_BINARY_DIR}/libairspy.pc 108 | @ONLY) 109 | 110 | INSTALL( 111 | FILES ${CMAKE_CURRENT_BINARY_DIR}/libairspy.pc 112 | DESTINATION lib${LIB_SUFFIX}/pkgconfig 113 | ) 114 | 115 | ######################################################################## 116 | # Create uninstall target 117 | ######################################################################## 118 | if(NOT airspy_all_SOURCE_DIR) 119 | configure_file( 120 | ${PROJECT_SOURCE_DIR}/../cmake/cmake_uninstall.cmake.in 121 | ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake 122 | @ONLY) 123 | 124 | add_custom_target(uninstall 125 | ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake 126 | ) 127 | endif() 128 | -------------------------------------------------------------------------------- /libairspy/LICENSE.md: -------------------------------------------------------------------------------- 1 | The AirSpy library includes a number of subcomponents with separate copyright 2 | notices and license terms. Your use of the source code for these subcomponents 3 | is subject to the terms and conditions of the following licenses. 4 | 5 | 6 | For the following components: 7 | - src/airspy.c 8 | - src/airspy.h 9 | - src/airspy_commands.h 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | Redistributions of source code must retain the above copyright notice, this 15 | list of conditions and the following disclaimer. 16 | 17 | Redistributions in binary form must reproduce the above copyright notice, 18 | this list of conditions and the following disclaimer in the documentation 19 | and/or other materials provided with the distribution. 20 | 21 | Neither the name of AirSpy nor the names of its contributors may be used to 22 | endorse or promote products derived from this software without specific 23 | prior written permission. 24 | 25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 26 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 27 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 29 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 30 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 31 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 32 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 34 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | For the following components: 38 | - src/filters.h 39 | - src/iqconverter_float.c 40 | - src/iqconverter_float.h 41 | - src/iqconverter_int16.c 42 | - src/iqconverter_int16.h 43 | 44 | Permission is hereby granted, free of charge, to any person obtaining a copy 45 | of this software and associated documentation files (the "Software"), to deal 46 | in the Software without restriction, including without limitation the rights 47 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 48 | copies of the Software, and to permit persons to whom the Software is 49 | furnished to do so, subject to the following conditions: 50 | 51 | The above copyright notice and this permission notice shall be included in 52 | all copies or substantial portions of the Software. 53 | 54 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 55 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 56 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 57 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 58 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 59 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 60 | THE SOFTWARE. 61 | -------------------------------------------------------------------------------- /libairspy/README.md: -------------------------------------------------------------------------------- 1 | AirSpy 2 | ====== 3 | 4 | A tiny but efficient software defined radio. 5 | 6 | This repository contains host software (Linux/Windows) for AirSpy, a project to 7 | produce a low cost, open source software radio platform. 8 | 9 | AirSpy: http://www.airspy.com 10 | 11 | For more details on how to build libairspy see previous directory host README.md file. 12 | 13 | ## Principal authors: 14 | 15 | Benjamin Vernoux and Youssef Touil 16 | 17 | 18 | http://www.airspy.com 19 | 20 | This file is part of AirSpy (based on HackRF project see http://greatscottgadgets.com/hackrf/). 21 | -------------------------------------------------------------------------------- /libairspy/libairspy.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: AirSpy Library 7 | Description: C Utility Library 8 | Version: @VERSION@ 9 | Cflags: -I${includedir}/libairspy/ @AIRSPY_PC_CFLAGS@ 10 | Libs: -L${libdir} -lairspy 11 | Libs.private: @AIRSPY_PC_LIBS@ 12 | -------------------------------------------------------------------------------- /libairspy/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2012, Jared Boone 3 | # Copyright (c) 2013, Michael Ossmann 4 | # Copyright (c) 2013, Youssef Touil 5 | # Copyright (c) 2013/2014, Benjamin Vernoux 6 | # 7 | # This file is part of AirSpy (based on HackRF project). 8 | # 9 | # All rights reserved. 10 | # 11 | # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 12 | # 13 | # Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 14 | # Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the 15 | # documentation and/or other materials provided with the distribution. 16 | # Neither the name of Great Scott Gadgets nor the names of its contributors may be used to endorse or promote products derived from this software 17 | # without specific prior written permission. 18 | # 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | # 26 | # Based heavily upon the libftdi cmake setup. 27 | 28 | # Targets 29 | set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/airspy.c ${CMAKE_CURRENT_SOURCE_DIR}/iqconverter_float.c ${CMAKE_CURRENT_SOURCE_DIR}/iqconverter_int16.c CACHE INTERNAL "List of C sources") 30 | set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/airspy.h ${CMAKE_CURRENT_SOURCE_DIR}/airspy_commands.h ${CMAKE_CURRENT_SOURCE_DIR}/iqconverter_float.h ${CMAKE_CURRENT_SOURCE_DIR}/iqconverter_int16.h ${CMAKE_CURRENT_SOURCE_DIR}/filters.h CACHE INTERNAL "List of C headers") 31 | 32 | if(MINGW) 33 | # This gets us DLL resource information when compiling on MinGW. 34 | if(NOT CMAKE_RC_COMPILER) 35 | set(CMAKE_RC_COMPILER windres.exe) 36 | endif() 37 | 38 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/airspyrc.obj 39 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/airspy.h 40 | COMMAND ${CMAKE_RC_COMPILER} 41 | -D GCC_WINDRES 42 | -I ${CMAKE_CURRENT_SOURCE_DIR} 43 | -I ${CMAKE_CURRENT_BINARY_DIR} 44 | -o ${CMAKE_CURRENT_BINARY_DIR}/airspyrc.obj 45 | -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/airspy.rc) 46 | set(AIRSPY_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/airspyrc.obj) 47 | endif(MINGW) 48 | 49 | # Dynamic library 50 | add_library(airspy SHARED ${c_sources} ${AIRSPY_DLL_SRCS}) 51 | set_target_properties(airspy PROPERTIES VERSION ${AIRSPY_VER_MAJOR}.${AIRSPY_VER_MINOR}.${AIRSPY_VER_REVISION}) 52 | set_target_properties(airspy PROPERTIES SOVERSION 0) 53 | 54 | if( ${WIN32} ) 55 | set_target_properties(airspy PROPERTIES 56 | RUNTIME_OUTPUT_DIRECTORY_RELEASE ../../airspy-tools/src 57 | ) 58 | endif( ${WIN32} ) 59 | 60 | # Static library 61 | add_library(airspy-static STATIC ${c_sources}) 62 | if(MSVC) 63 | set_target_properties(airspy-static PROPERTIES OUTPUT_NAME "airspy_static") 64 | else() 65 | set_target_properties(airspy-static PROPERTIES OUTPUT_NAME "airspy") 66 | endif() 67 | 68 | set_target_properties(airspy PROPERTIES CLEAN_DIRECT_OUTPUT 1) 69 | set_target_properties(airspy-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) 70 | 71 | # Dependencies 72 | target_link_libraries(airspy ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) 73 | 74 | # For cygwin just force UNIX OFF and WIN32 ON 75 | if( ${CYGWIN} ) 76 | SET(UNIX OFF) 77 | SET(WIN32 ON) 78 | endif( ${CYGWIN} ) 79 | 80 | if( ${UNIX} ) 81 | install(TARGETS airspy 82 | LIBRARY DESTINATION lib${LIB_SUFFIX} 83 | COMPONENT sharedlibs 84 | ) 85 | install(TARGETS airspy-static 86 | ARCHIVE DESTINATION lib${LIB_SUFFIX} 87 | COMPONENT staticlibs 88 | ) 89 | install(FILES ${c_headers} 90 | DESTINATION include/${PROJECT_NAME} 91 | COMPONENT headers 92 | ) 93 | endif( ${UNIX} ) 94 | 95 | if( ${WIN32} ) 96 | install(TARGETS airspy 97 | DESTINATION bin 98 | COMPONENT sharedlibs 99 | ) 100 | install(TARGETS airspy-static 101 | DESTINATION bin 102 | COMPONENT staticlibs 103 | ) 104 | install(FILES ${c_headers} 105 | DESTINATION include/${PROJECT_NAME} 106 | COMPONENT headers 107 | ) 108 | endif( ${WIN32} ) 109 | -------------------------------------------------------------------------------- /libairspy/src/airspy_commands.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013-2016, Benjamin Vernoux 3 | 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 7 | 8 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 9 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | Neither the name of AirSpy nor the names of its contributors may be used to endorse or promote products derived from this software 12 | without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 17 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 18 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 19 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | */ 21 | 22 | #ifndef __AIRSPY_COMMANDS_H__ 23 | #define __AIRSPY_COMMANDS_H__ 24 | 25 | #include 26 | 27 | #ifdef __cplusplus 28 | extern "C" 29 | { 30 | #endif 31 | 32 | typedef enum 33 | { 34 | RECEIVER_MODE_OFF = 0, 35 | RECEIVER_MODE_RX = 1 36 | } receiver_mode_t; 37 | 38 | /* 39 | Note: airspy_samplerate_t is now obsolete and left for backward compatibility. 40 | The list of supported sample rates should be retrieved at run time by calling airspy_get_samplerates(). 41 | Refer to the Airspy Tools for illustrations. 42 | */ 43 | typedef enum 44 | { 45 | AIRSPY_SAMPLERATE_10MSPS = 0, /* 12bits 10MHz IQ */ 46 | AIRSPY_SAMPLERATE_2_5MSPS = 1, /* 12bits 2.5MHz IQ */ 47 | AIRSPY_SAMPLERATE_END = 2 /* End index for sample rate (corresponds to number of samplerate) */ 48 | } airspy_samplerate_t; 49 | 50 | 51 | #define AIRSPY_CONF_CMD_SHIFT_BIT (3) // Up to 3bits=8 samplerates (airspy_samplerate_t enum shall not exceed 7) 52 | 53 | // Commands (usb vendor request) shared between Firmware and Host. 54 | #define AIRSPY_CMD_MAX (27) 55 | typedef enum 56 | { 57 | AIRSPY_INVALID = 0 , 58 | AIRSPY_RECEIVER_MODE = 1 , 59 | AIRSPY_SI5351C_WRITE = 2 , 60 | AIRSPY_SI5351C_READ = 3 , 61 | AIRSPY_R820T_WRITE = 4 , 62 | AIRSPY_R820T_READ = 5 , 63 | AIRSPY_SPIFLASH_ERASE = 6 , 64 | AIRSPY_SPIFLASH_WRITE = 7 , 65 | AIRSPY_SPIFLASH_READ = 8 , 66 | AIRSPY_BOARD_ID_READ = 9 , 67 | AIRSPY_VERSION_STRING_READ = 10, 68 | AIRSPY_BOARD_PARTID_SERIALNO_READ = 11, 69 | AIRSPY_SET_SAMPLERATE = 12, 70 | AIRSPY_SET_FREQ = 13, 71 | AIRSPY_SET_LNA_GAIN = 14, 72 | AIRSPY_SET_MIXER_GAIN = 15, 73 | AIRSPY_SET_VGA_GAIN = 16, 74 | AIRSPY_SET_LNA_AGC = 17, 75 | AIRSPY_SET_MIXER_AGC = 18, 76 | AIRSPY_MS_VENDOR_CMD = 19, 77 | AIRSPY_SET_RF_BIAS_CMD = 20, 78 | AIRSPY_GPIO_WRITE = 21, 79 | AIRSPY_GPIO_READ = 22, 80 | AIRSPY_GPIODIR_WRITE = 23, 81 | AIRSPY_GPIODIR_READ = 24, 82 | AIRSPY_GET_SAMPLERATES = 25, 83 | AIRSPY_SET_PACKING = 26, 84 | AIRSPY_SPIFLASH_ERASE_SECTOR = AIRSPY_CMD_MAX 85 | } airspy_vendor_request; 86 | 87 | typedef enum 88 | { 89 | CONFIG_CALIBRATION = 0, 90 | //CONFIG_META = 1, 91 | } airspy_common_config_pages_t; 92 | 93 | typedef enum 94 | { 95 | GPIO_PORT0 = 0, 96 | GPIO_PORT1 = 1, 97 | GPIO_PORT2 = 2, 98 | GPIO_PORT3 = 3, 99 | GPIO_PORT4 = 4, 100 | GPIO_PORT5 = 5, 101 | GPIO_PORT6 = 6, 102 | GPIO_PORT7 = 7 103 | } airspy_gpio_port_t; 104 | 105 | typedef enum 106 | { 107 | GPIO_PIN0 = 0, 108 | GPIO_PIN1 = 1, 109 | GPIO_PIN2 = 2, 110 | GPIO_PIN3 = 3, 111 | GPIO_PIN4 = 4, 112 | GPIO_PIN5 = 5, 113 | GPIO_PIN6 = 6, 114 | GPIO_PIN7 = 7, 115 | GPIO_PIN8 = 8, 116 | GPIO_PIN9 = 9, 117 | GPIO_PIN10 = 10, 118 | GPIO_PIN11 = 11, 119 | GPIO_PIN12 = 12, 120 | GPIO_PIN13 = 13, 121 | GPIO_PIN14 = 14, 122 | GPIO_PIN15 = 15, 123 | GPIO_PIN16 = 16, 124 | GPIO_PIN17 = 17, 125 | GPIO_PIN18 = 18, 126 | GPIO_PIN19 = 19, 127 | GPIO_PIN20 = 20, 128 | GPIO_PIN21 = 21, 129 | GPIO_PIN22 = 22, 130 | GPIO_PIN23 = 23, 131 | GPIO_PIN24 = 24, 132 | GPIO_PIN25 = 25, 133 | GPIO_PIN26 = 26, 134 | GPIO_PIN27 = 27, 135 | GPIO_PIN28 = 28, 136 | GPIO_PIN29 = 29, 137 | GPIO_PIN30 = 30, 138 | GPIO_PIN31 = 31 139 | } airspy_gpio_pin_t; 140 | 141 | #ifdef __cplusplus 142 | } // __cplusplus defined. 143 | #endif 144 | 145 | #endif//__AIRSPY_COMMANDS_H__ 146 | -------------------------------------------------------------------------------- /libairspy/src/filters.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014, Youssef Touil 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | #ifndef FILTERS_H 24 | #define FILTERS_H 25 | 26 | #include 27 | 28 | #define HB_KERNEL_FLOAT_LEN 47 29 | 30 | const float HB_KERNEL_FLOAT[HB_KERNEL_FLOAT_LEN] = 31 | { 32 | -0.000998606272947510, 33 | 0.000000000000000000, 34 | 0.001695637278417295, 35 | 0.000000000000000000, 36 | -0.003054430179754289, 37 | 0.000000000000000000, 38 | 0.005055504379767936, 39 | 0.000000000000000000, 40 | -0.007901319195893647, 41 | 0.000000000000000000, 42 | 0.011873357051047719, 43 | 0.000000000000000000, 44 | -0.017411159379930066, 45 | 0.000000000000000000, 46 | 0.025304817427568772, 47 | 0.000000000000000000, 48 | -0.037225225204559217, 49 | 0.000000000000000000, 50 | 0.057533286997004301, 51 | 0.000000000000000000, 52 | -0.102327462004259350, 53 | 0.000000000000000000, 54 | 0.317034472508947400, 55 | 0.500000000000000000, 56 | 0.317034472508947400, 57 | 0.000000000000000000, 58 | -0.102327462004259350, 59 | 0.000000000000000000, 60 | 0.057533286997004301, 61 | 0.000000000000000000, 62 | -0.037225225204559217, 63 | 0.000000000000000000, 64 | 0.025304817427568772, 65 | 0.000000000000000000, 66 | -0.017411159379930066, 67 | 0.000000000000000000, 68 | 0.011873357051047719, 69 | 0.000000000000000000, 70 | -0.007901319195893647, 71 | 0.000000000000000000, 72 | 0.005055504379767936, 73 | 0.000000000000000000, 74 | -0.003054430179754289, 75 | 0.000000000000000000, 76 | 0.001695637278417295, 77 | 0.000000000000000000, 78 | -0.000998606272947510 79 | }; 80 | 81 | #define HB_KERNEL_INT16_LEN 47 82 | 83 | const int16_t HB_KERNEL_INT16[HB_KERNEL_INT16_LEN] = 84 | { 85 | -33, 86 | 0, 87 | 56, 88 | 0, 89 | -100, 90 | 0, 91 | 166, 92 | 0, 93 | -259, 94 | 0, 95 | 389, 96 | 0, 97 | -571, 98 | 0, 99 | 829, 100 | 0, 101 | -1220, 102 | 0, 103 | 1885, 104 | 0, 105 | -3353, 106 | 0, 107 | 10389, 108 | 16384, 109 | 10389, 110 | 0, 111 | -3353, 112 | 0, 113 | 1885, 114 | 0, 115 | -1220, 116 | 0, 117 | 829, 118 | 0, 119 | -571, 120 | 0, 121 | 389, 122 | 0, 123 | -259, 124 | 0, 125 | 166, 126 | 0, 127 | -100, 128 | 0, 129 | 56, 130 | 0, 131 | -33 132 | }; 133 | 134 | #endif // FILTERS_H 135 | -------------------------------------------------------------------------------- /libairspy/src/iqconverter_float.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014, Youssef Touil 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | #ifndef IQCONVERTER_FLOAT_H 24 | #define IQCONVERTER_FLOAT_H 25 | 26 | #include 27 | 28 | #define IQCONVERTER_NZEROS 2 29 | #define IQCONVERTER_NPOLES 2 30 | 31 | typedef struct { 32 | float avg; 33 | float hbc; 34 | int len; 35 | int fir_index; 36 | int delay_index; 37 | float *fir_kernel; 38 | float *fir_queue; 39 | float *delay_line; 40 | } iqconverter_float_t; 41 | 42 | iqconverter_float_t *iqconverter_float_create(const float *hb_kernel, int len); 43 | void iqconverter_float_free(iqconverter_float_t *cnv); 44 | void iqconverter_float_reset(iqconverter_float_t *cnv); 45 | void iqconverter_float_process(iqconverter_float_t *cnv, float *samples, int len); 46 | 47 | #endif // IQCONVERTER_FLOAT_H 48 | -------------------------------------------------------------------------------- /libairspy/src/iqconverter_int16.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014, Youssef Touil 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | #include "iqconverter_int16.h" 24 | #include 25 | #include 26 | 27 | #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) 28 | #include 29 | #define _aligned_malloc __mingw_aligned_malloc 30 | #define _aligned_free __mingw_aligned_free 31 | #define _inline inline 32 | #elif defined(__APPLE__) 33 | #include 34 | #define _aligned_malloc(size, alignment) malloc(size) 35 | #define _aligned_free(mem) free(mem) 36 | #define _inline inline 37 | #elif defined(__FreeBSD__) 38 | #define _inline inline 39 | #define _aligned_free(mem) free(mem) 40 | void * _aligned_malloc(size_t size, size_t alignment); 41 | #elif defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) 42 | #include 43 | #define _aligned_malloc(size, alignment) memalign(alignment, size) 44 | #define _aligned_free(mem) free(mem) 45 | #define _inline inline 46 | #endif 47 | 48 | #define SIZE_FACTOR 16 49 | #define DEFAULT_ALIGNMENT 16 50 | 51 | iqconverter_int16_t *iqconverter_int16_create(const int16_t *hb_kernel, int len) 52 | { 53 | int i; 54 | size_t buffer_size; 55 | iqconverter_int16_t *cnv = (iqconverter_int16_t *) _aligned_malloc(sizeof(iqconverter_int16_t), DEFAULT_ALIGNMENT); 56 | 57 | cnv->len = len / 2 + 1; 58 | 59 | buffer_size = cnv->len * sizeof(int32_t); 60 | 61 | cnv->fir_kernel = (int32_t *) _aligned_malloc(buffer_size, DEFAULT_ALIGNMENT); 62 | cnv->fir_queue = (int32_t *) _aligned_malloc(buffer_size * SIZE_FACTOR, DEFAULT_ALIGNMENT); 63 | cnv->delay_line = (int16_t *) _aligned_malloc(buffer_size / 4, DEFAULT_ALIGNMENT); 64 | 65 | iqconverter_int16_reset(cnv); 66 | 67 | for (i = 0; i < cnv->len; i++) 68 | { 69 | cnv->fir_kernel[i] = hb_kernel[i * 2]; 70 | } 71 | 72 | return cnv; 73 | } 74 | 75 | void iqconverter_int16_free(iqconverter_int16_t *cnv) 76 | { 77 | _aligned_free(cnv->fir_kernel); 78 | _aligned_free(cnv->fir_queue); 79 | _aligned_free(cnv->delay_line); 80 | _aligned_free(cnv); 81 | } 82 | 83 | void iqconverter_int16_reset(iqconverter_int16_t *cnv) 84 | { 85 | cnv->fir_index = 0; 86 | cnv->delay_index = 0; 87 | cnv->old_x = 0; 88 | cnv->old_y = 0; 89 | cnv->old_e = 0; 90 | memset(cnv->delay_line, 0, cnv->len * sizeof(int16_t) / 4); 91 | memset(cnv->fir_queue, 0, cnv->len * sizeof(int16_t) * SIZE_FACTOR); 92 | } 93 | 94 | static void fir_interleaved(iqconverter_int16_t *cnv, int16_t *samples, int len) 95 | { 96 | int i; 97 | int j; 98 | int fir_index; 99 | int fir_len; 100 | int32_t *queue; 101 | int32_t acc; 102 | 103 | fir_len = cnv->len; 104 | fir_index = cnv->fir_index; 105 | 106 | for (i = 0; i < len; i += 2) 107 | { 108 | queue = cnv->fir_queue + fir_index; 109 | 110 | queue[0] = samples[i]; 111 | 112 | acc = 0; 113 | 114 | // Auto vectorization works on VS2012, VS2013 and GCC 115 | for (j = 0; j < fir_len; j++) 116 | { 117 | acc += cnv->fir_kernel[j] * queue[j]; 118 | } 119 | 120 | if (--fir_index < 0) 121 | { 122 | fir_index = cnv->len * (SIZE_FACTOR - 1); 123 | memcpy(cnv->fir_queue + fir_index + 1, cnv->fir_queue, (cnv->len - 1) * sizeof(int32_t)); 124 | } 125 | 126 | samples[i] = acc >> 15; 127 | } 128 | 129 | cnv->fir_index = fir_index; 130 | } 131 | 132 | static void delay_interleaved(iqconverter_int16_t *cnv, int16_t *samples, int len) 133 | { 134 | int i; 135 | int index; 136 | int half_len; 137 | int16_t res; 138 | 139 | half_len = cnv->len >> 1; 140 | index = cnv->delay_index; 141 | 142 | for (i = 0; i < len; i += 2) 143 | { 144 | res = cnv->delay_line[index]; 145 | cnv->delay_line[index] = samples[i]; 146 | samples[i] = res; 147 | 148 | if (++index >= half_len) 149 | { 150 | index = 0; 151 | } 152 | } 153 | 154 | cnv->delay_index = index; 155 | } 156 | 157 | static void remove_dc(iqconverter_int16_t *cnv, int16_t *samples, int len) 158 | { 159 | int i; 160 | int32_t u, old_e; 161 | int16_t x, y, w, s, old_x, old_y; 162 | 163 | old_x = cnv->old_x; 164 | old_y = cnv->old_y; 165 | old_e = cnv->old_e; 166 | 167 | for (i = 0; i < len; i++) 168 | { 169 | x = samples[i]; 170 | w = x - old_x; 171 | u = old_e + (int32_t) old_y * 32100; 172 | s = u >> 15; 173 | y = w + s; 174 | old_e = u - (s << 15); 175 | old_x = x; 176 | old_y = y; 177 | samples[i] = y; 178 | } 179 | 180 | cnv->old_x = old_x; 181 | cnv->old_y = old_y; 182 | cnv->old_e = old_e; 183 | } 184 | 185 | static void translate_fs_4(iqconverter_int16_t *cnv, int16_t *samples, int len) 186 | { 187 | int i; 188 | 189 | for (i = 0; i < len; i += 4) 190 | { 191 | samples[i + 0] = -samples[i + 0]; 192 | samples[i + 1] = -samples[i + 1] >> 1; 193 | //samples[i + 2] = samples[i + 2]; 194 | samples[i + 3] = samples[i + 3] >> 1; 195 | } 196 | 197 | fir_interleaved(cnv, samples, len); 198 | delay_interleaved(cnv, samples + 1, len); 199 | } 200 | 201 | void iqconverter_int16_process(iqconverter_int16_t *cnv, int16_t *samples, int len) 202 | { 203 | remove_dc(cnv, samples, len); 204 | translate_fs_4(cnv, samples, len); 205 | } 206 | -------------------------------------------------------------------------------- /libairspy/src/iqconverter_int16.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014, Youssef Touil 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | #ifndef IQCONVERTER_INT16_H 24 | #define IQCONVERTER_INT16_H 25 | 26 | #include 27 | 28 | typedef struct { 29 | int len; 30 | int fir_index; 31 | int delay_index; 32 | int16_t old_x; 33 | int16_t old_y; 34 | int32_t old_e; 35 | int32_t *fir_kernel; 36 | int32_t *fir_queue; 37 | int16_t *delay_line; 38 | } iqconverter_int16_t; 39 | 40 | iqconverter_int16_t *iqconverter_int16_create(const int16_t *hb_kernel, int len); 41 | void iqconverter_int16_free(iqconverter_int16_t *cnv); 42 | void iqconverter_int16_reset(iqconverter_int16_t *cnv); 43 | void iqconverter_int16_process(iqconverter_int16_t *cnv, int16_t *samples, int len); 44 | 45 | #endif // IQCONVERTER_INT16_H 46 | -------------------------------------------------------------------------------- /libairspy/src/win32/airspy.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../airspy.h" 3 | 4 | #ifdef GCC_WINDRES 5 | VS_VERSION_INFO VERSIONINFO 6 | #else 7 | VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 8 | #endif 9 | FILEVERSION AIRSPY_VER_MAJOR,AIRSPY_VER_MINOR,AIRSPY_VER_REVISION,0 10 | PRODUCTVERSION AIRSPY_VER_MAJOR,AIRSPY_VER_MINOR,AIRSPY_VER_REVISION,0 11 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 12 | #ifdef _DEBUG 13 | FILEFLAGS 1 14 | #else 15 | FILEFLAGS 0 16 | #endif 17 | FILEOS VOS__WINDOWS32 18 | FILETYPE VFT_DLL 19 | FILESUBTYPE 0 // not used 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904E4" 24 | //language ID = U.S. English, char set = Windows, Multilingual 25 | BEGIN 26 | VALUE "FileDescription", "Airspy library\0" 27 | VALUE "FileVersion", AIRSPY_VERSION "\0" 28 | VALUE "InternalName", "airspy.dll\0" 29 | VALUE "LegalCopyright", "(C) 2013-2021 Airspy\0" 30 | VALUE "OriginalFilename", "airspy.dll\0" 31 | VALUE "ProductName", "Airspy SDR\0" 32 | VALUE "ProductVersion", AIRSPY_VERSION "\0" 33 | VALUE "Comments", "For more information visit https://www.airspy.com\0" 34 | END 35 | END 36 | BLOCK "VarFileInfo" 37 | BEGIN 38 | VALUE "Translation", 0x0409, 1252 39 | END 40 | END 41 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_2019.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 2013 3 | VisualStudioVersion = 12.0.30501.0 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy", "airspy_2013.vcxproj", "{7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}" 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getopt", "getopt_2013.vcxproj", "{BCA73C04-5A94-420B-877E-FE9692740FA4}" 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_gpio", "airspy_gpio_2013.vcxproj", "{F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}" 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_gpiodir", "airspy_gpiodir_2013.vcxproj", "{7FA0181B-9A58-44FB-93C4-E7447C532C14}" 12 | EndProject 13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_info", "airspy_info_2013.vcxproj", "{C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}" 14 | EndProject 15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_lib_version", "airspy_lib_version_2013.vcxproj", "{FB70E4C7-4299-4B0B-81C5-5F081274F985}" 16 | EndProject 17 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_r820t", "airspy_r820t_2013.vcxproj", "{8E3ABDB6-7566-48C4-962F-B20AE2BB614A}" 18 | EndProject 19 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_rx", "airspy_rx_2013.vcxproj", "{3AFB2325-FEE6-4949-A706-29F4FB10A7E5}" 20 | EndProject 21 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_si5351c", "airspy_si5351c_2013.vcxproj", "{FE48E20A-DE77-4876-8668-B4F1BA09E7E2}" 22 | EndProject 23 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_spiflash", "airspy_spiflash_2013.vcxproj", "{47846DAA-BB23-4E49-9E90-31CCC9AB01A8}" 24 | EndProject 25 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "airspy_calibrate", "airspy_calibrate_2013.vcxproj", "{EF14D067-ED6A-43C9-A36B-76CA92741A6B}" 26 | EndProject 27 | Global 28 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 29 | Debug|Win32 = Debug|Win32 30 | Debug|x64 = Debug|x64 31 | Release|Win32 = Release|Win32 32 | Release|x64 = Release|x64 33 | EndGlobalSection 34 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 35 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Debug|Win32.ActiveCfg = Debug|Win32 36 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Debug|Win32.Build.0 = Debug|Win32 37 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Debug|x64.ActiveCfg = Debug|x64 38 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Debug|x64.Build.0 = Debug|x64 39 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Release|Win32.ActiveCfg = Release|Win32 40 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Release|Win32.Build.0 = Release|Win32 41 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Release|x64.ActiveCfg = Release|x64 42 | {7A6C1D5C-37FC-436E-8E7B-1EB3B2B3716D}.Release|x64.Build.0 = Release|x64 43 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Debug|Win32.ActiveCfg = Debug|Win32 44 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Debug|Win32.Build.0 = Debug|Win32 45 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Debug|x64.ActiveCfg = Debug|x64 46 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Debug|x64.Build.0 = Debug|x64 47 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Release|Win32.ActiveCfg = Release|Win32 48 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Release|Win32.Build.0 = Release|Win32 49 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Release|x64.ActiveCfg = Release|x64 50 | {BCA73C04-5A94-420B-877E-FE9692740FA4}.Release|x64.Build.0 = Release|x64 51 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Debug|Win32.ActiveCfg = Debug|Win32 52 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Debug|Win32.Build.0 = Debug|Win32 53 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Debug|x64.ActiveCfg = Debug|x64 54 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Debug|x64.Build.0 = Debug|x64 55 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Release|Win32.ActiveCfg = Release|Win32 56 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Release|Win32.Build.0 = Release|Win32 57 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Release|x64.ActiveCfg = Release|x64 58 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}.Release|x64.Build.0 = Release|x64 59 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Debug|Win32.ActiveCfg = Debug|Win32 60 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Debug|Win32.Build.0 = Debug|Win32 61 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Debug|x64.ActiveCfg = Debug|x64 62 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Debug|x64.Build.0 = Debug|x64 63 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Release|Win32.ActiveCfg = Release|Win32 64 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Release|Win32.Build.0 = Release|Win32 65 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Release|x64.ActiveCfg = Release|x64 66 | {7FA0181B-9A58-44FB-93C4-E7447C532C14}.Release|x64.Build.0 = Release|x64 67 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Debug|Win32.ActiveCfg = Debug|Win32 68 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Debug|Win32.Build.0 = Debug|Win32 69 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Debug|x64.ActiveCfg = Debug|x64 70 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Debug|x64.Build.0 = Debug|x64 71 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Release|Win32.ActiveCfg = Release|Win32 72 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Release|Win32.Build.0 = Release|Win32 73 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Release|x64.ActiveCfg = Release|x64 74 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1}.Release|x64.Build.0 = Release|x64 75 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Debug|Win32.ActiveCfg = Debug|Win32 76 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Debug|Win32.Build.0 = Debug|Win32 77 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Debug|x64.ActiveCfg = Debug|x64 78 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Debug|x64.Build.0 = Debug|x64 79 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Release|Win32.ActiveCfg = Release|Win32 80 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Release|Win32.Build.0 = Release|Win32 81 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Release|x64.ActiveCfg = Release|x64 82 | {FB70E4C7-4299-4B0B-81C5-5F081274F985}.Release|x64.Build.0 = Release|x64 83 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Debug|Win32.ActiveCfg = Debug|Win32 84 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Debug|Win32.Build.0 = Debug|Win32 85 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Debug|x64.ActiveCfg = Debug|x64 86 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Debug|x64.Build.0 = Debug|x64 87 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Release|Win32.ActiveCfg = Release|Win32 88 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Release|Win32.Build.0 = Release|Win32 89 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Release|x64.ActiveCfg = Release|x64 90 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A}.Release|x64.Build.0 = Release|x64 91 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Debug|Win32.ActiveCfg = Debug|Win32 92 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Debug|Win32.Build.0 = Debug|Win32 93 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Debug|x64.ActiveCfg = Debug|x64 94 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Debug|x64.Build.0 = Debug|x64 95 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Release|Win32.ActiveCfg = Release|Win32 96 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Release|Win32.Build.0 = Release|Win32 97 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Release|x64.ActiveCfg = Release|x64 98 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5}.Release|x64.Build.0 = Release|x64 99 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Debug|Win32.ActiveCfg = Debug|Win32 100 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Debug|Win32.Build.0 = Debug|Win32 101 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Debug|x64.ActiveCfg = Debug|x64 102 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Debug|x64.Build.0 = Debug|x64 103 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Release|Win32.ActiveCfg = Release|Win32 104 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Release|Win32.Build.0 = Release|Win32 105 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Release|x64.ActiveCfg = Release|x64 106 | {FE48E20A-DE77-4876-8668-B4F1BA09E7E2}.Release|x64.Build.0 = Release|x64 107 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Debug|Win32.ActiveCfg = Debug|Win32 108 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Debug|Win32.Build.0 = Debug|Win32 109 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Debug|x64.ActiveCfg = Debug|x64 110 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Debug|x64.Build.0 = Debug|x64 111 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Release|Win32.ActiveCfg = Release|Win32 112 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Release|Win32.Build.0 = Release|Win32 113 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Release|x64.ActiveCfg = Release|x64 114 | {47846DAA-BB23-4E49-9E90-31CCC9AB01A8}.Release|x64.Build.0 = Release|x64 115 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Debug|Win32.ActiveCfg = Debug|Win32 116 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Debug|Win32.Build.0 = Debug|Win32 117 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Debug|x64.ActiveCfg = Debug|x64 118 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Debug|x64.Build.0 = Debug|x64 119 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Release|Win32.ActiveCfg = Release|Win32 120 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Release|Win32.Build.0 = Release|Win32 121 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Release|x64.ActiveCfg = Release|x64 122 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B}.Release|x64.Build.0 = Release|x64 123 | EndGlobalSection 124 | GlobalSection(SolutionProperties) = preSolution 125 | HideSolutionNode = FALSE 126 | EndGlobalSection 127 | EndGlobal 128 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_calibrate_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | airspy_calibrate 23 | {EF14D067-ED6A-43C9-A36B-76CA92741A6B} 24 | 25 | 26 | Win32Proj 27 | 10.0 28 | 29 | 30 | 31 | Application 32 | Unicode 33 | true 34 | v142 35 | 36 | 37 | Application 38 | Unicode 39 | v142 40 | 41 | 42 | Application 43 | Unicode 44 | true 45 | v142 46 | 47 | 48 | Application 49 | Unicode 50 | v142 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | <_ProjectFileVersion>10.0.30319.1 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 77 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | 81 | $(IntDir)$(ProjectName).htm 82 | 83 | 84 | Disabled 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 87 | MultiThreadedDebug 88 | Level3 89 | ProgramDatabase 90 | stdc11 91 | 92 | 93 | %(AdditionalLibraryDirectories) 94 | true 95 | $(TargetDir)$(ProjectName).pdb 96 | Console 97 | MachineX86 98 | 99 | 100 | 101 | 102 | $(IntDir)$(ProjectName).htm 103 | 104 | 105 | X64 106 | 107 | 108 | Disabled 109 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 110 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDebug 112 | Level3 113 | ProgramDatabase 114 | stdc11 115 | 116 | 117 | %(AdditionalLibraryDirectories) 118 | true 119 | $(TargetDir)$(ProjectName).pdb 120 | Console 121 | MachineX64 122 | 123 | 124 | 125 | 126 | $(IntDir)$(ProjectName).htm 127 | 128 | 129 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 130 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreaded 132 | Level3 133 | stdc11 134 | 135 | 136 | %(AdditionalLibraryDirectories) 137 | $(TargetDir)$(ProjectName).pdb 138 | Console 139 | MachineX86 140 | 141 | 142 | 143 | 144 | $(IntDir)$(ProjectName).htm 145 | 146 | 147 | X64 148 | 149 | 150 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 151 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 152 | MultiThreaded 153 | Level3 154 | stdc11 155 | 156 | 157 | %(AdditionalLibraryDirectories) 158 | $(TargetDir)$(ProjectName).pdb 159 | Console 160 | MachineX64 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 169 | 170 | 171 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_gpio_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | airspy_gpio 23 | {F4938DB0-3DE7-4737-9C5A-EAD1BE819F87} 24 | 25 | 26 | Win32Proj 27 | 10.0 28 | 29 | 30 | 31 | Application 32 | Unicode 33 | true 34 | v142 35 | 36 | 37 | Application 38 | Unicode 39 | v142 40 | 41 | 42 | Application 43 | Unicode 44 | true 45 | v142 46 | 47 | 48 | Application 49 | Unicode 50 | v142 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | <_ProjectFileVersion>10.0.30319.1 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 77 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | 81 | $(IntDir)$(ProjectName).htm 82 | 83 | 84 | Disabled 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 87 | MultiThreadedDebug 88 | Level3 89 | ProgramDatabase 90 | stdc11 91 | 92 | 93 | %(AdditionalLibraryDirectories) 94 | true 95 | $(TargetDir)$(ProjectName).pdb 96 | Console 97 | MachineX86 98 | 99 | 100 | 101 | 102 | $(IntDir)$(ProjectName).htm 103 | 104 | 105 | X64 106 | 107 | 108 | Disabled 109 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 110 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDebug 112 | Level3 113 | ProgramDatabase 114 | stdc11 115 | 116 | 117 | %(AdditionalLibraryDirectories) 118 | true 119 | $(TargetDir)$(ProjectName).pdb 120 | Console 121 | MachineX64 122 | 123 | 124 | 125 | 126 | $(IntDir)$(ProjectName).htm 127 | 128 | 129 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 130 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreaded 132 | Level3 133 | stdc11 134 | 135 | 136 | %(AdditionalLibraryDirectories) 137 | $(TargetDir)$(ProjectName).pdb 138 | Console 139 | MachineX86 140 | 141 | 142 | 143 | 144 | $(IntDir)$(ProjectName).htm 145 | 146 | 147 | X64 148 | 149 | 150 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 151 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 152 | MultiThreaded 153 | Level3 154 | stdc11 155 | 156 | 157 | %(AdditionalLibraryDirectories) 158 | $(TargetDir)$(ProjectName).pdb 159 | Console 160 | MachineX64 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 169 | 170 | 171 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_gpiodir_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | airspy_gpiodir 23 | {7FA0181B-9A58-44FB-93C4-E7447C532C14} 24 | 25 | 26 | Win32Proj 27 | 10.0 28 | 29 | 30 | 31 | Application 32 | Unicode 33 | true 34 | v142 35 | 36 | 37 | Application 38 | Unicode 39 | v142 40 | 41 | 42 | Application 43 | Unicode 44 | true 45 | v142 46 | 47 | 48 | Application 49 | Unicode 50 | v142 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | <_ProjectFileVersion>10.0.30319.1 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 77 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | 81 | $(IntDir)$(ProjectName).htm 82 | 83 | 84 | Disabled 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 87 | MultiThreadedDebug 88 | Level3 89 | ProgramDatabase 90 | stdc11 91 | 92 | 93 | %(AdditionalLibraryDirectories) 94 | true 95 | $(TargetDir)$(ProjectName).pdb 96 | Console 97 | MachineX86 98 | 99 | 100 | 101 | 102 | $(IntDir)$(ProjectName).htm 103 | 104 | 105 | X64 106 | 107 | 108 | Disabled 109 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 110 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDebug 112 | Level3 113 | ProgramDatabase 114 | stdc11 115 | 116 | 117 | %(AdditionalLibraryDirectories) 118 | true 119 | $(TargetDir)$(ProjectName).pdb 120 | Console 121 | MachineX64 122 | 123 | 124 | 125 | 126 | $(IntDir)$(ProjectName).htm 127 | 128 | 129 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 130 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreaded 132 | Level3 133 | stdc11 134 | 135 | 136 | %(AdditionalLibraryDirectories) 137 | $(TargetDir)$(ProjectName).pdb 138 | Console 139 | MachineX86 140 | 141 | 142 | 143 | 144 | $(IntDir)$(ProjectName).htm 145 | 146 | 147 | X64 148 | 149 | 150 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 151 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 152 | MultiThreaded 153 | Level3 154 | stdc11 155 | 156 | 157 | %(AdditionalLibraryDirectories) 158 | $(TargetDir)$(ProjectName).pdb 159 | Console 160 | MachineX64 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 169 | 170 | 171 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_info_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | airspy_info 23 | {C5B0AEB4-E59B-49E8-964B-69A584DB7CF1} 24 | 25 | 26 | Win32Proj 27 | 10.0 28 | 29 | 30 | 31 | Application 32 | Unicode 33 | true 34 | v142 35 | 36 | 37 | Application 38 | Unicode 39 | v142 40 | 41 | 42 | Application 43 | Unicode 44 | true 45 | v142 46 | 47 | 48 | Application 49 | Unicode 50 | v142 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | <_ProjectFileVersion>10.0.30319.1 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 77 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | 81 | $(IntDir)$(ProjectName).htm 82 | 83 | 84 | Disabled 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 87 | MultiThreadedDebug 88 | Level3 89 | ProgramDatabase 90 | stdc11 91 | 92 | 93 | %(AdditionalLibraryDirectories) 94 | true 95 | $(TargetDir)$(ProjectName).pdb 96 | Console 97 | MachineX86 98 | 99 | 100 | 101 | 102 | $(IntDir)$(ProjectName).htm 103 | 104 | 105 | X64 106 | 107 | 108 | Disabled 109 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 110 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDebug 112 | Level3 113 | ProgramDatabase 114 | stdc11 115 | 116 | 117 | %(AdditionalLibraryDirectories) 118 | true 119 | $(TargetDir)$(ProjectName).pdb 120 | Console 121 | MachineX64 122 | 123 | 124 | 125 | 126 | $(IntDir)$(ProjectName).htm 127 | 128 | 129 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 130 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreaded 132 | Level3 133 | stdc11 134 | 135 | 136 | %(AdditionalLibraryDirectories) 137 | $(TargetDir)$(ProjectName).pdb 138 | Console 139 | MachineX86 140 | 141 | 142 | 143 | 144 | $(IntDir)$(ProjectName).htm 145 | 146 | 147 | X64 148 | 149 | 150 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 151 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 152 | MultiThreaded 153 | Level3 154 | stdc11 155 | 156 | 157 | %(AdditionalLibraryDirectories) 158 | $(TargetDir)$(ProjectName).pdb 159 | Console 160 | MachineX64 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 169 | 170 | 171 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_r820t_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | airspy_r820t 23 | {8E3ABDB6-7566-48C4-962F-B20AE2BB614A} 24 | 25 | 26 | Win32Proj 27 | 10.0 28 | 29 | 30 | 31 | Application 32 | Unicode 33 | true 34 | v142 35 | 36 | 37 | Application 38 | Unicode 39 | v142 40 | 41 | 42 | Application 43 | Unicode 44 | true 45 | v142 46 | 47 | 48 | Application 49 | Unicode 50 | v142 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | <_ProjectFileVersion>10.0.30319.1 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 77 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | 81 | $(IntDir)$(ProjectName).htm 82 | 83 | 84 | Disabled 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 87 | MultiThreadedDebug 88 | Level3 89 | ProgramDatabase 90 | stdc11 91 | 92 | 93 | %(AdditionalLibraryDirectories) 94 | true 95 | $(TargetDir)$(ProjectName).pdb 96 | Console 97 | MachineX86 98 | 99 | 100 | 101 | 102 | $(IntDir)$(ProjectName).htm 103 | 104 | 105 | X64 106 | 107 | 108 | Disabled 109 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 110 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDebug 112 | Level3 113 | ProgramDatabase 114 | stdc11 115 | 116 | 117 | %(AdditionalLibraryDirectories) 118 | true 119 | $(TargetDir)$(ProjectName).pdb 120 | Console 121 | MachineX64 122 | 123 | 124 | 125 | 126 | $(IntDir)$(ProjectName).htm 127 | 128 | 129 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 130 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreaded 132 | Level3 133 | stdc11 134 | 135 | 136 | %(AdditionalLibraryDirectories) 137 | $(TargetDir)$(ProjectName).pdb 138 | Console 139 | MachineX86 140 | 141 | 142 | 143 | 144 | $(IntDir)$(ProjectName).htm 145 | 146 | 147 | X64 148 | 149 | 150 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 151 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 152 | MultiThreaded 153 | Level3 154 | stdc11 155 | 156 | 157 | %(AdditionalLibraryDirectories) 158 | $(TargetDir)$(ProjectName).pdb 159 | Console 160 | MachineX64 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 169 | 170 | 171 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /libairspy/vc/airspy_rx_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | airspy_rx 23 | {3AFB2325-FEE6-4949-A706-29F4FB10A7E5} 24 | 25 | 26 | Win32Proj 27 | 10.0 28 | 29 | 30 | 31 | Application 32 | Unicode 33 | true 34 | v142 35 | 36 | 37 | Application 38 | Unicode 39 | v142 40 | 41 | 42 | Application 43 | Unicode 44 | true 45 | v142 46 | 47 | 48 | Application 49 | Unicode 50 | v142 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | <_ProjectFileVersion>10.0.30319.1 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\ 77 | $(SolutionDir)..\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | 81 | $(IntDir)$(ProjectName).htm 82 | 83 | 84 | Disabled 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 87 | MultiThreadedDebug 88 | Level3 89 | ProgramDatabase 90 | stdc11 91 | 92 | 93 | %(AdditionalLibraryDirectories) 94 | true 95 | $(TargetDir)$(ProjectName).pdb 96 | Console 97 | MachineX86 98 | 99 | 100 | 101 | 102 | $(IntDir)$(ProjectName).htm 103 | 104 | 105 | X64 106 | 107 | 108 | Disabled 109 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 110 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 111 | MultiThreadedDebug 112 | Level3 113 | ProgramDatabase 114 | stdc11 115 | 116 | 117 | %(AdditionalLibraryDirectories) 118 | true 119 | $(TargetDir)$(ProjectName).pdb 120 | Console 121 | MachineX64 122 | 123 | 124 | 125 | 126 | $(IntDir)$(ProjectName).htm 127 | 128 | 129 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 130 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | MultiThreaded 132 | Level3 133 | stdc11 134 | 135 | 136 | %(AdditionalLibraryDirectories) 137 | $(TargetDir)$(ProjectName).pdb 138 | Console 139 | MachineX86 140 | 141 | 142 | 143 | 144 | $(IntDir)$(ProjectName).htm 145 | 146 | 147 | X64 148 | 149 | 150 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 151 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 152 | MultiThreaded 153 | Level3 154 | stdc11 155 | 156 | 157 | %(AdditionalLibraryDirectories) 158 | $(TargetDir)$(ProjectName).pdb 159 | Console 160 | MachineX64 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 169 | 170 | 171 | {7a6c1d5c-37fc-436e-8e7b-1eb3b2b3716d} 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /libairspy/vc/getopt/getopt.h: -------------------------------------------------------------------------------- 1 | /* Declarations for getopt. 2 | Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. 3 | This file is part of the GNU C Library. 4 | 5 | The GNU C Library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | The GNU C Library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with the GNU C Library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 | 02111-1307 USA. */ 19 | 20 | #ifndef _GETOPT_H 21 | 22 | #ifndef __need_getopt 23 | # define _GETOPT_H 1 24 | #endif 25 | 26 | /* If __GNU_LIBRARY__ is not already defined, either we are being used 27 | standalone, or this is the first header included in the source file. 28 | If we are being used with glibc, we need to include , but 29 | that does not exist if we are standalone. So: if __GNU_LIBRARY__ is 30 | not defined, include , which will pull in for us 31 | if it's from glibc. (Why ctype.h? It's guaranteed to exist and it 32 | doesn't flood the namespace with stuff the way some other headers do.) */ 33 | #if !defined __GNU_LIBRARY__ 34 | # include 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /* For communication from `getopt' to the caller. 42 | When `getopt' finds an option that takes an argument, 43 | the argument value is returned here. 44 | Also, when `ordering' is RETURN_IN_ORDER, 45 | each non-option ARGV-element is returned here. */ 46 | 47 | extern char *optarg; 48 | 49 | /* Index in ARGV of the next element to be scanned. 50 | This is used for communication to and from the caller 51 | and for communication between successive calls to `getopt'. 52 | 53 | On entry to `getopt', zero means this is the first call; initialize. 54 | 55 | When `getopt' returns -1, this is the index of the first of the 56 | non-option elements that the caller should itself scan. 57 | 58 | Otherwise, `optind' communicates from one call to the next 59 | how much of ARGV has been scanned so far. */ 60 | 61 | extern int optind; 62 | 63 | /* Callers store zero here to inhibit the error message `getopt' prints 64 | for unrecognized options. */ 65 | 66 | extern int opterr; 67 | 68 | /* Set to an option character which was unrecognized. */ 69 | 70 | extern int optopt; 71 | 72 | #ifndef __need_getopt 73 | /* Describe the long-named options requested by the application. 74 | The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector 75 | of `struct option' terminated by an element containing a name which is 76 | zero. 77 | 78 | The field `has_arg' is: 79 | no_argument (or 0) if the option does not take an argument, 80 | required_argument (or 1) if the option requires an argument, 81 | optional_argument (or 2) if the option takes an optional argument. 82 | 83 | If the field `flag' is not NULL, it points to a variable that is set 84 | to the value given in the field `val' when the option is found, but 85 | left unchanged if the option is not found. 86 | 87 | To have a long-named option do something other than set an `int' to 88 | a compiled-in constant, such as set a value from `optarg', set the 89 | option's `flag' field to zero and its `val' field to a nonzero 90 | value (the equivalent single-letter option character, if there is 91 | one). For long options that have a zero `flag' field, `getopt' 92 | returns the contents of the `val' field. */ 93 | 94 | struct option 95 | { 96 | # if (defined __STDC__ && __STDC__) || defined __cplusplus 97 | const char *name; 98 | # else 99 | char *name; 100 | # endif 101 | /* has_arg can't be an enum because some compilers complain about 102 | type mismatches in all the code that assumes it is an int. */ 103 | int has_arg; 104 | int *flag; 105 | int val; 106 | }; 107 | 108 | /* Names for the values of the `has_arg' field of `struct option'. */ 109 | 110 | # define no_argument 0 111 | # define required_argument 1 112 | # define optional_argument 2 113 | #endif /* need getopt */ 114 | 115 | 116 | /* Get definitions and prototypes for functions to process the 117 | arguments in ARGV (ARGC of them, minus the program name) for 118 | options given in OPTS. 119 | 120 | Return the option character from OPTS just read. Return -1 when 121 | there are no more options. For unrecognized options, or options 122 | missing arguments, `optopt' is set to the option letter, and '?' is 123 | returned. 124 | 125 | The OPTS string is a list of characters which are recognized option 126 | letters, optionally followed by colons, specifying that that letter 127 | takes an argument, to be placed in `optarg'. 128 | 129 | If a letter in OPTS is followed by two colons, its argument is 130 | optional. This behavior is specific to the GNU `getopt'. 131 | 132 | The argument `--' causes premature termination of argument 133 | scanning, explicitly telling `getopt' that there are no more 134 | options. 135 | 136 | If OPTS begins with `--', then non-option arguments are treated as 137 | arguments to the option '\0'. This behavior is specific to the GNU 138 | `getopt'. */ 139 | 140 | #if (defined __STDC__ && __STDC__) || defined __cplusplus 141 | # ifdef __GNU_LIBRARY__ 142 | /* Many other libraries have conflicting prototypes for getopt, with 143 | differences in the consts, in stdlib.h. To avoid compilation 144 | errors, only prototype getopt for the GNU C library. */ 145 | extern int getopt (int __argc, char *const *__argv, const char *__shortopts); 146 | # else /* not __GNU_LIBRARY__ */ 147 | extern int getopt (); 148 | # endif /* __GNU_LIBRARY__ */ 149 | 150 | # ifndef __need_getopt 151 | extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, 152 | const struct option *__longopts, int *__longind); 153 | extern int getopt_long_only (int __argc, char *const *__argv, 154 | const char *__shortopts, 155 | const struct option *__longopts, int *__longind); 156 | 157 | /* Internal only. Users should not call this directly. */ 158 | extern int _getopt_internal (int __argc, char *const *__argv, 159 | const char *__shortopts, 160 | const struct option *__longopts, int *__longind, 161 | int __long_only); 162 | # endif 163 | #else /* not __STDC__ */ 164 | extern int getopt (); 165 | # ifndef __need_getopt 166 | extern int getopt_long (); 167 | extern int getopt_long_only (); 168 | 169 | extern int _getopt_internal (); 170 | # endif 171 | #endif /* __STDC__ */ 172 | 173 | #ifdef __cplusplus 174 | } 175 | #endif 176 | 177 | /* Make sure we later can get all the definitions and declarations. */ 178 | #undef __need_getopt 179 | 180 | #endif /* getopt.h */ 181 | -------------------------------------------------------------------------------- /libairspy/vc/getopt/getopt1.c: -------------------------------------------------------------------------------- 1 | /* getopt_long and getopt_long_only entry points for GNU getopt. 2 | Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 3 | Free Software Foundation, Inc. 4 | This file is part of the GNU C Library. 5 | 6 | The GNU C Library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | The GNU C Library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with the GNU C Library; if not, write to the Free 18 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 19 | 02111-1307 USA. */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include 23 | #endif 24 | 25 | #include "getopt.h" 26 | 27 | #if !defined __STDC__ || !__STDC__ 28 | /* This is a separate conditional since some stdc systems 29 | reject `defined (const)'. */ 30 | #ifndef const 31 | #define const 32 | #endif 33 | #endif 34 | 35 | #include 36 | 37 | /* Comment out all this code if we are using the GNU C Library, and are not 38 | actually compiling the library itself. This code is part of the GNU C 39 | Library, but also included in many other GNU distributions. Compiling 40 | and linking in this code is a waste when using the GNU C library 41 | (especially if it is a shared library). Rather than having every GNU 42 | program understand `configure --with-gnu-libc' and omit the object files, 43 | it is simpler to just do this in the source for each such file. */ 44 | 45 | #define GETOPT_INTERFACE_VERSION 2 46 | #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 47 | #include 48 | #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION 49 | #define ELIDE_CODE 50 | #endif 51 | #endif 52 | 53 | #ifndef ELIDE_CODE 54 | 55 | 56 | /* This needs to come after some library #include 57 | to get __GNU_LIBRARY__ defined. */ 58 | #ifdef __GNU_LIBRARY__ 59 | #include 60 | #endif 61 | 62 | #ifndef NULL 63 | #define NULL 0 64 | #endif 65 | 66 | int 67 | getopt_long (argc, argv, options, long_options, opt_index) 68 | int argc; 69 | char *const *argv; 70 | const char *options; 71 | const struct option *long_options; 72 | int *opt_index; 73 | { 74 | return _getopt_internal (argc, argv, options, long_options, opt_index, 0); 75 | } 76 | 77 | /* Like getopt_long, but '-' as well as '--' can indicate a long option. 78 | If an option that starts with '-' (not '--') doesn't match a long option, 79 | but does match a short option, it is parsed as a short option 80 | instead. */ 81 | 82 | int 83 | getopt_long_only (argc, argv, options, long_options, opt_index) 84 | int argc; 85 | char *const *argv; 86 | const char *options; 87 | const struct option *long_options; 88 | int *opt_index; 89 | { 90 | return _getopt_internal (argc, argv, options, long_options, opt_index, 1); 91 | } 92 | 93 | 94 | #endif /* Not ELIDE_CODE. */ 95 | 96 | #ifdef TEST 97 | 98 | #include 99 | 100 | int 101 | main (argc, argv) 102 | int argc; 103 | char **argv; 104 | { 105 | int c; 106 | int digit_optind = 0; 107 | 108 | while (1) 109 | { 110 | int this_option_optind = optind ? optind : 1; 111 | int option_index = 0; 112 | static struct option long_options[] = 113 | { 114 | {"add", 1, 0, 0}, 115 | {"append", 0, 0, 0}, 116 | {"delete", 1, 0, 0}, 117 | {"verbose", 0, 0, 0}, 118 | {"create", 0, 0, 0}, 119 | {"file", 1, 0, 0}, 120 | {0, 0, 0, 0} 121 | }; 122 | 123 | c = getopt_long (argc, argv, "abc:d:0123456789", 124 | long_options, &option_index); 125 | if (c == -1) 126 | break; 127 | 128 | switch (c) 129 | { 130 | case 0: 131 | printf ("option %s", long_options[option_index].name); 132 | if (optarg) 133 | printf (" with arg %s", optarg); 134 | printf ("\n"); 135 | break; 136 | 137 | case '0': 138 | case '1': 139 | case '2': 140 | case '3': 141 | case '4': 142 | case '5': 143 | case '6': 144 | case '7': 145 | case '8': 146 | case '9': 147 | if (digit_optind != 0 && digit_optind != this_option_optind) 148 | printf ("digits occur in two different argv-elements.\n"); 149 | digit_optind = this_option_optind; 150 | printf ("option %c\n", c); 151 | break; 152 | 153 | case 'a': 154 | printf ("option a\n"); 155 | break; 156 | 157 | case 'b': 158 | printf ("option b\n"); 159 | break; 160 | 161 | case 'c': 162 | printf ("option c with value `%s'\n", optarg); 163 | break; 164 | 165 | case 'd': 166 | printf ("option d with value `%s'\n", optarg); 167 | break; 168 | 169 | case '?': 170 | break; 171 | 172 | default: 173 | printf ("?? getopt returned character code 0%o ??\n", c); 174 | } 175 | } 176 | 177 | if (optind < argc) 178 | { 179 | printf ("non-option ARGV-elements: "); 180 | while (optind < argc) 181 | printf ("%s ", argv[optind++]); 182 | printf ("\n"); 183 | } 184 | 185 | exit (0); 186 | } 187 | 188 | #endif /* TEST */ 189 | -------------------------------------------------------------------------------- /libairspy/vc/getopt_2013.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {BCA73C04-5A94-420B-877E-FE9692740FA4} 23 | 24 | 25 | getopt 26 | 10.0 27 | 28 | 29 | 30 | StaticLibrary 31 | Unicode 32 | true 33 | v142 34 | 35 | 36 | StaticLibrary 37 | Unicode 38 | v142 39 | 40 | 41 | StaticLibrary 42 | Unicode 43 | true 44 | v142 45 | 46 | 47 | StaticLibrary 48 | Unicode 49 | v142 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | <_ProjectFileVersion>10.0.30319.1 69 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\ 70 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\getopt\ 71 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\ 72 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\getopt\ 73 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\ 74 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\getopt\ 75 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\ 76 | $(SolutionDir)..\$(Platform)\$(Configuration)\lib\getopt\ 77 | 78 | 79 | 80 | HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 81 | true 82 | MultiThreadedDebug 83 | Level3 84 | ProgramDatabase 85 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 86 | 87 | 88 | true 89 | 90 | 91 | 92 | 93 | X64 94 | 95 | 96 | HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 97 | MultiThreadedDebug 98 | Level3 99 | ProgramDatabase 100 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 101 | 102 | 103 | true 104 | 105 | 106 | 107 | 108 | MaxSpeed 109 | HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 110 | MultiThreaded 111 | Level3 112 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 113 | 114 | 115 | true 116 | 117 | 118 | 119 | 120 | X64 121 | 122 | 123 | HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 124 | MultiThreaded 125 | Level3 126 | ..\src;.\getopt;%(AdditionalIncludeDirectories) 127 | 128 | 129 | true 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /libairspy/vc/libs/Win32/libusb-1.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airspy/airspyone_host/bd15be38e91ebaa3e0bebb1e320255bde4ccf059/libairspy/vc/libs/Win32/libusb-1.0.dll -------------------------------------------------------------------------------- /libairspy/vc/libs/Win32/pthreadVCE2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airspy/airspyone_host/bd15be38e91ebaa3e0bebb1e320255bde4ccf059/libairspy/vc/libs/Win32/pthreadVCE2.dll -------------------------------------------------------------------------------- /libairspy/vc/libs/x64/libusb-1.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airspy/airspyone_host/bd15be38e91ebaa3e0bebb1e320255bde4ccf059/libairspy/vc/libs/x64/libusb-1.0.dll -------------------------------------------------------------------------------- /libairspy/vc/libs/x64/pthreadVC2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airspy/airspyone_host/bd15be38e91ebaa3e0bebb1e320255bde4ccf059/libairspy/vc/libs/x64/pthreadVC2.dll --------------------------------------------------------------------------------