input-soapysdr.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * input-soapysdr.h
  3. * SoapySDR-specific declarations
  4. *
  5. * Copyright (c) 2015-2021 Tomasz Lemiech <szpajder@gmail.com>
  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 3 of the License, or
  10. * (at your option) 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. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include <SoapySDR/Device.h> // SoapySDRDevice
  21. #include <SoapySDR/Types.h> // SoapySDRKwargs
  22. #define SOAPYSDR_DEFAULT_SAMPLE_RATE 2560000
  23. #define SOAPYSDR_BUFSIZE 320000
  24. #define SOAPYSDR_READSTREAM_TIMEOUT_US 1000000L
  25. typedef struct {
  26. SoapySDRDevice* dev; // pointer to device struct
  27. char const* device_string; // SoapySDR device arg string
  28. char const* sample_format; // sample format
  29. char const* antenna; // antenna name
  30. SoapySDRKwargs gains; // gain elements and their values
  31. double correction; // PPM correction
  32. double gain; // gain in dB
  33. size_t channel; // HW channel number
  34. bool agc; // enable AGC
  35. } soapysdr_dev_data_t;