LMS API Documentation  v19.01.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 
129 static const bool LMS_CH_TX = true;
130 static const bool LMS_CH_RX = false;
131 
133 typedef char lms_name_t[16];
134 
136 typedef struct
137 {
138  float_type min;
139  float_type max;
140  float_type step;
141 }lms_range_t;
142 
144 typedef enum
145 {
153 
165 API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device);
166 
177 API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx);
178 
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 {
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 
745 
746 
758 API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable);
759 
769 API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable);
770 
792 API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device);
793 
803 API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address,
804  uint16_t *val);
805 
815 API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address,
816  uint16_t val);
817 
827 API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
828  struct LMS7Parameter param, uint16_t *val);
829 
839 API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
840  struct LMS7Parameter param, uint16_t val);
841 
851 API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address,
852  uint16_t *val);
853 
863 API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address,
864  uint16_t val);
865 
871 #define BOARD_PARAM_DAC 0
873 #define BOARD_PARAM_TEMP 1
875 
887 API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device,
888  uint8_t id, float_type *val, lms_name_t units);
889 
900 API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device,
901  uint8_t id, float_type val, const lms_name_t units);
902 
909 #define LMS_CLOCK_REF 0x0000
911 #define LMS_CLOCK_SXR 0x0001
913 #define LMS_CLOCK_SXT 0x0002
915 #define LMS_CLOCK_CGEN 0x0003
917 #define LMS_CLOCK_RXTSP 0x0004
919 #define LMS_CLOCK_TXTSP 0x0005
921 
928 #define LMS_CLOCK_EXTREF 0x0006
929 
941 API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id,
942  float_type *freq);
943 
957 API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id,
958  float_type freq);
959 
971 API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);
972 
982 API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);
983 
992 API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip);
993 
1001 API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t* buffer, size_t len);
1002 
1010 API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1011 
1019 API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t* buffer, size_t len);
1020 
1028 API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1029 
1040 typedef struct
1041 {
1047  uint64_t timestamp;
1048 
1054 
1059 
1061 
1063 typedef struct
1064 {
1068  size_t handle;
1069 
1071  bool isTx;
1072 
1074  uint32_t channel;
1075 
1077  uint32_t fifoSize;
1078 
1086 
1088  enum
1089  {
1090  LMS_FMT_F32=0,
1092  LMS_FMT_I12
1093  }dataFmt;
1094 }lms_stream_t;
1095 
1097 typedef struct
1098 {
1100  bool active;
1104  uint32_t fifoSize;
1106  uint32_t underrun;
1108  uint32_t overrun;
1110  uint32_t droppedPackets;
1112  float_type sampleRate;
1114  float_type linkRate;
1116  uint64_t timestamp;
1117 
1119 
1129 API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream);
1130 
1139 API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream);
1140 
1148 API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream);
1149 
1157 API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream);
1158 
1171  API_EXPORT int CALL_CONV LMS_RecvStream(lms_stream_t *stream, void *samples,
1172  size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms);
1173 
1182 API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t* status);
1183 
1195 API_EXPORT int CALL_CONV LMS_SendStream(lms_stream_t *stream,
1196  const void *samples,size_t sample_count,
1197  const lms_stream_meta_t *meta, unsigned timeout_ms);
1198 
1208 API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples,
1209  uint8_t chCount, size_t sample_count, int format);
1210 
1218 API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active);
1219 
1238 API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list);
1239 
1247 typedef bool (*lms_prog_callback_t)(int bsent, int btotal, const char* progressMsg);
1248 
1260 API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data,
1261  size_t size, const lms_name_t mode, lms_prog_callback_t callback);
1262 
1264 typedef struct
1265 {
1266  char deviceName[32];
1267  char expansionName[32];
1268  char firmwareVersion[16];
1269  char hardwareVersion[16];
1270  char protocolVersion[16];
1272  char gatewareVersion[16];
1273  char gatewareTargetBoard[32];
1275 
1287 API_EXPORT const lms_dev_info_t* CALL_CONV LMS_GetDeviceInfo(lms_device_t *device);
1288 
1292 API_EXPORT const char* LMS_GetLibraryVersion();
1293 
1301 API_EXPORT const char * CALL_CONV LMS_GetLastErrorMessage(void);
1302 
1308 #define LMS_LOG_ERROR 1
1310 #define LMS_LOG_WARNING 2
1312 #define LMS_LOG_INFO 3
1314 #define LMS_LOG_DEBUG 4
1316 
1324  typedef void (*LMS_LogHandler)(int lvl, const char *msg);
1325 
1332 API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler);
1333 
1336 #ifdef __cplusplus
1337 } //extern "C"
1338 #endif
1339 
1340 #endif //LMS_SDR_INTERFACE_H
char lms_name_t[16]
Definition: LimeSuite.h:133
RX LNA_W port.
Definition: LimeSuite.h:285
API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename)
float_type linkRate
Combined data rate of all stream of the same direction (TX or RX)
Definition: LimeSuite.h:1114
TX port 2.
Definition: LimeSuite.h:287
API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list)
DC test signal.
Definition: LimeSuite.h:151
API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples, uint8_t chCount, size_t sample_count, int format)
uint32_t overrun
FIFO overrun count.
Definition: LimeSuite.h:1108
void(* LMS_LogHandler)(int lvl, const char *msg)
Definition: LimeSuite.h:1324
API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx, float_type rate, size_t oversample)
API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler)
static const bool LMS_CH_TX
Convenience constants for TX selection.
Definition: LimeSuite.h:129
uint32_t underrun
FIFO underrun count.
Definition: LimeSuite.h:1106
uint32_t channel
Channel number. Starts at 0.
Definition: LimeSuite.h:1074
API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream)
API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t *sig)
Automatically select port (if supported)
Definition: LimeSuite.h:288
API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id, float_type freq)
API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx, size_t chan, float_type *phases, float_type *fcw)
API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename)
API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t *buffer, size_t len)
Test signal from NCO half scale.
Definition: LimeSuite.h:148
float_type step
Minimum value step.
Definition: LimeSuite.h:140
float_type min
Minimum allowed value.
Definition: LimeSuite.h:138
API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx, size_t chan, const float_type *phases, float_type fcw)
uint32_t fifoSize
FIFO size (in samples) used by stream.
Definition: LimeSuite.h:1077
API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned gain)
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device, struct LMS7Parameter param, uint16_t *val)
API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device, uint8_t id, float_type val, const lms_name_t units)
No active path (RX or TX)
Definition: LimeSuite.h:282
API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *freq, float_type *pho)
API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device, struct LMS7Parameter param, uint16_t val)
Test signal from NCO half scale.
Definition: LimeSuite.h:147
uint32_t fifoFilledCount
Number of samples in FIFO buffer.
Definition: LimeSuite.h:1102
API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, bool enabled)
API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx, size_t chan, bool enabled)
size_t handle
Definition: LimeSuite.h:1068
RX LNA_L port.
Definition: LimeSuite.h:284
API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream)
API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx, size_t chan, const float_type *freq, float_type pho)
API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx)
Test signal from NCO full scale.
Definition: LimeSuite.h:149
uint64_t timestamp
Current HW timestamp.
Definition: LimeSuite.h:1116
char lms_info_str_t[256]
Convenience type for fixed length LMS Device information string.
Definition: LimeSuite.h:79
API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx, size_t chan, lms_name_t *list)
API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address, uint16_t *val)
API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active)
API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx, size_t chan, size_t index)
API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address, uint16_t val)
API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
double float_type
Floating point data type.
Definition: LimeSuite.h:62
API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type *bandwidth)
API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate, size_t oversample)
API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id, float_type *freq)
API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, float_type *coef)
API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list)
API_EXPORT const lms_dev_info_t *CALL_CONV LMS_GetDeviceInfo(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx, size_t chan)
Disable test signals. Return to normal operation.
Definition: LimeSuite.h:146
float_type max
Minimum allowed value.
Definition: LimeSuite.h:139
API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address, uint16_t *val)
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)
API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type gain)
API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type bandwidth)
API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind, float_type *temp)
uint32_t fifoSize
Size of FIFO buffer.
Definition: LimeSuite.h:1104
API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *frequency)
uint32_t droppedPackets
Number of dropped packets by HW.
Definition: LimeSuite.h:1110
API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address, uint16_t val)
float_type sampleRate
Currently not used.
Definition: LimeSuite.h:1112
API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t *dev, uint16_t val)
API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enable)
API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx, size_t chan, size_t index, lms_range_t *range)
API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type *gain)
API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan)
API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
static const int LMS_NCO_VAL_COUNT
Number of NCO frequency/phase offset values.
Definition: LimeSuite.h:581
16-bit integers
Definition: LimeSuite.h:1091
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)
bool isTx
Indicates whether stream is TX (true) or RX (false)
Definition: LimeSuite.h:1071
RX LNA_H port.
Definition: LimeSuite.h:283
float throughputVsLatency
Definition: LimeSuite.h:1085
API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type frequency)
API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
lms_gfir_t
Enumeration of LMS7 GFIRS.
Definition: LimeSuite.h:573
API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream)
bool(* lms_prog_callback_t)(int bsent, int btotal, const char *progressMsg)
Definition: LimeSuite.h:1247
API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip)
API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable)
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)
API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx, size_t chan, double bw, unsigned flags)
Test signal from NCO full scale.
Definition: LimeSuite.h:150
API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned *gain)
static const int LMS_SUCCESS
convenience constant for good return code
Definition: LimeSuite.h:65
API_EXPORT const char * LMS_GetLibraryVersion()
Returns API library version.
API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device, uint8_t id, float_type *val, lms_name_t units)
uint64_t boardSerialNumber
A unique board serial number.
Definition: LimeSuite.h:1271
API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t *buffer, size_t len)
bool active
Indicates whether the stream is currently active.
Definition: LimeSuite.h:1100
API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t *dev, uint16_t *val)
API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan, int index, bool downconv)
API_EXPORT const char *CALL_CONV LMS_GetLastErrorMessage(void)
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)
API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable)
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)
API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info, void *args)
API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enabled, float_type bandwidth)
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)
void lms_device_t
LMS Device handle.
Definition: LimeSuite.h:76
TX port 1.
Definition: LimeSuite.h:286
static const bool LMS_CH_RX
Convenience constants for RX selection.
Definition: LimeSuite.h:130
uint64_t timestamp
Definition: LimeSuite.h:1047
API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream)
API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t *status)
lms_testsig_t
Definition: LimeSuite.h:144