Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
update LimeSuite compilation instructions
move doxygen files to /docs
add basic mainpage to doxygen
  • Loading branch information
ignasJ committed Jun 20, 2018
1 parent 739bd85 commit 63da71a
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 68 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -206,7 +206,7 @@ include(CMakeDependentOption)
cmake_dependent_option(ENABLE_API_DOXYGEN "Enable LMS API Doxygen documentation" ON "DOXYGEN_FOUND" OFF)
add_feature_info(LimeSuiteDocAPI ENABLE_API_DOXYGEN "LMS API Doxygen documentation")
if (ENABLE_API_DOXYGEN)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DoxyfileAPI.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen/DoxyfileAPI.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
add_custom_target(docAPI ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Expand All @@ -215,7 +215,7 @@ if (ENABLE_API_DOXYGEN)
endif()

if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Expand Down
1 change: 1 addition & 0 deletions Changelog.txt
Expand Up @@ -3,6 +3,7 @@ Release 18.06.1 (pending)

- Fix CalibrateTxGain() XBUF settings for 3rd party boards
- Add interpolation/decimation support for SISODDR mode
- Fix Rx filter calibration for 2nd channel with low bandwidth values

Release 18.06.0 (2018-06-13)
==========================
Expand Down
Binary file modified docs/Lime_Suite_Compilation_Guide.odt
Binary file not shown.
Binary file modified docs/Lime_Suite_Compilation_Guide.pdf
Binary file not shown.
File renamed without changes.
4 changes: 2 additions & 2 deletions DoxyfileAPI.in → docs/doxygen/DoxyfileAPI.in
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "LMS API Documentation"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER =
PROJECT_NUMBER = "v@LIME_SUITE_LIBVER@"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -764,7 +764,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@/src/lime
INPUT = @CMAKE_SOURCE_DIR@/src/lime/LimeSuite.h @CMAKE_SOURCE_DIR@/docs/doxygen/mainpage.dox

# 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
Expand Down
32 changes: 32 additions & 0 deletions docs/doxygen/mainpage.dox
@@ -0,0 +1,32 @@
/*! \mainpage Introduction

LMS API is a set of C functions that are exported by LimeSuite library. Its main purpose is to provide a relatively simple interface for controlling LimeSDR boards. LMS API provides both high-level and low-level methods for configuring devices. \ref FN_HIGH_LVL allow to quickly configure device by accessing and modifying multiple internal device settings during their execution. Meanwhile, \ref FN_LOW_LVL provide an ability to individually access various internal device settings (registers, clocks, etc.).


### Further Information

\li \ref page_changelog "LMS API Changelog"
\li <a href="https://wiki.myriadrf.org/LimeSDR">LimeSDR boards </a>
\li <a href="https://github.com/myriadrf/LimeSuite">LimeSuite GitHub page</a>

*/

/*! \page page_changelog Changelog

### v18.06.1

\li Fixed LMS_SetLPFBW() failing to bandwidth lower than ~2MHz for second channel

### v18.06.0

\li Added log level definitions (\ref LMS_LOG_LEVEL) to LimeSuite.h
\li Zeros filled packet is no longer transmited every ~500 ms when Tx FIFO is empty
\li Added support of oversample=1 to LMS_SetSampleRate() for LimeSDR-USB board
\li LMS_SetNormalizedGain() and LMS_SetGaindB() no longer calibrate gain everytime Tx gain is changed
\li Updated parameter range information returned by API to match datasheets/schematics
\li Fixed some sample timing isues when using LMS_SetGFIRLPF()

*/



132 changes: 68 additions & 64 deletions src/lime/LimeSuite.h
Expand Up @@ -144,7 +144,7 @@ API_EXPORT bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port);
* @defgroup FN_HIGH_LVL High-level control functions
*
* The functions in this section provide the ability to easily configure the
* device for operation.
* device for operation. They modify multiple internal device settings.
*
* @{
*/
Expand Down Expand Up @@ -569,15 +569,25 @@ API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx,
API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx,
size_t chan, lms_testsig_t *sig);

