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

LMS API Documentation v20.07.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 # define CALL_CONV __cdecl
43 # ifdef __GNUC__
44 # define API_EXPORT __attribute__ ((dllexport))
45 # else
46 # define API_EXPORT __declspec(dllexport)
47 # endif
48 #elif defined _DOXYGEN_ONLY_
49
51 # define API_EXPORT
52
54 # define CALL_CONV
55 #else
56 # define API_EXPORT __attribute__ ((visibility ("default")))
57 # define CALL_CONV
58 #endif
59
61 typedef double float_type;
62
64 static const int LMS_SUCCESS = 0;
65
74 typedef void lms_device_t;
76
78 typedef char lms_info_str_t[256];
79
87 API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list);
88
103 API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info,
104 void* args);
105
115 API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device);
116
128 static const bool LMS_CH_TX = true;
129 static const bool LMS_CH_RX = false;
130
132 typedef char lms_name_t[16];
133
135 typedef struct
136 {
137 float_type min;
138 float_type max;
139 float_type step;
140 }lms_range_t;
141
143 typedef enum
144 {
145 LMS_TESTSIG_NONE=0,
146 LMS_TESTSIG_NCODIV8,
147 LMS_TESTSIG_NCODIV4,
148 LMS_TESTSIG_NCODIV8F,
149 LMS_TESTSIG_NCODIV4F,
150 LMS_TESTSIG_DC
151 }lms_testsig_t;
152
164 API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device);
165
176 API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx);
177
189 API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx,
190 size_t chan, bool enabled);
191
205 API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate,
206 size_t oversample);
207
221 API_EXPORT int CALL_CONV LMS_GetSampleRate(lms_device_t *device, bool dir_tx,
222 size_t chan, float_type *host_Hz, float_type *rf_Hz);
232 API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx,
233 lms_range_t *range);
234
251 API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx,
252 size_t chan, float_type frequency);
253
264 API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx,
265 size_t chan, float_type *frequency);
266
276 API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx,
277 lms_range_t *range);
278
280 enum
281 {
282 LMS_PATH_NONE = 0,
283 LMS_PATH_LNAH = 1,
284 LMS_PATH_LNAL = 2,
285 LMS_PATH_LNAW = 3,
286 LMS_PATH_TX1 = 1,
287 LMS_PATH_TX2 = 2,
288 LMS_PATH_AUTO = 255,
289 };
290
302 API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx,
303 size_t chan, lms_name_t *list);
304
315 API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx,
316 size_t chan, size_t index);
317
327 API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx,
328 size_t chan);
329
342 API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx,
343 size_t chan, size_t index, lms_range_t *range);
344
360 API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx,
361 size_t chan,float_type gain);
362
377 API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx,
378 size_t chan, unsigned gain);
379
393 API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx,
394 size_t chan, float_type *gain);
407 API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx,
408 size_t chan, unsigned *gain);
409
421 API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx,
422 size_t chan, float_type bandwidth);
423
436 API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx,
437 size_t chan, float_type *bandwidth);
438
448 API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx,
449 lms_range_t *range);
450
461 API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx,
462 size_t chan, bool enable);
463
478 API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx,
479 size_t chan, bool enabled, float_type bandwidth);
480
496 API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx,
497 size_t chan, double bw, unsigned flags);
498
511 API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename);
512
521 API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename);
522
535 API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx,
536 size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q);
547 API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx,
548 size_t chan, lms_testsig_t *sig);
549
559 API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind,
560 float_type *temp);
561
572 typedef enum
574 {
575 LMS_GFIR1 = 0,
576 LMS_GFIR2,
577 LMS_GFIR3
578 }lms_gfir_t;
579
581 static const int LMS_NCO_VAL_COUNT = 16;
582
604 API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx,
605 float_type rate, size_t oversample);
606
622 API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx,
623 size_t chan, const float_type *freq, float_type pho);
624
637 API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx,
638 size_t chan, float_type *freq, float_type *pho);
639
655 API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx,
656 size_t chan, const float_type *phases, float_type fcw);
657
670 API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx,
671 size_t chan, float_type *phases, float_type *fcw);
672
685 API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx,
686 size_t chan, int index, bool downconv);
687
697 API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx,
698 size_t chan);
699
713 API_EXPORT int CALL_CONV LMS_SetGFIRCoeff(lms_device_t * device, bool dir_tx,
714 size_t chan, lms_gfir_t filt, const float_type* coef,size_t count);
715
728 API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t * device, bool dir_tx,
729 size_t chan, lms_gfir_t filt, float_type* coef);
730
742 API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t * device, bool dir_tx,
743 size_t chan, lms_gfir_t filt, bool enabled);
744
754 API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable);
755
777 API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device);
778
788 API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address,
789 uint16_t *val);
790
800 API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address,
801 uint16_t val);
802
812 API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
813 struct LMS7Parameter param, uint16_t *val);
814
824 API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
825 struct LMS7Parameter param, uint16_t val);
826
836 API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address,
837 uint16_t *val);
838
848 API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address,
849 uint16_t val);
850
856 #define BOARD_PARAM_DAC 0
858 #define BOARD_PARAM_TEMP 1
860
872 API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device,
873 uint8_t id, float_type *val, lms_name_t units);
874
885 API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device,
886 uint8_t id, float_type val, const lms_name_t units);
887
894 #define LMS_CLOCK_REF 0x0000
896 #define LMS_CLOCK_SXR 0x0001
898 #define LMS_CLOCK_SXT 0x0002
900 #define LMS_CLOCK_CGEN 0x0003
902 #define LMS_CLOCK_RXTSP 0x0004
904 #define LMS_CLOCK_TXTSP 0x0005
906
913 #define LMS_CLOCK_EXTREF 0x0006
914
926 API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id,
927 float_type *freq);
928
939 API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id,
940 float_type freq);
941
953 API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);
954
964 API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);
965
974 API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip);
975
983 API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t* buffer, size_t len);
984
992 API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
993
1001 API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t* buffer, size_t len);
1002
1010 API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1011
1022 typedef struct
1023 {
1029 uint64_t timestamp;
1030
1035 bool waitForTimestamp;
1036
1040 bool flushPartialPacket;
1041
1042 }lms_stream_meta_t;
1043
1051 #define LMS_ALIGN_CH_PHASE (1<<16)
1053
1056 typedef struct
1057 {
1061 size_t handle;
1062
1064 bool isTx;
1065
1069 uint32_t channel;
1070
1072 uint32_t fifoSize;
1073
1080 float throughputVsLatency;
1081
1083 enum
1084 {
1085 LMS_FMT_F32=0,
1086 LMS_FMT_I16,
1087 LMS_FMT_I12
1088 }dataFmt;
1089 }lms_stream_t;
1090
1092 typedef struct
1093 {
1095 bool active;
1097 uint32_t fifoFilledCount;
1099 uint32_t fifoSize;
1101 uint32_t underrun;
1103 uint32_t overrun;
1105 uint32_t droppedPackets;
1107 float_type sampleRate;
1109 float_type linkRate;
1111 uint64_t timestamp;
1112
1113 } lms_stream_status_t;
1114
1124 API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream);
1125
1134 API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream);
1135
1143 API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream);
1144
1152 API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream);
1153
1166 API_EXPORT int CALL_CONV LMS_RecvStream(lms_stream_t *stream, void *samples,
1167 size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms);
1168
1177 API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t* status);
1178
1190 API_EXPORT int CALL_CONV LMS_SendStream(lms_stream_t *stream,
1191 const void *samples,size_t sample_count,
1192 const lms_stream_meta_t *meta, unsigned timeout_ms);
1193
1205 API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples,
1206 uint8_t chCount, size_t sample_count, int format);
1207
1215 API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active);
1216
1235 API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list);
1236
1244 typedef bool (*lms_prog_callback_t)(int bsent, int btotal, const char* progressMsg);
1245
1257 API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data,
1258 size_t size, const lms_name_t mode, lms_prog_callback_t callback);
1259
1261 typedef struct
1262 {
1263 char deviceName[32];
1264 char expansionName[32];
1265 char firmwareVersion[16];
1266 char hardwareVersion[16];
1267 char protocolVersion[16];
1268 uint64_t boardSerialNumber;
1269 char gatewareVersion[16];
1270 char gatewareTargetBoard[32];
1271 }lms_dev_info_t;
1272
1284 API_EXPORT const lms_dev_info_t* CALL_CONV LMS_GetDeviceInfo(lms_device_t *device);
1285
1289 API_EXPORT const char* LMS_GetLibraryVersion();
1290
1298 API_EXPORT const char * CALL_CONV LMS_GetLastErrorMessage(void);
1299
1305 #define LMS_LOG_CRITICAL 0
1307 #define LMS_LOG_ERROR 1
1309 #define LMS_LOG_WARNING 2
1311 #define LMS_LOG_INFO 3
1313 #define LMS_LOG_DEBUG 4
1315
1323 typedef void (*LMS_LogHandler)(int lvl, const char *msg);
1324
1331 API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler);
1332
1335 #ifdef __cplusplus
1336 } //extern "C"
1337 #endif
1338
1339 #endif //LMS_SDR_INTERFACE_H
lms_range_t::max
float_type max
Minimum allowed value.
Definition: LimeSuite.h:138
lms_stream_status_t::active
bool active
Indicates whether the stream is currently active.
Definition: LimeSuite.h:1095
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_GetLOFrequency
API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *frequency)
LMS_WriteParam
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device, struct LMS7Parameter param, uint16_t val)
lms_stream_t
Definition: LimeSuite.h:1057
lms_stream_t::channel
uint32_t channel
Channel number, starts at 0. Can be combined with additional flags (Additional streaming options)
Definition: LimeSuite.h:1069
lms_dev_info_t
Definition: LimeSuite.h:1262
lms_stream_status_t::overrun
uint32_t overrun
FIFO overrun count since the last call to LMS_GetStreamStatus()
Definition: LimeSuite.h:1103
LMS_LoadConfig
API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename)
LMS_PATH_NONE
@ LMS_PATH_NONE
No active path (RX or TX)
Definition: LimeSuite.h:282
lms_range_t::min
float_type min
Minimum allowed value.
Definition: LimeSuite.h:137
LMS_GetTestSignal
API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t *sig)
LMS_EnableChannel
API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx, size_t chan, bool enabled)
LMS_Reset
API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device)
LMS_StopStream
API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream)
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)
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_GPIODirRead
API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t *buffer, size_t len)
LMS_GetDeviceInfo
API_EXPORT const lms_dev_info_t *CALL_CONV LMS_GetDeviceInfo(lms_device_t *device)
lms_stream_status_t::timestamp
uint64_t timestamp
The most recently received Rx timestamp, or the last timestamp submitted to Tx.
Definition: LimeSuite.h:1111
LMS_GetProgramModes
API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list)
LMS_VCTCXOWrite
API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t *dev, uint16_t val)
lms_stream_t::isTx
bool isTx
Indicates whether stream is TX (true) or RX (false)
Definition: LimeSuite.h:1064
LMS_GetSampleRateRange
API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
LMS_SetNormalizedGain
API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type gain)
lms_stream_status_t::fifoFilledCount
uint32_t fifoFilledCount
Number of samples in FIFO buffer.
Definition: LimeSuite.h:1097
lms_stream_t::throughputVsLatency
float throughputVsLatency
Parameter for controlling configuration bias toward low latency or high data throughput range [0,...
Definition: LimeSuite.h:1080
LMS_TESTSIG_DC
@ LMS_TESTSIG_DC
DC test signal.
Definition: LimeSuite.h:150
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_PATH_TX2
@ LMS_PATH_TX2
TX port 2.
Definition: LimeSuite.h:287
lms_stream_meta_t::flushPartialPacket
bool flushPartialPacket
Definition: LimeSuite.h:1040
LMS_TESTSIG_NCODIV8
@ LMS_TESTSIG_NCODIV8
Test signal from NCO half scale.
Definition: LimeSuite.h:146
LMS_EnableCache
API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable)
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_GetClockFreq
API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id, float_type *freq)
LMS_TESTSIG_NCODIV4
@ LMS_TESTSIG_NCODIV4
Test signal from NCO half scale.
Definition: LimeSuite.h:147
LMS_GPIORead
API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t *buffer, size_t len)
LMS_PATH_LNAW
@ LMS_PATH_LNAW
RX LNA_W port.
Definition: LimeSuite.h:285
LMS_SetupStream
API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream)
lms_stream_t::handle
size_t handle
Stream handle. Should not be modified manually. Assigned by LMS_SetupStream().
Definition: LimeSuite.h:1061
LMS_PATH_LNAL
@ LMS_PATH_LNAL
RX LNA_L port.
Definition: LimeSuite.h:284
LMS_GetNCOIndex
API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan)
lms_stream_status_t::fifoSize
uint32_t fifoSize
Size (in samples) of FIFO buffer.
Definition: LimeSuite.h:1099
lms_stream_status_t::droppedPackets
uint32_t droppedPackets
Number of dropped packets by HW since the last call to LMS_GetStreamStatus()
Definition: LimeSuite.h:1105
LMS_EnableTxWFM
API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active)
LMS_StartStream
API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream)
LMS_GetStreamStatus
API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t *status)
LMS_TESTSIG_NONE
@ LMS_TESTSIG_NONE
Disable test signals. Return to normal operation.
Definition: LimeSuite.h:145
LMS_SetClockFreq
API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id, float_type freq)
lms_stream_meta_t
Definition: LimeSuite.h:1023
lms_stream_meta_t::waitForTimestamp
bool waitForTimestamp
Definition: LimeSuite.h:1035
lms_stream_status_t
Definition: LimeSuite.h:1093
LMS_SetSampleRateDir
API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx, float_type rate, size_t oversample)
lms_gfir_t
lms_gfir_t
Enumeration of LMS7 GFIRS.
Definition: LimeSuite.h:574
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_CH_RX
static const bool LMS_CH_RX
Convenience constants for RX selection.
Definition: LimeSuite.h:129
LMS_GetGaindB
API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned *gain)
LMS_GetAntennaList
API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx, size_t chan, lms_name_t *list)
LMS_PATH_TX1
@ LMS_PATH_TX1
TX port 1.
Definition: LimeSuite.h:286
LMS_SetAntenna
API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx, size_t chan, size_t index)
LMS_GetNormalizedGain
API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type *gain)
lms_info_str_t
char lms_info_str_t[256]
Convenience type for fixed length LMS Device information string.
Definition: LimeSuite.h:78
LMS_Close
API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device)
lms_name_t
char lms_name_t[16]
Definition: LimeSuite.h:132
LMS_GPIODirWrite
API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
lms_range_t::step
float_type step
Minimum value step.
Definition: LimeSuite.h:139
LMS_SetGaindB
API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned gain)
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_CH_TX
static const bool LMS_CH_TX
Convenience constants for TX selection.
Definition: LimeSuite.h:128
LMS_WriteFPGAReg
API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address, uint16_t val)
LMS_GetAntenna
API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx, size_t chan)
LMS_ReadParam
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device, struct LMS7Parameter param, uint16_t *val)
LMS_SetLOFrequency
API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type frequency)
LMS_ReadCustomBoardParam
API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device, uint8_t id, float_type *val, lms_name_t units)
LMS_PATH_AUTO
@ LMS_PATH_AUTO
Automatically select port (if supported)
Definition: LimeSuite.h:288
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_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_VCTCXORead
API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t *dev, uint16_t *val)
LMS_GetLPFBWRange
API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
LMS_WriteLMSReg
API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address, uint16_t val)
LMS_Open
API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info, void *args)
lms_dev_info_t::boardSerialNumber
uint64_t boardSerialNumber
A unique board serial number.
Definition: LimeSuite.h:1268
LMS_GetNumChannels
API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx)
LMS_ReadFPGAReg
API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address, uint16_t *val)
LMS_TESTSIG_NCODIV8F
@ LMS_TESTSIG_NCODIV8F
Test signal from NCO full scale.
Definition: LimeSuite.h:148
LMS_GetChipTemperature
API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind, float_type *temp)
lms_stream_meta_t::timestamp
uint64_t timestamp
Definition: LimeSuite.h:1029
LMS_ReadLMSReg
API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address, uint16_t *val)
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_GetLastErrorMessage
API_EXPORT const char *CALL_CONV LMS_GetLastErrorMessage(void)
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_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_SetSampleRate
API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate, size_t oversample)
lms_testsig_t
lms_testsig_t
Definition: LimeSuite.h:144
LMS_NCO_VAL_COUNT
static const int LMS_NCO_VAL_COUNT
Number of NCO frequency/phase offset values.
Definition: LimeSuite.h:581
lms_stream_status_t::sampleRate
float_type sampleRate
Currently not used.
Definition: LimeSuite.h:1107
LMS_GetDeviceList
API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list)
LMS_GPIOWrite
API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
lms_stream_t::fifoSize
uint32_t fifoSize
FIFO size (in samples) used by stream.
Definition: LimeSuite.h:1072
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_SetNCOIndex
API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan, int index, bool downconv)
lms_range_t
Definition: LimeSuite.h:136
lms_stream_t::LMS_FMT_I16
@ LMS_FMT_I16
16-bit integers
Definition: LimeSuite.h:1086
lms_device_t
void lms_device_t
LMS Device handle.
Definition: LimeSuite.h:75
LMS_LogHandler
void(* LMS_LogHandler)(int lvl, const char *msg)
Definition: LimeSuite.h:1323
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_GetLPFBW
API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type *bandwidth)
LMS_RegisterLogHandler
API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler)
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_SetLPF
API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enable)
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_PATH_LNAH
@ LMS_PATH_LNAH
RX LNA_H port.
Definition: LimeSuite.h:283
LMS_Synchronize
API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip)
lms_stream_status_t::linkRate
float_type linkRate
Data transfer rate (B/s) over the last 1 s per direction per LMS chip.
Definition: LimeSuite.h:1109
LMS_Calibrate
API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx, size_t chan, double bw, unsigned flags)
lms_prog_callback_t
bool(* lms_prog_callback_t)(int bsent, int btotal, const char *progressMsg)
Definition: LimeSuite.h:1244
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_SUCCESS
static const int LMS_SUCCESS
convenience constant for good return code
Definition: LimeSuite.h:64
LMS_SaveConfig
API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename)
float_type
double float_type
Floating point data type.
Definition: LimeSuite.h:61
lms_stream_status_t::underrun
uint32_t underrun
FIFO underrun count since the last call to LMS_GetStreamStatus()
Definition: LimeSuite.h:1101
LMS_DestroyStream
API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream)
LMS_GetLibraryVersion
API_EXPORT const char * LMS_GetLibraryVersion()
Returns API library version.
LMS_TESTSIG_NCODIV4F
@ LMS_TESTSIG_NCODIV4F
Test signal from NCO full scale.
Definition: LimeSuite.h:149
LMS_SetLPFBW
API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type bandwidth)