LMS API Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
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 
125 API_EXPORT int CALL_CONV LMS_Disconnect(lms_device_t *device);
126 
135 API_EXPORT bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port);
136 
148 static const bool LMS_CH_TX = true;
149 static const bool LMS_CH_RX = false;
150 
152 typedef char lms_name_t[16];
153 
155 typedef struct
156 {
157  float_type min;
158  float_type max;
159  float_type step;
160 }lms_range_t;
161 
163 typedef enum
164 {
172 
184 API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device);
185 
196 API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx);
197 
208 API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx,
209  size_t chan, bool enabled);
210 
224 API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate,
225  size_t oversample);
226 
240 API_EXPORT int CALL_CONV LMS_GetSampleRate(lms_device_t *device, bool dir_tx,
241  size_t chan, float_type *host_Hz, float_type *rf_Hz);
251 API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx,
252  lms_range_t *range);
253 
268 API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx,
269  size_t chan, float_type frequency);
270 
281 API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx,
282  size_t chan, float_type *frequency);
283 
293 API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx,
294  lms_range_t *range);
295 
307 API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx,
308  size_t chan, lms_name_t *list);
309 
320 API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx,
321  size_t chan, size_t index);
322 
332 API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx,
333  size_t chan);
334 
346 API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx,
347  size_t chan, size_t index, lms_range_t *range);
348 
364 API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx,
365  size_t chan,float_type gain);
366 
381 API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx,
382  size_t chan, unsigned gain);
383 
397 API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx,
398  size_t chan, float_type *gain);
411 API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx,
412  size_t chan, unsigned *gain);
413 
425 API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx,
426  size_t chan, float_type bandwidth);
427 
440 API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx,
441  size_t chan, float_type *bandwidth);
442 
452 API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx,
453  lms_range_t *range);
454 
465 API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx,
466  size_t chan, bool enable);
467 
482 API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx,
483  size_t chan, bool enabled, float_type bandwidth);
484 
500 API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx,
501  size_t chan, double bw, unsigned flags);
502 
515 API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename);
516 
525 API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename);
526 
539 API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx,
540  size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q);
551 API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx,
552  size_t chan, lms_testsig_t *sig);
553 
566 typedef enum
568 {
569  LMS_GFIR1 = 0,
570  LMS_GFIR2,
571  LMS_GFIR3
572 }lms_gfir_t;
573 
575 static const int LMS_NCO_VAL_COUNT = 16;
576 
598 API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx,
599  float_type rate, size_t oversample);
600 
616 API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx,
617  size_t chan, const float_type *freq, float_type pho);
618 
631 API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx,
632  size_t chan, float_type *freq, float_type *pho);
633 
649 API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx,
650  size_t chan, const float_type *phases, float_type fcw);
651 
664 API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx,
665  size_t chan, float_type *phases, float_type *fcw);
666 
679 API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx,
680  size_t chan, int index, bool downconv);
681 
691 API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx,
692  size_t chan);
693 
703 API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
704  struct LMS7Parameter param, uint16_t *val);
705 
715 API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
716  struct LMS7Parameter param, uint16_t val);
717 
731 API_EXPORT int CALL_CONV LMS_SetGFIRCoeff(lms_device_t * device, bool dir_tx,
732  size_t chan, lms_gfir_t filt, const float_type* coef,size_t count);
733 
746 API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t * device, bool dir_tx,
747  size_t chan, lms_gfir_t filt, float_type* coef);
748 
760 API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t * device, bool dir_tx,
761  size_t chan, lms_gfir_t filt, bool enabled);
762 
773 API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);
774 
783 API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);
784 
800 API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device);
801 
811 API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address,
812  uint16_t *val);
813 
823 API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address,
824  uint16_t val);
825 
835 API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address,
836  uint16_t *val);
837 
847 API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address,
848  uint16_t val);
849 
860 API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device,
861  uint8_t id, float_type *val, lms_name_t units);
862 
873 API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device,
874  uint8_t id, float_type val, const lms_name_t units);
875 
882 #define LMS_CLOCK_REF 0x0000
883 #define LMS_CLOCK_SXR 0x0001
884 #define LMS_CLOCK_SXT 0x0002
885 #define LMS_CLOCK_CGEN 0x0003
886 #define LMS_CLOCK_RXTSP 0x0004
887 #define LMS_CLOCK_TXTSP 0x0005
888 #define LMS_CLOCK_EXTREF 0x0006
889 
890 
901 API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id,
902  float_type *freq);
903 
917 API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id,
918  float_type freq);
919 
928 API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip);
929 
937 API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t* buffer, size_t len);
938 
946 API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
947 
955 API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t* buffer, size_t len);
956 
964 API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
965 
974 API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable);
975 
985 API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind,
986  float_type *temp);
987 
998 typedef struct
999 {
1005  uint64_t timestamp;
1006 
1013 
1018 
1020 
1022 typedef struct
1023 {
1027  size_t handle;
1028 
1030  bool isTx;
1031 
1033  uint32_t channel;
1034 
1036  uint32_t fifoSize;
1037 
1045 
1047  enum
1048  {
1049  LMS_FMT_F32=0,
1051  LMS_FMT_I12
1052  }dataFmt;
1053 }lms_stream_t;
1054 
1056 typedef struct
1057 {
1059  bool active;
1063  uint32_t fifoSize;
1065  uint32_t underrun;
1067  uint32_t overrun;
1069  uint32_t droppedPackets;
1071  float_type sampleRate;
1073  float_type linkRate;
1075  uint64_t timestamp;
1076 
1078 
1088 API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream);
1089 
1098 API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream);
1099 
1107 API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream);
1108 
1116 API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream);
1117 
1130  API_EXPORT int CALL_CONV LMS_RecvStream(lms_stream_t *stream, void *samples,
1131  size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms);
1132 
1141 API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t* status);
1142 
1154 API_EXPORT int CALL_CONV LMS_SendStream(lms_stream_t *stream,
1155  const void *samples,size_t sample_count,
1156  const lms_stream_meta_t *meta, unsigned timeout_ms);
1157 
1167 API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples,
1168  uint8_t chCount, size_t sample_count, int format);
1169 
1177 API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active);
1178 
1190 typedef enum
1191 {
1195 }lms_prog_md_t;
1196 
1198 typedef enum
1199 {
1203  LMS_PROG_TRG_HPM7,
1205 
1213 typedef bool (*lms_prog_callback_t)(int bsent, int btotal, const char* progressMsg);
1214 
1227 API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data, size_t size,
1228  lms_prog_trg_t target, lms_prog_md_t mode, lms_prog_callback_t callback);
1229 
1239 API_EXPORT int CALL_CONV LMS_ProgramUpdate(lms_device_t *dev, bool download,
1240  lms_prog_callback_t callback);
1241 
1243 typedef struct
1244 {
1245  char deviceName[32];
1246  char expansionName[32];
1247  char firmwareVersion[16];
1248  char hardwareVersion[16];
1249  char protocolVersion[16];
1251  char gatewareVersion[16];
1252  char gatewareRevision[16];
1253  char gatewareTargetBoard[32];
1255 
1267 API_EXPORT const lms_dev_info_t* CALL_CONV LMS_GetDeviceInfo(lms_device_t *device);
1268 
1272 API_EXPORT const char* LMS_GetLibraryVersion();
1273 
1279 API_EXPORT const char * CALL_CONV LMS_GetLastErrorMessage(void);
1280 
1283 #ifdef __cplusplus
1284 } //extern "C"
1285 #endif
1286 
1287 #endif //LMS_SDR_INTERFACE_H
lms_prog_md_t
Definition: LimeSuite.h:1190
API_EXPORT int CALL_CONV LMS_Disconnect(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data, size_t size, lms_prog_trg_t target, lms_prog_md_t mode, lms_prog_callback_t callback)
char lms_name_t[16]
Definition: LimeSuite.h:152
uint32_t boardSerialNumber
A unique board serial number.
Definition: LimeSuite.h:1250
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:1073
DC test signal.
Definition: LimeSuite.h:170
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:1067
API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx, float_type rate, size_t oversample)
static const bool LMS_CH_TX
Convenience constants for TX selection.
Definition: LimeSuite.h:148
uint32_t underrun
FIFO underrun count.
Definition: LimeSuite.h:1065
uint32_t channel
Channel number. Starts at 0.
Definition: LimeSuite.h:1033
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)
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:167
float_type step
Minimum value step.
Definition: LimeSuite.h:159
float_type min
Minimum allowed value.
Definition: LimeSuite.h:157
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:1036
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_WriteCustomBoardParam(lms_device_t *device, uint8_t id, float_type val, const lms_name_t units)
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_ProgramUpdate(lms_device_t *dev, bool download, lms_prog_callback_t callback)
API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device)
Test signal from NCO half scale.
Definition: LimeSuite.h:166
uint32_t fifoFilledCount
Number of samples in FIFO buffer.
Definition: LimeSuite.h:1061
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_VCTCXOWrite(lms_device_t *dev, uint16_t val)
API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx, size_t chan, bool enabled)
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device, struct LMS7Parameter param, uint16_t val)
size_t handle
Definition: LimeSuite.h:1027
program FX3 firmware
Definition: LimeSuite.h:1200
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:168
uint64_t timestamp
Current HW timestamp.
Definition: LimeSuite.h:1075
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)
load firmware/bitstream to volatile storage
Definition: LimeSuite.h:1192
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_GetChipTemperature(lms_device_t *dev, size_t ind, float_type *temp)
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 bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port)
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)
bool(* lms_prog_callback_t)(int bsent, int btotal, const char *progressMsg)
Definition: LimeSuite.h:1213
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:165
float_type max
Minimum allowed value.
Definition: LimeSuite.h:158
API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address, uint16_t *val)
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)
uint32_t fifoSize
Size of FIFO buffer.
Definition: LimeSuite.h:1063
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:1069
API_EXPORT int CALL_CONV LMS_EnableCalibCache(lms_device_t *dev, bool enable)
API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address, uint16_t val)
float_type sampleRate
Sampling rate of the stream.
Definition: LimeSuite.h:1071
API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
reset and boot from flash
Definition: LimeSuite.h:1194
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)
program LMS7 MCU firmware
Definition: LimeSuite.h:1202
static const int LMS_NCO_VAL_COUNT
Number of NCO frequency/phase offset values.
Definition: LimeSuite.h:575
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:1030
program FPGA gateware
Definition: LimeSuite.h:1201
float throughputVsLatency
Definition: LimeSuite.h:1044
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:567
API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream)
API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip)
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:169
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 int CALL_CONV LMS_VCTCXORead(lms_device_t *dev, uint16_t *val)
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)
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:1059
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)
load firmware/bitstream to non-volatile storage
Definition: LimeSuite.h:1193
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_RecvStream(lms_stream_t *stream, void *samples, size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms)
16-bit integers
Definition: LimeSuite.h:1050
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
static const bool LMS_CH_RX
Convenience constants for RX selection.
Definition: LimeSuite.h:149
lms_prog_trg_t
Definition: LimeSuite.h:1198
uint64_t timestamp
Definition: LimeSuite.h:1005
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)
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device, struct LMS7Parameter param, uint16_t *val)
lms_testsig_t
Definition: LimeSuite.h:163