mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Fix building for -DENABLE_PLUTOSDR=ON
This commit is contained in:
		| @@ -3338,7 +3338,7 @@ set_package_properties(LIBIIO PROPERTIES | ||||
|     PURPOSE "Used for communication with the AD9361 chipset." | ||||
|     TYPE OPTIONAL | ||||
| ) | ||||
| if(ENABLE_AD9361 OR ENABLE_FMCOMMS2) | ||||
| if(ENABLE_AD9361 OR ENABLE_FMCOMMS2 OR ENABLE_PLUTOSDR) | ||||
|     if(NOT LIBIIO_FOUND) | ||||
|         message(STATUS "libiio not found, its installation is required.") | ||||
|         message(STATUS "Please build and install the following projects:") | ||||
|   | ||||
| @@ -239,7 +239,7 @@ if(ENABLE_LIMESDR AND GRLIMESDR_FOUND) | ||||
|     ) | ||||
| endif() | ||||
|  | ||||
| if(ENABLE_AD9361 AND LIBIIO_FOUND) | ||||
| if(LIBIIO_FOUND) | ||||
|     target_link_libraries(signal_source_adapters | ||||
|         PRIVATE | ||||
|             Iio::iio | ||||
|   | ||||
| @@ -87,7 +87,7 @@ ad936x_iio_source_sptr ad936x_iio_make_source_sptr( | ||||
|  | ||||
| void ad936x_iio_source::ad9361_channel_demux_and_record(ad936x_iio_samples *samples_in, int nchannels, std::vector<std::fstream> *files_out) | ||||
| { | ||||
|     int32_t current_byte = 0; | ||||
|     uint32_t current_byte = 0; | ||||
|     int16_t ch = 0; | ||||
|     // std::cout << "nbytes: " << samples_in->n_bytes << " nsamples: " << samples_in->n_samples << " nch: " << nchannels << "\n"; | ||||
|     while (current_byte < samples_in->n_bytes) | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| /*! | ||||
|  * \file ad936x_iio_custom.cc | ||||
|  * \brief A direct IIO custom front-end driver for the AD936x AD front-end family with special FPGA custom functionalities. | ||||
|  * \brief A direct IIO custom front-end driver for the AD936x AD front-end | ||||
|  * family with special FPGA custom functionalities. | ||||
|  * \author Javier Arribas, jarribas(at)cttc.es | ||||
|  * ----------------------------------------------------------------------------- | ||||
|  * | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| /*! | ||||
|  * \file ad936x_iio_custom.h | ||||
|  * \brief A direct IIO custom front-end driver for the AD936x AD front-end family with special FPGA custom functionalities. | ||||
|  * \brief A direct IIO custom front-end driver for the AD936x AD front-end | ||||
|  * family with special FPGA custom functionalities. | ||||
|  * \author Javier Arribas, jarribas(at)cttc.es | ||||
|  * ----------------------------------------------------------------------------- | ||||
|  * | ||||
| @@ -14,27 +15,27 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #ifndef SRC_LIBS_ad936x_iio_custom_H_ | ||||
| #define SRC_LIBS_ad936x_iio_custom_H_ | ||||
| #ifndef GNSS_SDR_AD936X_IIO_CUSTOM_H | ||||
| #define GNSS_SDR_AD936X_IIO_CUSTOM_H | ||||
|  | ||||
| #include "ad936x_iio_samples.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_time.h" | ||||
| #include "pps_samplestamp.h" | ||||
| #include <boost/atomic.hpp> | ||||
| #include <iio.h> | ||||
| #include <ad9361.h>  // multichip sync and high level functions | ||||
| #include <memory> | ||||
| #include <string> | ||||
|  | ||||
| #ifdef __APPLE__ | ||||
| #include <iio/iio.h> | ||||
| #else | ||||
| #include <iio.h> | ||||
| #endif | ||||
|  | ||||
| #include "ad936x_iio_samples.h" | ||||
| #include <ad9361.h>  // multichip sync and high level functions | ||||
| #include <thread> | ||||
| #include <vector> | ||||
|  | ||||
| /** \addtogroup Signal_Source | ||||
|  * \{ */ | ||||
| /** \addtogroup Signal_Source_libs | ||||
|  * \{ */ | ||||
|  | ||||
|  | ||||
| class ad936x_iio_custom | ||||
| { | ||||
| public: | ||||
| @@ -121,10 +122,7 @@ private: | ||||
|     struct iio_device *dds_dev; | ||||
|  | ||||
|     // stream | ||||
|  | ||||
|     uint64_t sample_rate_sps; | ||||
|  | ||||
|  | ||||
|     int debug_level; | ||||
|     int log_level; | ||||
|     bool PPS_mode; | ||||
| @@ -144,4 +142,6 @@ private: | ||||
|     std::thread capture_time_thread; | ||||
| }; | ||||
|  | ||||
| #endif /* SRC_LIBS_ad936x_iio_custom_H_ */ | ||||
| /** \} */ | ||||
| /** \} */ | ||||
| #endif  // GNSS_SDR_AD936X_IIO_CUSTOM_H | ||||
|   | ||||
| @@ -15,17 +15,21 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #ifndef SRC_LIBS_ad936x_iio_samples_H_ | ||||
| #define SRC_LIBS_ad936x_iio_samples_H_ | ||||
| #ifndef GNSS_SDR_AD936X_IIO_SAMPLES_H | ||||
| #define GNSS_SDR_AD936X_IIO_SAMPLES_H | ||||
|  | ||||
| #define IIO_DEFAULTAD936XAPIFIFOSIZE_SAMPLES 32768 * 4 | ||||
|  | ||||
| #define IIO_INPUTRAMFIFOSIZE 256 | ||||
|  | ||||
| #include <memory> | ||||
| #include <stdint.h> | ||||
| #include <vector> | ||||
|  | ||||
| /** \addtogroup Signal_Source | ||||
|  * \{ */ | ||||
| /** \addtogroup Signal_Source_libs | ||||
|  * \{ */ | ||||
|  | ||||
| class ad936x_iio_samples | ||||
| { | ||||
| public: | ||||
| @@ -37,4 +41,6 @@ public: | ||||
|     char buffer[IIO_DEFAULTAD936XAPIFIFOSIZE_SAMPLES * 4 * 4];  // max 16 bits samples per buffer (4 channels, 2-bytes per I + 2-bytes per Q) | ||||
| }; | ||||
|  | ||||
| /** \} */ | ||||
| /** \} */ | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez