LMS API Documentation: /build/limesuite/src/LimeSuite-18.10.0/src/lime/LimeSuite.h Source File

LMS API Documentation v18.10.0

LimeSuite.h
Go to the documentation of this file.
1
21 #ifndef LMS7_API_H
22 #define LMS7_API_H
23
24 #include <stdint.h>
25 #include <stdlib.h>
26 #include "LMS7002M_parameters.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #else
31 /* stdbool.h is not applicable for C++ programs, as the language inherently
32 * provides the bool type.
33 *
34 * Users of Visual Studio 2012 and earlier will need to supply a stdbool.h
35 * implementation, as it is not included with the toolchain. Visual Studio 2013
36 * onward supplies this header.
37 */
38 #include <stdbool.h>
39 #endif
40
41 #if defined _WIN32 || defined __CYGWIN__
42 # include <windows.h>
43 # define CALL_CONV __cdecl
44 # ifdef __GNUC__
45 # define API_EXPORT __attribute__ ((dllexport))
46 # else
47 # define API_EXPORT __declspec(dllexport)
48 # endif
49 #elif defined _DOXYGEN_ONLY_
50
52 # define API_EXPORT
53
55 # define CALL_CONV
56 #else
57 # define API_EXPORT __attribute__ ((visibility ("default")))
58 # define CALL_CONV
59 #endif
60
62 typedef double float_type;
63
65 static const int LMS_SUCCESS = 0;
66
75 typedef void lms_device_t;
77
79 typedef char lms_info_str_t[256];
80
88 API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list);
89
104 API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info,
105 void* args);
106
116 API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device);
117
127 API_EXPORT int CALL_CONV LMS_Disconnect(lms_device_t *device);
128
139 API_EXPORT bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port);
140
152 static const bool LMS_CH_TX = true;
153 static const bool LMS_CH_RX = false;
154
156 typedef char lms_name_t[16];
157
159 typedef struct
160 {
161 float_type min;
162 float_type max;
163 float_type step;
164 }lms_range_t;
165
167 typedef enum
168 {
169 LMS_TESTSIG_NONE=0,
170 LMS_TESTSIG_NCODIV8,
171 LMS_TESTSIG_NCODIV4,
172 LMS_TESTSIG_NCODIV8F,
173 LMS_TESTSIG_NCODIV4F,
174 LMS_TESTSIG_DC
175 }lms_testsig_t;
176
188 API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device);
189
200 API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx);
201
212 API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx,
213 size_t chan, bool enabled);
214
228 API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate,
229 size_t oversample);
230
244 API_EXPORT int CALL_CONV LMS_GetSampleRate(lms_device_t *device, bool dir_tx,
245 size_t chan, float_type *host_Hz, float_type *rf_Hz);
255 API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx,
256 lms_range_t *range);
257
274 API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx,
275 size_t chan, float_type frequency);
276
287 API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx,
288 size_t chan, float_type *frequency);
289
299 API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx,
300 lms_range_t *range);
301
303 enum
304 {
305 LMS_PATH_NONE = 0,
306 LMS_PATH_LNAH = 1,
307 LMS_PATH_LNAL = 2,
308 LMS_PATH_LNAW = 3,
309 LMS_PATH_TX1 = 1,
310 LMS_PATH_TX2 = 2
311 };
312
324 API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx,
325 size_t chan, lms_name_t *list);
326
337 API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx,
338 size_t chan, size_t index);
339
349 API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx,
350 size_t chan);
351
364 API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx,
365 size_t chan, size_t index, lms_range_t *range);
366
382 API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx,
383 size_t chan,float_type gain);
384
399 API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx,
400 size_t chan, unsigned gain);
401
415 API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx,
416 size_t chan, float_type *gain);
429 API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx,
430 size_t chan, unsigned *gain);
431
443 API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx,
444 size_t chan, float_type bandwidth);
445
458 API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx,
459 size_t chan, float_type *bandwidth);
460
470 API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx,
471 lms_range_t *range);
472
483 API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx,
484 size_t chan, bool enable);
485
500 API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx,
501 size_t chan, bool enabled, float_type bandwidth);
502
518 API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx,
519 size_t chan, double bw, unsigned flags);
520
533 API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename);
534
543 API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename);
544
557 API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx,
558 size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q);
569 API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx,
570 size_t chan, lms_testsig_t *sig);
571
581 API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind,
582 float_type *temp);
583
594 typedef enum
596 {
597 LMS_GFIR1 = 0,
598 LMS_GFIR2,
599 LMS_GFIR3
600 }lms_gfir_t;
601
603 static const int LMS_NCO_VAL_COUNT = 16;
604
626 API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx,
627 float_type rate, size_t oversample);
628
644 API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx,
645 size_t chan, const float_type *freq, float_type pho);
646
659 API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx,
660 size_t chan, float_type *freq, float_type *pho);
661
677 API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx,
678 size_t chan, const float_type *phases, float_type fcw);
679
692 API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx,
693 size_t chan, float_type *phases, float_type *fcw);
694
707 API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx,
708 size_t chan, int index, bool downconv);
709
719 API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx,
720 size_t chan);
721
735 API_EXPORT int CALL_CONV LMS_SetGFIRCoeff(lms_device_t * device, bool dir_tx,
736 size_t chan, lms_gfir_t filt, const float_type* coef,size_t count);
737
750 API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t * device, bool dir_tx,
751 size_t chan, lms_gfir_t filt, float_type* coef);
752
764 API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t * device, bool dir_tx,
765 size_t chan, lms_gfir_t filt, bool enabled);
766
767
768
780 API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable);
781
791 API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable);
792
814 API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device);
815
825 API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address,
826 uint16_t *val);
827
837 API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address,
838 uint16_t val);
839
849 API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
850 struct LMS7Parameter param, uint16_t *val);
851
861 API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
862 struct LMS7Parameter param, uint16_t val);
863
873 API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address,
874 uint16_t *val);
875
885 API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address,
886 uint16_t val);
887
898 API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device,
899 uint8_t id, float_type *val, lms_name_t units);
900
911 API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device,
912 uint8_t id, float_type val, const lms_name_t units);
913
920 #define LMS_CLOCK_REF 0x0000
922 #define LMS_CLOCK_SXR 0x0001
924 #define LMS_CLOCK_SXT 0x0002
926 #define LMS_CLOCK_CGEN 0x0003
928 #define LMS_CLOCK_RXTSP 0x0004
930 #define LMS_CLOCK_TXTSP 0x0005
932
939 #define LMS_CLOCK_EXTREF 0x0006
940
952 API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id,
953 float_type *freq);
954
968 API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id,
969 float_type freq);
970
981 API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);
982
991 API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);
992
1001 API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip);
1002
1010 API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t* buffer, size_t len);
1011
1019 API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1020
1028 API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t* buffer, size_t len);
1029
1037 API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1038
1049 typedef struct
1050 {
1056 uint64_t timestamp;
1057
1062 bool waitForTimestamp;
1063
1067 bool flushPartialPacket;
1068
1069 }lms_stream_meta_t;
1070
1072 typedef struct
1073 {
1077 size_t handle;
1078
1080 bool isTx;
1081
1083 uint32_t channel;
1084
1086 uint32_t fifoSize;
1087
1094 float throughputVsLatency;
1095
1097 enum
1098 {
1099 LMS_FMT_F32=0,
1100 LMS_FMT_I16,
1101 LMS_FMT_I12
1102 }dataFmt;
1103 }lms_stream_t;
1104
1106 typedef struct
1107 {
1109 bool active;
1111 uint32_t fifoFilledCount;
1113 uint32_t fifoSize;
1115 uint32_t underrun;
1117 uint32_t overrun;
1119 uint32_t droppedPackets;
1121 float_type sampleRate;
1123 float_type linkRate;
1125 uint64_t timestamp;
1126
1127 } lms_stream_status_t;
1128
1138 API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream);
1139
1148 API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream);
1149
1157 API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream);
1158
1166 API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream);
1167
1180 API_EXPORT int CALL_CONV LMS_RecvStream(lms_stream_t *stream, void *samples,
1181 size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms);
1182
1191 API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t* status);
1192
1204 API_EXPORT int CALL_CONV LMS_SendStream(lms_stream_t *stream,
1205 const void *samples,size_t sample_count,
1206 const lms_stream_meta_t *meta, unsigned timeout_ms);
1207
1217 API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples,
1218 uint8_t chCount, size_t sample_count, int format);
1219
1227 API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active);
1228
1247 API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list);
1248
1256 typedef bool (*lms_prog_callback_t)(int bsent, int btotal, const char* progressMsg);
1257
1269 API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data,
1270 size_t size, const lms_name_t mode, lms_prog_callback_t callback);
1271
1273 typedef struct
1274 {
1275 char deviceName[32];
1276 char expansionName[32];
1277 char firmwareVersion[16];
1278 char hardwareVersion[16];
1279 char protocolVersion[16];
1280 uint64_t boardSerialNumber;
1281 char gatewareVersion[16];
1282 char gatewareTargetBoard[32];
1283 }lms_dev_info_t;
1284
1296 API_EXPORT const lms_dev_info_t* CALL_CONV LMS_GetDeviceInfo(lms_device_t *device);
1297
1301 API_EXPORT const char* LMS_GetLibraryVersion();
1302
1310 API_EXPORT const char * CALL_CONV LMS_GetLastErrorMessage(void);
1311
1317 #define LMS_LOG_ERROR 1
1319 #define LMS_LOG_WARNING 2
1321 #define LMS_LOG_INFO 3
1323 #define LMS_LOG_DEBUG 4
1325
1333 typedef void (*LMS_LogHandler)(int lvl, const char *msg);
1334
1341 API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler);
1342
1345 #ifdef __cplusplus
1346 } //extern "C"
1347 #endif
1348
1349 #endif //LMS_SDR_INTERFACE_H
LMS_Disconnect
API_EXPORT int CALL_CONV LMS_Disconnect(lms_device_t *device)
lms_name_t
char lms_name_t[16]
Definition: LimeSuite.h:156
LMS_PATH_LNAW
RX LNA_W port.
Definition: LimeSuite.h:308
LMS_SaveConfig
API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename)
lms_stream_status_t::linkRate
float_type linkRate
Combined data rate of all stream of the same direction (TX or RX)
Definition: LimeSuite.h:1123
LMS_PATH_TX2
TX port 2.
Definition: LimeSuite.h:310
LMS_GetProgramModes
API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list)
LMS_TESTSIG_DC
DC test signal.
Definition: LimeSuite.h:174
LMS_UploadWFM
API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples, uint8_t chCount, size_t sample_count, int format)
lms_stream_status_t::overrun
uint32_t overrun
FIFO overrun count.
Definition: LimeSuite.h:1117
LMS_LogHandler
void(* LMS_LogHandler)(int lvl, const char *msg)
Definition: LimeSuite.h:1333
LMS_SetSampleRateDir
API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx, float_type rate, size_t oversample)
LMS_RegisterLogHandler
API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler)
LMS_CH_TX
static const bool LMS_CH_TX
Convenience constants for TX selection.
Definition: LimeSuite.h:152
lms_stream_status_t::underrun
uint32_t underrun
FIFO underrun count.
Definition: LimeSuite.h:1115
lms_stream_t::channel
uint32_t channel
Channel number. Starts at 0.
Definition: LimeSuite.h:1083
lms_stream_t
Definition: LimeSuite.h:1072
LMS_SetupStream
API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream)
LMS_GetTestSignal
API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t *sig)
LMS_SetClockFreq
API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id, float_type freq)
LMS_GetNCOPhase
API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx, size_t chan, float_type *phases, float_type *fcw)
LMS_LoadConfig
API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename)
LMS_GPIORead
API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t *buffer, size_t len)
LMS_TESTSIG_NCODIV4
Test signal from NCO half scale.
Definition: LimeSuite.h:171
lms_range_t::step
float_type step
Minimum value step.
Definition: LimeSuite.h:163
lms_range_t::min
float_type min
Minimum allowed value.
Definition: LimeSuite.h:161
LMS_SetNCOPhase
API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx, size_t chan, const float_type *phases, float_type fcw)
lms_stream_t::fifoSize
uint32_t fifoSize
FIFO size (in samples) used by stream.
Definition: LimeSuite.h:1086
LMS_SetGaindB
API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned gain)
LMS_ReadParam
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device, struct LMS7Parameter param, uint16_t *val)
LMS_WriteCustomBoardParam
API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device, uint8_t id, float_type val, const lms_name_t units)
LMS_PATH_NONE
No active path (RX or TX)
Definition: LimeSuite.h:305
LMS_GetNCOFrequency
API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *freq, float_type *pho)
LMS_Close
API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device)
LMS_WriteParam
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device, struct LMS7Parameter param, uint16_t val)
LMS_TESTSIG_NCODIV8
Test signal from NCO half scale.
Definition: LimeSuite.h:170
lms_stream_status_t::fifoFilledCount
uint32_t fifoFilledCount
Number of samples in FIFO buffer.
Definition: LimeSuite.h:1111
LMS_SetGFIR
API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, bool enabled)
lms_stream_meta_t::flushPartialPacket
bool flushPartialPacket
Definition: LimeSuite.h:1067
LMS_EnableChannel
API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx, size_t chan, bool enabled)
lms_stream_t::handle
size_t handle
Definition: LimeSuite.h:1077
LMS_PATH_LNAL
RX LNA_L port.
Definition: LimeSuite.h:307
LMS_StartStream
API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream)
LMS_SetNCOFrequency
API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx, size_t chan, const float_type *freq, float_type pho)
LMS_GetNumChannels
API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx)
LMS_TESTSIG_NCODIV8F
Test signal from NCO full scale.
Definition: LimeSuite.h:172
lms_stream_status_t::timestamp
uint64_t timestamp
Current HW timestamp.
Definition: LimeSuite.h:1125
lms_info_str_t
char lms_info_str_t[256]
Convenience type for fixed length LMS Device information string.
Definition: LimeSuite.h:79
LMS_GetAntennaList
API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx, size_t chan, lms_name_t *list)
LMS_ReadLMSReg
API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address, uint16_t *val)
LMS_EnableTxWFM
API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active)
LMS_SetAntenna
API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx, size_t chan, size_t index)
LMS_WriteFPGAReg
API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address, uint16_t val)
LMS_Init
API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device)
LMS_GetLOFrequencyRange
API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
float_type
double float_type
Floating point data type.
Definition: LimeSuite.h:62
LMS_IsOpen
API_EXPORT bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port)
LMS_GetLPFBW
API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type *bandwidth)
LMS_SetSampleRate
API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate, size_t oversample)
LMS_GetClockFreq
API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id, float_type *freq)
LMS_GetGFIRCoeff
API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, float_type *coef)
LMS_GetDeviceList
API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list)
LMS_GetDeviceInfo
API_EXPORT const lms_dev_info_t *CALL_CONV LMS_GetDeviceInfo(lms_device_t *device)
lms_stream_meta_t::waitForTimestamp
bool waitForTimestamp
Definition: LimeSuite.h:1062
LMS_GetAntenna
API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx, size_t chan)
LMS_TESTSIG_NONE
Disable test signals. Return to normal operation.
Definition: LimeSuite.h:169
lms_range_t::max
float_type max
Minimum allowed value.
Definition: LimeSuite.h:162
LMS_ReadFPGAReg
API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address, uint16_t *val)
LMS_Program
API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data, size_t size, const lms_name_t mode, lms_prog_callback_t callback)
LMS_Reset
API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device)
LMS_SetNormalizedGain
API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type gain)
LMS_SetLPFBW
API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type bandwidth)
LMS_GetChipTemperature
API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind, float_type *temp)
lms_stream_status_t::fifoSize
uint32_t fifoSize
Size of FIFO buffer.
Definition: LimeSuite.h:1113
LMS_GetLOFrequency
API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *frequency)
lms_stream_status_t::droppedPackets
uint32_t droppedPackets
Number of dropped packets by HW.
Definition: LimeSuite.h:1119
LMS_WriteLMSReg
API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address, uint16_t val)
lms_stream_meta_t
Definition: LimeSuite.h:1049
lms_stream_status_t::sampleRate
float_type sampleRate
Currently not used.
Definition: LimeSuite.h:1121
LMS_GPIODirWrite
API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
LMS_VCTCXOWrite
API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t *dev, uint16_t val)
LMS_SetLPF
API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enable)
LMS_GetAntennaBW
API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx, size_t chan, size_t index, lms_range_t *range)
lms_stream_status_t
Definition: LimeSuite.h:1106
LMS_GetNormalizedGain
API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type *gain)
LMS_GetNCOIndex
API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan)
LMS_GetSampleRateRange
API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
LMS_NCO_VAL_COUNT
static const int LMS_NCO_VAL_COUNT
Number of NCO frequency/phase offset values.
Definition: LimeSuite.h:603
lms_stream_t::LMS_FMT_I16
16-bit integers
Definition: LimeSuite.h:1100
LMS_GetSampleRate
API_EXPORT int CALL_CONV LMS_GetSampleRate(lms_device_t *device, bool dir_tx, size_t chan, float_type *host_Hz, float_type *rf_Hz)
lms_range_t
Definition: LimeSuite.h:159
lms_stream_t::isTx
bool isTx
Indicates whether stream is TX (true) or RX (false)
Definition: LimeSuite.h:1080
LMS_PATH_LNAH
RX LNA_H port.
Definition: LimeSuite.h:306
lms_stream_t::throughputVsLatency
float throughputVsLatency
Definition: LimeSuite.h:1094
LMS_SetLOFrequency
API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type frequency)
LMS_GPIOWrite
API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
LMS_GetLPFBWRange
API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
lms_gfir_t
lms_gfir_t
Enumeration of LMS7 GFIRS.
Definition: LimeSuite.h:595
LMS_StopStream
API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream)
lms_prog_callback_t
bool(* lms_prog_callback_t)(int bsent, int btotal, const char *progressMsg)
Definition: LimeSuite.h:1256
lms_dev_info_t
Definition: LimeSuite.h:1273
LMS_Synchronize
API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip)
LMS_EnableCalibCache
API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable)
LMS_SetGFIRCoeff
API_EXPORT int CALL_CONV LMS_SetGFIRCoeff(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, const float_type *coef, size_t count)
LMS_Calibrate
API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx, size_t chan, double bw, unsigned flags)
LMS_TESTSIG_NCODIV4F
Test signal from NCO full scale.
Definition: LimeSuite.h:173
LMS_GetGaindB
API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned *gain)
LMS_SUCCESS
static const int LMS_SUCCESS
convenience constant for good return code
Definition: LimeSuite.h:65
LMS_GetLibraryVersion
API_EXPORT const char * LMS_GetLibraryVersion()
Returns API library version.
LMS_ReadCustomBoardParam
API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device, uint8_t id, float_type *val, lms_name_t units)
lms_dev_info_t::boardSerialNumber
uint64_t boardSerialNumber
A unique board serial number.
Definition: LimeSuite.h:1280
LMS_GPIODirRead
API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t *buffer, size_t len)
lms_stream_status_t::active
bool active
Indicates whether the stream is currently active.
Definition: LimeSuite.h:1109
LMS_VCTCXORead
API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t *dev, uint16_t *val)
LMS_SetNCOIndex
API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan, int index, bool downconv)
LMS_GetLastErrorMessage
API_EXPORT const char *CALL_CONV LMS_GetLastErrorMessage(void)
LMS_SendStream
API_EXPORT int CALL_CONV LMS_SendStream(lms_stream_t *stream, const void *samples, size_t sample_count, const lms_stream_meta_t *meta, unsigned timeout_ms)
LMS_EnableCache
API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable)
LMS_RecvStream
API_EXPORT int CALL_CONV LMS_RecvStream(lms_stream_t *stream, void *samples, size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms)
LMS_Open
API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info, void *args)
LMS_SetGFIRLPF
API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enabled, float_type bandwidth)
LMS_SetTestSignal
API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q)
lms_device_t
void lms_device_t
LMS Device handle.
Definition: LimeSuite.h:76
LMS_PATH_TX1
TX port 1.
Definition: LimeSuite.h:309
LMS_CH_RX
static const bool LMS_CH_RX
Convenience constants for RX selection.
Definition: LimeSuite.h:153
lms_stream_meta_t::timestamp
uint64_t timestamp
Definition: LimeSuite.h:1056
LMS_DestroyStream
API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream)
LMS_GetStreamStatus
API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t *status)
lms_testsig_t
lms_testsig_t
Definition: LimeSuite.h:167