/** @} (End FN_HIGH_LVL) */
/**
* Read LMS7 chip internal temperature sensor
*
* @param dev Device handle previously obtained by LMS_Open().
* @param ind chip index
* @param temp temperature value
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind,
float_type *temp);

/**
* @defgroup FN_ADVANCED Advanced control functions
*
* The functions in this section provides some additional control compared to
* High-Level functions. They are labeled advanced because they require better
* understanding of hardware and provide functionality that may conflict with
* certain High-Level functions.
* other High-Level functions.
* @{
*/

Expand Down Expand Up @@ -709,30 +719,6 @@ API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx,
API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx,
size_t chan);

/**
* Read device parameter. Parameter defines specific bits in device register.
*
* @param device Device handle previously obtained by LMS_Open().
* @param param Parameter.
* @param val Current parameter value.
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
struct LMS7Parameter param, uint16_t *val);

/**
* Write device parameter. Parameter defines specific bits in device register.
*
* @param device Device handle previously obtained by LMS_Open().
* @param param Parameter.
* @param val Parameter value to write
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
struct LMS7Parameter param, uint16_t val);

/**
* Configure LMS GFIR using specified filter coefficients. Maximum number of
* coefficients is 40 for GFIR1 and GFIR2, and 120 for GFIR3.
Expand Down Expand Up @@ -779,31 +765,25 @@ API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t * device, bool dir_tx,
size_t chan, lms_gfir_t filt, bool enabled);

/**
* Write value to VCTCXO trim DAC. Used to adjust/calibrate reference clock
* generated by voltage controlled oscillator.
* @note calling this functions switches clock source to VCTCXO
* Enables or disable caching of calibration values.
*
* @param dev Device handle previously obtained by LMS_Open().
* @param val Value to write to VCTCXO trim DAC, range 0-255
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);

/**
* Read value from VCTCXO trim DAC.
*
* @param[in] dev Device handle previously obtained by LMS_Open().
* @param[out] val Value to read from VCTCXO trim DAC
* @param enable true to enable cache
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);
API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable);

/** @} (End FN_ADVANCED) */

/** @} (End FN_HIGH_LVL) */

/**
* @defgroup FN_LOW_LVL Low-Level control functions
* The functions in this section provide a low access to device such as modifying
* device internal register or clock frequency. Low-Level functions can be used
* to configure device entirely, however a more practical use is to fine-tune
* device settings after configuring it with /ref FN_HIGH_LVL.
* @{
*/

Expand Down Expand Up @@ -841,6 +821,30 @@ API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address,
API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address,
uint16_t val);

/**
* Read device parameter. Parameter defines specific bits in device register.
*
* @param device Device handle previously obtained by LMS_Open().
* @param param Parameter.
* @param val Current parameter value.
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
struct LMS7Parameter param, uint16_t *val);

/**
* Write device parameter. Parameter defines specific bits in device register.
*
* @param device Device handle previously obtained by LMS_Open().
* @param param Parameter.
* @param val Parameter value to write
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
struct LMS7Parameter param, uint16_t val);

/**
* Read device FPGA register
*
Expand Down Expand Up @@ -935,6 +939,28 @@ API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id,
API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id,
float_type freq);

/**
* Write value to VCTCXO trim DAC. Used to adjust/calibrate reference clock
* generated by voltage controlled oscillator.
* @note calling this functions switches clock source to VCTCXO
*
* @param dev Device handle previously obtained by LMS_Open().
* @param val Value to write to VCTCXO trim DAC, range 0-255
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);

/**
* Read value from VCTCXO trim DAC.
*
* @param[in] dev Device handle previously obtained by LMS_Open().
* @param[out] val Value to read from VCTCXO trim DAC
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);

/**
* Synchronizes register values between API cache and chip
*
Expand Down Expand Up @@ -981,28 +1007,6 @@ API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t* buffer, siz
*/
API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);

/**
* Enables or disable caching of calibration values.
*
* @param dev Device handle previously obtained by LMS_Open().
* @param enable true to enable cache
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable);

/**
* Read LMS7 chip internal temperature sensor
*
* @param dev Device handle previously obtained by LMS_Open().
* @param ind chip index
* @param temp temperature value
*
* @return 0 on success, (-1) on failure
*/
API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind,
float_type *temp);

/** @} (End FN_LOW_LVL) */

/**
Expand Down

0 comments on commit 63da71a

Please sign in to comment.