From 520cc820fbb36a555e1f3b62b2dfc3768cbf94c5 Mon Sep 17 00:00:00 2001 From: Ricardas Jonaitis Date: Thu, 21 Nov 2024 22:21:50 +0200 Subject: [PATCH 1/3] Split LMS_API Wrapper into separate library to avoid symbol collision if linking both LimeSuiteNG and LimeSuite to same application --- GUI/boards/CMakeLists.txt | 2 +- src/API/LMS_APIWrapper.cpp | 7 ++++--- src/CMakeLists.txt | 10 +++++++++- src/examples/CMakeLists.txt | 26 ++------------------------ src/examples/legacy/CMakeLists.txt | 23 +++++++++++++++++++++++ src/examples/legacy/basicRX.cpp | 19 ++----------------- src/examples/legacy/dualRXTX.cpp | 23 +++-------------------- src/examples/legacy/singleRX.cpp | 29 ++++++++--------------------- tests/CMakeLists.txt | 2 +- 9 files changed, 53 insertions(+), 88 deletions(-) create mode 100644 src/examples/legacy/CMakeLists.txt diff --git a/GUI/boards/CMakeLists.txt b/GUI/boards/CMakeLists.txt index a7a091be..c21ae542 100644 --- a/GUI/boards/CMakeLists.txt +++ b/GUI/boards/CMakeLists.txt @@ -1,2 +1,2 @@ target_sources( - limeGUI PRIVATE pnlBoardControls.cpp pnlBuffers.cpp pnlGPIO.cpp pnlX3.cpp pnlX8.cpp pnlXTRX.cpp pnluLimeSDR.cpp pnlLimeSDR.cpp) + limeGUI PRIVATE pnlBoardControls.cpp pnlGPIO.cpp pnlX3.cpp pnlX8.cpp pnlXTRX.cpp pnluLimeSDR.cpp pnlLimeSDR.cpp) diff --git a/src/API/LMS_APIWrapper.cpp b/src/API/LMS_APIWrapper.cpp index af7c1bc2..b9d0136a 100644 --- a/src/API/LMS_APIWrapper.cpp +++ b/src/API/LMS_APIWrapper.cpp @@ -1497,9 +1497,10 @@ API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t* device, bool dir_tx, size apiDevice->device->WriteRegister(apiDevice->moduleIndex, addr + i, pho); } - auto& selectionParameter = dir_tx ? SEL_TX : SEL_RX; - apiDevice->device->SetParameter( - apiDevice->moduleIndex, ch, selectionParameter.address, selectionParameter.msb, selectionParameter.lsb, 0); + const uint16_t addr = dir_tx ? 0x0240 : 0x0440; // SEL_TX, SEL_RX + const uint8_t msb = 4; + const uint8_t lsb = 1; + apiDevice->device->SetParameter(apiDevice->moduleIndex, ch, addr, msb, lsb, 0); } return 0; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4b7b62f6..3e26a4fd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -29,7 +29,6 @@ set(LIME_SUITE_SOURCES FPGA/WriteRegistersBatch.cpp threadHelper/threadHelper.cpp memory/MemoryPool.cpp - API/LMS_APIWrapper.cpp API/LimePlugin.cpp include/limesuiteng/SDRDevice.cpp utilities/toString.cpp) @@ -140,3 +139,12 @@ if(ENABLE_HEADERS AND ENABLE_LIBRARY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/limesuiteng.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) endif(ENABLE_HEADERS AND ENABLE_LIBRARY) + + +######################################################################## +# LMS_API Wrapper lib +# wrapper functions split into separate library to avoid symbols collision +# if both limesuiteng and LimeSuite would be linked to application. +######################################################################## +add_library(limesuiteng-legacyapi API/LMS_APIWrapper.cpp) +target_link_libraries(limesuiteng-legacyapi PRIVATE limesuiteng) diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index d3e871e1..d917b794 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -1,7 +1,7 @@ include(FeatureSummary) include(CMakeDependentOption) cmake_dependent_option(ENABLE_EXAMPLES "Enable library example programs" ON "ENABLE_LIBRARY" OFF) -add_feature_info(EXAMPLES ENABLE_EXAMPLES "LimeSuite library API examples") +add_feature_info(EXAMPLES ENABLE_EXAMPLES "LimeSuiteNG API examples") if(NOT ENABLE_EXAMPLES) return() endif() @@ -34,26 +34,4 @@ target_link_libraries( PRIVATE limesuiteng PRIVATE cli-shared kissfft taywee::args) -add_executable(legacyBasicRX legacy/basicRX.cpp) -set_target_properties(legacyBasicRX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME basicRX) -target_link_libraries(legacyBasicRX PRIVATE limesuiteng) - -add_executable(legacyBasicTX legacy/basicTX.cpp) -set_target_properties(legacyBasicTX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME basicTX) -target_link_libraries(legacyBasicTX PRIVATE limesuiteng) - -add_executable(legacyDualRXTX legacy/dualRXTX.cpp) -set_target_properties(legacyDualRXTX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME dualRXTX) -target_link_libraries(legacyDualRXTX PRIVATE limesuiteng) - -add_executable(legacyGpio_example legacy/gpio_example.cpp) -set_target_properties( - legacyGpio_example PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME gpio_example) -target_link_libraries(legacyGpio_example PRIVATE limesuiteng) - -add_executable(legacySingleRX legacy/singleRX.cpp) -set_target_properties(legacySingleRX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME singleRX) -target_link_libraries(legacySingleRX PRIVATE limesuiteng) -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - target_compile_options(legacySingleRX PRIVATE -Wno-unused-but-set-variable) -endif() +add_subdirectory(legacy) \ No newline at end of file diff --git a/src/examples/legacy/CMakeLists.txt b/src/examples/legacy/CMakeLists.txt new file mode 100644 index 00000000..262dc760 --- /dev/null +++ b/src/examples/legacy/CMakeLists.txt @@ -0,0 +1,23 @@ + +set(examplesOutputDir "${CMAKE_BINARY_DIR}/bin/examples") + +add_executable(legacyBasicRX basicRX.cpp) +set_target_properties(legacyBasicRX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME basicRX) +target_link_libraries(legacyBasicRX PRIVATE limesuiteng-legacyapi) + +add_executable(legacyBasicTX basicTX.cpp) +set_target_properties(legacyBasicTX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME basicTX) +target_link_libraries(legacyBasicTX PRIVATE limesuiteng-legacyapi) + +add_executable(legacyDualRXTX dualRXTX.cpp) +set_target_properties(legacyDualRXTX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME dualRXTX) +target_link_libraries(legacyDualRXTX PRIVATE limesuiteng-legacyapi) + +add_executable(legacyGpio_example gpio_example.cpp) +set_target_properties( + legacyGpio_example PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME gpio_example) +target_link_libraries(legacyGpio_example PRIVATE limesuiteng-legacyapi) + +add_executable(legacySingleRX singleRX.cpp) +set_target_properties(legacySingleRX PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${examplesOutputDir}/legacy RUNTIME_OUTPUT_NAME singleRX) +target_link_libraries(legacySingleRX PRIVATE limesuiteng-legacyapi) diff --git a/src/examples/legacy/basicRX.cpp b/src/examples/legacy/basicRX.cpp index 95ed722d..f9d5c216 100644 --- a/src/examples/legacy/basicRX.cpp +++ b/src/examples/legacy/basicRX.cpp @@ -6,9 +6,6 @@ #include "lime/LimeSuite.h" #include #include -#ifdef USE_GNU_PLOT - #include "gnuPlotPipe.h" -#endif using namespace std; @@ -86,10 +83,6 @@ int main(int argc, char** argv) LMS_StartStream(&streamId); //Streaming -#ifdef USE_GNU_PLOT - GNUPlotPipe gp; - gp.write("set size square\n set xrange[-2050:2050]\n set yrange[-2050:2050]\n"); -#endif auto t1 = chrono::high_resolution_clock::now(); while (chrono::high_resolution_clock::now() - t1 < chrono::seconds(5)) //run for 5 seconds { @@ -98,16 +91,8 @@ int main(int argc, char** argv) //I and Q samples are interleaved in buffer: IQIQIQ... printf("Received %d samples\n", samplesRead); /* - INSERT CODE FOR PROCESSING RECEIVED SAMPLES - */ -#ifdef USE_GNU_PLOT - //Plot samples - gp.write("plot '-' with points\n"); - for (int j = 0; j < samplesRead; ++j) - gp.writef("%i %i\n", buffer[2 * j], buffer[2 * j + 1]); - gp.write("e\n"); - gp.flush(); -#endif + INSERT CODE FOR PROCESSING RECEIVED SAMPLES + */ } //Stop streaming LMS_StopStream(&streamId); //stream is stopped but can be started again with LMS_StartStream() diff --git a/src/examples/legacy/dualRXTX.cpp b/src/examples/legacy/dualRXTX.cpp index ae308a3b..98095fd7 100644 --- a/src/examples/legacy/dualRXTX.cpp +++ b/src/examples/legacy/dualRXTX.cpp @@ -6,9 +6,6 @@ #include "lime/LimeSuite.h" #include #include -#ifdef USE_GNU_PLOT - #include "gnuPlotPipe.h" -#endif using namespace std; @@ -150,10 +147,6 @@ int main(int argc, char** argv) tx_metadata.flushPartialPacket = false; //do not force sending of incomplete packet tx_metadata.waitForTimestamp = true; //Enable synchronization to HW timestamp -#ifdef USE_GNU_PLOT - GNUPlotPipe gp; - gp.write("set size square\n set xrange[-2050:2050]\n set yrange[-2050:2050]\n"); -#endif auto t1 = chrono::high_resolution_clock::now(); auto t2 = t1; @@ -164,7 +157,9 @@ int main(int argc, char** argv) int samplesRead; //Receive samples samplesRead = LMS_RecvStream(&rx_streams[i], buffers[i], bufersize, &rx_metadata, 1000); + //Send samples with 1024*256 sample delay from RX (waitForTimestamp is enabled) + tx_metadata.timestamp = rx_metadata.timestamp + 1024 * 256; LMS_SendStream(&tx_streams[i], buffers[i], samplesRead, &tx_metadata, 1000); } @@ -173,19 +168,7 @@ int main(int argc, char** argv) if (chrono::high_resolution_clock::now() - t2 > chrono::seconds(1)) { t2 = chrono::high_resolution_clock::now(); -#ifdef USE_GNU_PLOT - //Plot samples - gp.write("plot '-' with points title 'ch 0'"); - for (int i = 1; i < chCount; ++i) - gp.write(", '-' with points title 'ch 1'\n"); - for (int i = 0; i < chCount; ++i) - { - for (uint32_t j = 0; j < bufersize / 8; ++j) - gp.writef("%i %i\n", buffers[i][2 * j], buffers[i][2 * j + 1]); - gp.write("e\n"); - gp.flush(); - } -#endif + //Print stats lms_stream_status_t status; LMS_GetStreamStatus(rx_streams, &status); //Obtain RX stream stats diff --git a/src/examples/legacy/singleRX.cpp b/src/examples/legacy/singleRX.cpp index 1cd7fac4..155cd11e 100644 --- a/src/examples/legacy/singleRX.cpp +++ b/src/examples/legacy/singleRX.cpp @@ -6,9 +6,6 @@ #include "lime/LimeSuite.h" #include #include -#ifdef USE_GNU_PLOT - #include "gnuPlotPipe.h" -#endif using namespace std; @@ -152,35 +149,25 @@ int main(int argc, char** argv) error(); //Data buffers - const int bufersize = 10000; //complex samples per buffer - float buffer[bufersize * 2]; //must hold I+Q values of each sample + const int buffersize = 10000; //complex samples per buffer + float buffer[buffersize * 2]; //must hold I+Q values of each sample //Start streaming LMS_StartStream(&streamId); -#ifdef USE_GNU_PLOT - GNUPlotPipe gp; - gp.write("set size square\n set xrange[-1:1]\n set yrange[-1:1]\n"); -#endif auto t1 = chrono::high_resolution_clock::now(); auto t2 = t1; while (chrono::high_resolution_clock::now() - t1 < chrono::seconds(10)) //run for 10 seconds { - int samplesRead; //Receive samples - samplesRead = LMS_RecvStream(&streamId, buffer, bufersize, NULL, 1000); + int samplesRead = LMS_RecvStream(&streamId, buffer, buffersize, NULL, 1000); + if (samplesRead != buffersize) + printf("Read only %i out of %i requested samples\n", samplesRead, buffersize); //I and Q samples are interleaved in buffer: IQIQIQ... /* - INSERT CODE FOR PROCESSING RECEIVED SAMPLES - */ - //Plot samples -#ifdef USE_GNU_PLOT - gp.write("plot '-' with points\n"); - for (int j = 0; j < samplesRead; ++j) - gp.writef("%f %f\n", buffer[2 * j], buffer[2 * j + 1]); - gp.write("e\n"); - gp.flush(); -#endif + INSERT CODE FOR PROCESSING RECEIVED SAMPLES + */ + //Print stats (once per second) if (chrono::high_resolution_clock::now() - t2 > chrono::seconds(1)) { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 759dd7de..2b246ea3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -82,7 +82,7 @@ endif() target_compile_definitions(gtest-runner-hardware PRIVATE GTEST_LINKED_AS_SHARED_LIBRARY=0) target_link_libraries( gtest-runner-hardware - PRIVATE limesuiteng taywee::args cli-shared + PRIVATE limesuiteng limesuiteng-legacyapi taywee::args cli-shared PUBLIC $ $) if(CMAKE_BINARY_DIR) set_target_properties(gtest-runner-hardware PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") From 3488e3f6c10d26d3d9d8451ada8de07171cc1e3e Mon Sep 17 00:00:00 2001 From: Ricardas Jonaitis Date: Fri, 22 Nov 2024 00:06:26 +0200 Subject: [PATCH 2/3] docs: Update legacy API docs and doxygen config --- docs/development/migration/LMS/changes.rst | 147 +-------------------- docs/development/migration/index.rst | 2 +- docs/doxygen/CMakeLists.txt | 2 +- docs/doxygen/DoxygenConfig.in | 40 +++--- src/include/lime/LimeSuite.h | 8 +- src/include/limesuiteng/SDRDevice.h | 2 + src/protocols/LMS64CProtocol.cpp | 2 +- src/streaming/TRXLooper.cpp | 13 +- 8 files changed, 33 insertions(+), 183 deletions(-) diff --git a/docs/development/migration/LMS/changes.rst b/docs/development/migration/LMS/changes.rst index 15d249ca..418ad36f 100644 --- a/docs/development/migration/LMS/changes.rst +++ b/docs/development/migration/LMS/changes.rst @@ -11,158 +11,15 @@ This is the table noting all the known differences to the functionality of the l * - LMS API function - Changes - * - ``LMS_GetDeviceList()`` - - No functional difference. - * - ``LMS_Open()`` - - No functional difference. - * - ``LMS_Close()`` - - No functional difference. - * - ``LMS_Init()`` - - No functional difference. - * - ``LMS_GetNumChannels()`` - - No functional difference. - * - ``LMS_EnableChannel()`` - - No functional difference. - * - ``LMS_SetSampleRate()`` - - No functional difference. * - ``LMS_GetSampleRate()`` - ``rf_Hz`` will always be the same as ``host_Hz`` (i.e. :math:`2^{ratio}` times smaller compared to the old API). - * - ``LMS_GetSampleRateRange()`` - - No functional difference. * - ``LMS_SetLOFrequency()`` - No functional difference once the bugs are fixed. * - ``LMS_GetLOFrequency()`` - The NCO offset is currently not applied. - * - ``LMS_GetLOFrequencyRange()`` - - No functional difference. - * - ``LMS_GetAntennaList()`` - - No functional difference. - * - ``LMS_SetAntenna()`` - - No functional difference. - * - ``LMS_GetAntenna()`` - - No functional difference. - * - ``LMS_GetAntennaBW()`` - - No functional difference. - * - ``LMS_SetNormalizedGain()`` - - No functional difference. - * - ``LMS_SetGaindB()`` - - No functional difference. - * - ``LMS_GetNormalizedGain()`` - - No functional difference. - * - ``LMS_GetGaindB()`` - - No functional difference. - * - ``LMS_SetLPFBW()`` - - No functional difference. - * - ``LMS_GetLPFBW()`` - - No functional difference. - * - ``LMS_GetLPFBWRange()`` - - No functional difference. * - ``LMS_SetLPF()`` - - Currently broken, just sets the last saved LPF value for the direction channel combo. - * - ``LMS_SetGFIRLPF()`` - - No functional difference. - * - ``LMS_Calibrate()`` - - No functional difference. - * - ``LMS_LoadConfig()`` - - No functional difference. - * - ``LMS_SaveConfig()`` - - No functional difference. - * - ``LMS_SetTestSignal()`` - - No functional difference. - * - ``LMS_GetTestSignal()`` - - No functional difference. - * - ``LMS_GetChipTemperature()`` - - No functional difference. + - Currently just sets the last saved LPF value from LMS_SetLPFBW call. * - ``LMS_SetSampleRateDir()`` - - Sets the sample rate for the whole device anyway, regardless of the direction used. - * - ``LMS_SetNCOFrequency()`` - - No functional difference. + - Sets both Rx and Tx to the same sample rate. * - ``LMS_GetNCOFrequency()`` - Negative values can be returned as well, use ``std::fabs()`` to fix that. - * - ``LMS_SetNCOPhase()`` - - No functional difference. - * - ``LMS_GetNCOPhase()`` - - No functional difference. - * - ``LMS_SetNCOIndex()`` - - No functional difference. - * - ``LMS_GetNCOIndex()`` - - No functional difference. - * - ``LMS_SetGFIRCoeff()`` - - No functional difference. - * - ``LMS_GetGFIRCoeff()`` - - No functional difference. - * - ``LMS_SetGFIR()`` - - No functional difference. - * - ``LMS_EnableCache()`` - - No functional difference. - * - ``LMS_Reset()`` - - No functional difference. - * - ``LMS_ReadLMSReg()`` - - No functional difference. - * - ``LMS_WriteLMSReg()`` - - No functional difference. - * - ``LMS_ReadParam()`` - - No functional difference. - * - ``LMS_WriteParam()`` - - No functional difference. - * - ``LMS_ReadFPGAReg()`` - - No functional difference. - * - ``LMS_WriteFPGAReg()`` - - No functional difference. - * - ``LMS_ReadCustomBoardParam()`` - - No functional difference. - * - ``LMS_WriteCustomBoardParam()`` - - No functional difference. - * - ``LMS_GetClockFreq()`` - - No functional difference. - * - ``LMS_SetClockFreq()`` - - No functional difference. - * - ``LMS_VCTCXOWrite()`` - - No functional difference. - * - ``LMS_VCTCXORead()`` - - No functional difference. - * - ``LMS_Synchronize()`` - - No functional difference. - * - ``LMS_GPIORead()`` - - No functional difference. - * - ``LMS_GPIOWrite()`` - - No functional difference. - * - ``LMS_GPIODirRead()`` - - No functional difference. - * - ``LMS_GPIODirWrite()`` - - No functional difference. - * - ``LMS_SetupStream()`` - - Only one call is now needed to set up all the streams on all the channels on a given device now, - multiple calls are still fine, albeit wasteful. - * - ``LMS_DestroyStream()`` - - Does not stop the stream anymore, a call to ``LMS_StopStream()`` before hand is necessary. - * - ``LMS_StartStream()`` - - Starts all the set up streams at the same time, multiple calls are allowed for legacy reasons only. - * - ``LMS_StopStream()`` - - Stops all the set up streams at the same time, multiple calls are allowed for legacy reasons only. - * - ``LMS_RecvStream()`` - - + SISO mode - no functional difference. - + MIMO mode - on the first call data for both channels is received and cached, - on the second call (to the other channel) it returns the previously cached samples. - * - ``LMS_GetStreamStatus()`` - - No functional difference. - * - ``LMS_SendStream()`` - - + SISO mode - no functional difference. - + MIMO mode - on the first call data is cached and return value is returned as if all the samples were sent, - on the second call (to the other channel) the samples are actually sent to the device and the correct sent sample count is being returned. - * - ``LMS_UploadWFM()`` - - No functional difference. - * - ``LMS_EnableTxWFM()`` - - No functional difference. - * - ``LMS_GetProgramModes()`` - - No functional difference. - * - ``LMS_Program()`` - - No functional difference. - * - ``LMS_GetDeviceInfo()`` - - No functional difference. - * - ``LMS_GetLibraryVersion()`` - - No functional difference. - * - ``LMS_GetLastErrorMessage()`` - - No functional difference. - * - ``LMS_RegisterLogHandler()`` - - No functional difference. diff --git a/docs/development/migration/index.rst b/docs/development/migration/index.rst index 361cfb1e..a9e6e1f4 100644 --- a/docs/development/migration/index.rst +++ b/docs/development/migration/index.rst @@ -1,7 +1,7 @@ API changes and migrations ========================== -This section contains information about how to migrate existing programs using the legacy LimeSuite LMS API to the newer SDRDevice API. +This section contains information about how to migrate existing programs from the legacy LimeSuite LMS API to the newer LimeSuiteNG API. .. toctree:: diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt index 282d4902..dd85c8b6 100644 --- a/docs/doxygen/CMakeLists.txt +++ b/docs/doxygen/CMakeLists.txt @@ -11,7 +11,7 @@ if(ENABLE_DOXYGEN) add_custom_target( doxygen ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/DoxygenConfig - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating Doxygen documentation" VERBATIM) endif() diff --git a/docs/doxygen/DoxygenConfig.in b/docs/doxygen/DoxygenConfig.in index b2b32dac..0c90eb85 100644 --- a/docs/doxygen/DoxygenConfig.in +++ b/docs/doxygen/DoxygenConfig.in @@ -170,7 +170,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = "@CMAKE_SOURCE_DIR@" +STRIP_FROM_PATH = "@PROJECT_SOURCE_DIR@" # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -471,7 +471,7 @@ LOOKUP_CACHE_SIZE = 0 # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. -NUM_PROC_THREADS = 1 +NUM_PROC_THREADS = 0 #--------------------------------------------------------------------------- # Build related configuration options @@ -794,7 +794,7 @@ CITE_BIB_FILES = # messages are off. # The default value is: NO. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES @@ -810,7 +810,7 @@ WARNINGS = YES # will automatically be disabled. # The default value is: YES. -WARN_IF_UNDOCUMENTED = YES +WARN_IF_UNDOCUMENTED = NO # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters @@ -864,7 +864,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = @CMAKE_SOURCE_DIR@/src @CMAKE_SOURCE_DIR@/plugins +INPUT = @PROJECT_SOURCE_DIR@/src @PROJECT_SOURCE_DIR@/plugins # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -898,24 +898,17 @@ FILE_PATTERNS = *.c \ *.cxx \ *.cpp \ *.c++ \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ - *.cs \ *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox + #*.m \ + #*.markdown \ + # *.md \ + #*.mm \ + #*.dox # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -930,14 +923,11 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = @CMAKE_SOURCE_DIR@/external @CMAKE_SOURCE_DIR@/plugins - -EXCLUDE += @CMAKE_SOURCE_DIR@/src/tests -EXCLUDE += @CMAKE_SOURCE_DIR@/src/boards_wxgui -EXCLUDE += @CMAKE_SOURCE_DIR@/src/fftviewer_wxgui -EXCLUDE += @CMAKE_SOURCE_DIR@/src/FPGAcontrols_wxgui -EXCLUDE += @CMAKE_SOURCE_DIR@/src/lms7002_wxgui -EXCLUDE += @CMAKE_SOURCE_DIR@/src/utilities_gui +# @PROJECT_SOURCE_DIR@/external @PROJECT_SOURCE_DIR@/plugins +EXCLUDE = +EXCLUDE += @PROJECT_SOURCE_DIR@/plugins/amarisoft-plugin/include +EXCLUDE += @PROJECT_SOURCE_DIR@/plugins/HDSDR +EXCLUDE += @PROJECT_SOURCE_DIR@/src/tests # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/src/include/lime/LimeSuite.h b/src/include/lime/LimeSuite.h index b1c0c779..a9d61866 100644 --- a/src/include/lime/LimeSuite.h +++ b/src/include/lime/LimeSuite.h @@ -597,7 +597,7 @@ API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t* device, bool dir_tx, * @param dir_tx Select RX or TX * @param chan Channel index * @param[in] freq List of NCO frequencies. Values cannot be negative. - * Must be at least ::LMS_NCO_VAL_COUNT length; + * Must be at least LMS_NCO_VAL_COUNT length; * @param pho NCO phase offset in deg * * @return 0 on success, (-1) on failure @@ -612,7 +612,7 @@ API_EXPORT int CALL_CONV LMS_SetNCOFrequency( * @param dir_tx Select RX or TX * @param chan Channel index * @param[out] freq List of NCO frequencies. Must be at least - * ::LMS_NCO_VAL_COUNT length; + * LMS_NCO_VAL_COUNT length; * @param[out] pho Phase offset in deg * * @return 0 on success, (-1) on failure @@ -629,7 +629,7 @@ API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t* device, bool dir_tx, * @param dir_tx Select RX or TX * @param chan Channel index * @param[in] phases List of NCO phases. Values cannot be negative. - * Must be at least ::LMS_NCO_VAL_COUNT length; + * Must be at least LMS_NCO_VAL_COUNT length; * @param fcw NCO frequency in Hz * * @return 0 on success, (-1) on failure @@ -643,7 +643,7 @@ API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t* device, bool dir_tx, size * @param dir_tx Select RX or TX * @param chan channel index * @param[out] phases List of configured NCO phases - * Must be at least ::LMS_NCO_VAL_COUNT length; + * Must be at least LMS_NCO_VAL_COUNT length; * @param[out] fcw Current NCO frequency * * @return 0 on success, (-1) on failure diff --git a/src/include/limesuiteng/SDRDevice.h b/src/include/limesuiteng/SDRDevice.h index 1b23d3c8..d836dec8 100644 --- a/src/include/limesuiteng/SDRDevice.h +++ b/src/include/limesuiteng/SDRDevice.h @@ -460,6 +460,7 @@ class LIME_API SDRDevice /// @param samples The buffer to put the received samples in. /// @param count The amount of samples to receive. /// @param meta The metadata of the packets of the stream. + /// @param timeout Number of microseconds for the operation to complete, function can return early if timeout is shorter than time required to gather requested amount of samples /// @return The amount of samples received. virtual uint32_t StreamRx(uint8_t moduleIndex, lime::complex32f_t* const* samples, @@ -484,6 +485,7 @@ class LIME_API SDRDevice /// @param samples The buffer of the samples to transmit. /// @param count The amount of samples to transmit. /// @param meta The metadata of the packets of the stream. + /// @param timeout Number of microseconds for the operation to complete, function can return early if timeout is shorter than time required to gather requested amount of samples /// @return The amount of samples transmitted. [[deprecated]] virtual uint32_t StreamTx(uint8_t moduleIndex, const lime::complex32f_t* const* samples, diff --git a/src/protocols/LMS64CProtocol.cpp b/src/protocols/LMS64CProtocol.cpp index dbfa2b1b..e4fd9091 100644 --- a/src/protocols/LMS64CProtocol.cpp +++ b/src/protocols/LMS64CProtocol.cpp @@ -515,7 +515,7 @@ OpStatus CustomParameterRead(ISerialPort& port, std::vector& /// @param data The program to write to the device. /// @param length The length of the program to write. /// @param prog_mode The programming mode to use. -/// @param device The memory to write the program to. +/// @param target The memory to write the program to. /// @param callback The callback to use for program write progress updates. /// @param subDevice The ID of the subdevice to use. /// @return The operation status. diff --git a/src/streaming/TRXLooper.cpp b/src/streaming/TRXLooper.cpp index d9aa8c10..10f7e5b5 100644 --- a/src/streaming/TRXLooper.cpp +++ b/src/streaming/TRXLooper.cpp @@ -779,19 +779,20 @@ uint32_t TRXLooper::StreamRxTemplate(T* const* dest, uint32_t count, StreamMeta* /// @param count The amount of samples to receive. /// @param meta The metadata of the packets of the stream. /// @return The amount of samples received. -uint32_t TRXLooper::StreamRx(complex32f_t* const* samples, uint32_t count, StreamMeta* meta, chrono::microseconds timeout) +uint32_t TRXLooper::StreamRx( + lime::complex32f_t* const* samples, uint32_t count, StreamMeta* meta, std::chrono::microseconds timeout) { return StreamRxTemplate(samples, count, meta, timeout); } /// @copydoc TRXLooper::StreamRx() -uint32_t TRXLooper::StreamRx(complex16_t* const* samples, uint32_t count, StreamMeta* meta, chrono::microseconds timeout) +uint32_t TRXLooper::StreamRx(lime::complex16_t* const* samples, uint32_t count, StreamMeta* meta, std::chrono::microseconds timeout) { return StreamRxTemplate(samples, count, meta, timeout); } /// @copydoc TRXLooper::StreamRx() -uint32_t TRXLooper::StreamRx(lime::complex12_t* const* samples, uint32_t count, StreamMeta* meta, chrono::microseconds timeout) +uint32_t TRXLooper::StreamRx(lime::complex12_t* const* samples, uint32_t count, StreamMeta* meta, std::chrono::microseconds timeout) { return StreamRxTemplate(samples, count, meta, timeout); } @@ -1286,21 +1287,21 @@ uint32_t TRXLooper::StreamTxTemplate(const T* const* samples, uint32_t count, co /// @param meta The metadata of the packets of the stream. /// @return The amount of samples transmitted. uint32_t TRXLooper::StreamTx( - const lime::complex32f_t* const* samples, uint32_t count, const StreamMeta* meta, chrono::microseconds timeout) + const lime::complex32f_t* const* samples, uint32_t count, const StreamMeta* meta, std::chrono::microseconds timeout) { return StreamTxTemplate(samples, count, meta, timeout); } /// @copydoc TRXLooper::StreamTx() uint32_t TRXLooper::StreamTx( - const lime::complex16_t* const* samples, uint32_t count, const StreamMeta* meta, chrono::microseconds timeout) + const lime::complex16_t* const* samples, uint32_t count, const StreamMeta* meta, std::chrono::microseconds timeout) { return StreamTxTemplate(samples, count, meta, timeout); } /// @copydoc TRXLooper::StreamTx() uint32_t TRXLooper::StreamTx( - const lime::complex12_t* const* samples, uint32_t count, const StreamMeta* meta, chrono::microseconds timeout) + const lime::complex12_t* const* samples, uint32_t count, const StreamMeta* meta, std::chrono::microseconds timeout) { return StreamTxTemplate(samples, count, meta, timeout); } From 80df37fabd618ae92652551b6a35a7d5e1feaaae Mon Sep 17 00:00:00 2001 From: Ricardas Jonaitis Date: Fri, 22 Nov 2024 00:07:23 +0200 Subject: [PATCH 3/3] docs: fix GNU Radio doxygen config to not cause scan of the entire project files --- plugins/gr-limesdr/docs/doxygen/CMakeLists.txt | 8 ++++---- plugins/gr-limesdr/docs/doxygen/Doxyfile.in | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/gr-limesdr/docs/doxygen/CMakeLists.txt b/plugins/gr-limesdr/docs/doxygen/CMakeLists.txt index 16065b6b..74d48902 100644 --- a/plugins/gr-limesdr/docs/doxygen/CMakeLists.txt +++ b/plugins/gr-limesdr/docs/doxygen/CMakeLists.txt @@ -9,10 +9,10 @@ ######################################################################## # Create the doxygen configuration file ######################################################################## -file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) -file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} abs_top_srcdir) -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir) +file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} top_srcdir) +file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} top_builddir) +file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} abs_top_srcdir) +file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} abs_top_builddir) set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) set(enable_html_docs YES) diff --git a/plugins/gr-limesdr/docs/doxygen/Doxyfile.in b/plugins/gr-limesdr/docs/doxygen/Doxyfile.in index 91a2019a..e32d8c03 100644 --- a/plugins/gr-limesdr/docs/doxygen/Doxyfile.in +++ b/plugins/gr-limesdr/docs/doxygen/Doxyfile.in @@ -781,7 +781,7 @@ INPUT_FILTER = # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = *.py="@top_srcdir@"/doc/doxygen/other/doxypy.py +FILTER_PATTERNS = *.py=\"@top_srcdir@\"/doc/doxygen/other/doxypy.py # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source