SDDC_Driver
Loading...
Searching...
No Matches
LC_ExtIO_Types.h
1//---------------------------------------------------------------------------
2
3#ifndef LC_ExtIO_TypesH
4#define LC_ExtIO_TypesH
5
6// specification from http://www.sdradio.eu/weaksignals/bin/Winrad_Extio.pdf
7// linked referenced from http://www.weaksignals.com/
8
9#include <stdint.h>
10// for other compiles you may try http://www.azillionmonkeys.com/qed/pstdint.h
11// or try boost: http://www.boost.org/doc/libs/1_36_0/boost/cstdint.hpp
12
13/*
14 * I. INITIALIZATION + OPEN SEQUENCE
15 * =================================
16 * ExtIoSDRFeatures()
17 * optional: inform ExtIO of SDR software's supported features
18 * ExtIoSetSetting()
19 * optional: previously saved settings are delivered to ExtIO
20 * call once with idx -1 to sign ExtIO that this functionality is supported,
21 * so that ExtIO may inhibit loading/storing any .ini
22 * InitHW()
23 * mandatory: initialize ExtIO. May do nothing!
24 * VersionInfo()
25 * optional: delivers SDR program name and version to ExtIO. Allows to check if some necessary
26 * functional extension is (not) supported by SDR program
27 * GetAttenuators()
28 * optional: show ExtIO, that SDR program supports controlling RF Gain/Attenuator(s)
29 * you should prefer this over determining SDR program's capabilities over VersionInfo()
30 * ExtIoGetMGCs()
31 * optional: show ExtIO, that SDR program supports controlling IF Gain/Attenuator(s)
32 * you should prefer this over determining SDR program's capabilities over VersionInfo()
33 * [ ActivateTx() ]
34 * optional: try's to activate Tx functionality
35 * SetCallback()
36 * mandatory: callback function pointer is given to ExtIO. ExtIO may inform SDR program of events
37 * using this callback interface and the extHWstatusT enums
38 * OpenHW()
39 * mandatory: prepare ExtIO for start .. or fail for any reason!
40 *
41 *
42 * II. START SEQUENCE
43 * ==================
44 * StartHW()
45 * mandatory: start processing
46 *
47 *
48 * III. WORK
49 * =========
50 * SetHWLO() and many other functions ...
51 *
52 *
53 * IV. STOP SEQUENCE (== 'undo' of Start sequence)
54 * =================
55 * StopHW()
56 * mandatory: start processing
57 *
58 *
59 * V. CLOSE SEQUENCE (== 'undo' of init + stop sequence)
60 * =================
61 * ExtIoGetSetting()
62 * optional: get and save settings for next time.
63 * call ExtIoGetSetting() before CloseHW() to get correct settings.
64 * do not call without súccessful OpenHW()
65 * CloseHW()
66 * mandatory: close hardware. Processing is not started again (with StartHW),
67 * unless OpenHW() is called again
68 * this function is called only when prior OpenHW() was successful
69 * take care not to free already freed or never allocated resources
70 *
71 */
72
73// function implemented by Winrad / HDSDR; see enum extHWstatusT below
74typedef int (* pfnExtIOCallback) (int cntr, int status, float IQoffs, void *IQdata);
75
76// mandatory functions, which have to be implemented by ExtIO DLL
77#define EXTIO_MAX_NAME_LEN 16 /* name is displayed in Winrad/HDSDR's menu */
78#define EXTIO_MAX_MODEL_LEN 16 /* model is not used */
79typedef bool (__stdcall * pfnInitHW) (char *name, char *model, int& hwtype);
80 // name: descriptive name of the hardware.
81 // Preferably not longer than about 16 characters,
82 // as it will be used in a Winrad menu
83 // model: model code of the hardware,
84 // or its Serial Number.
85 // Keep also this field not too long,
86 // for the same reason of the previous one
87 // hwtype: see enum extHWtypeT below
88 // return: true if everything went well
89
90typedef bool (__stdcall * pfnOpenHW) (void);
91 // return: true if everything went well
92
93typedef void (__stdcall * pfnCloseHW) (void);
94typedef int (__stdcall * pfnStartHW) (long extLOfreq);
95 // return: An integer specifying how many I/Q pairs are returned
96 // by the DLL each time the callback function is invoked (see later).
97 // This information is used of course only when the input data
98 // are not coming from the sound card, but through the callback device.
99 // If the number is negative, that means that an error has occurred,
100 // Winrad interrupts the starting process and returns to the
101 // idle status.
102 // The number of I/Q pairs must be at least 512, or an integer
103 // multiple of that value,
104
105typedef void (__stdcall * pfnStopHW) (void);
106typedef void (__stdcall * pfnSetCallback) (pfnExtIOCallback funcptr);
107typedef int (__stdcall * pfnSetHWLO) (long extLOfreq); // see also SetHWLO64
108 // return values:
109 // == 0: The function did complete without errors.
110 // < 0 (a negative number N):
111 // The specified frequency is lower than the minimum that
112 // the hardware is capable to generate. The absolute value
113 // of N indicates what is the minimum supported by the HW.
114 // > 0 (a positive number N):
115 // The specified frequency is greater than the maximum
116 // that the hardware is capable to generate. The value
117 // of N indicates what is the maximum supported by the HW.
118
119typedef int (__stdcall * pfnGetStatus) (void);
120 // This entry point is meant to allow the DLL to return a status
121 // information to Winrad, upon request.
122 // Presently it is never called by Winrad, though its existence
123 // is checked when the DLL is loaded. So it must implemented,
124 // even if in a dummy way.
125 // It is meant for future expansions, for complex HW that implement
126 // e.g. a preselector or some other controls other than a simple
127 // LO frequency selection.
128 // The return value is an integer that is application dependent.
129
130// optional functions, which can be implemented by ExtIO DLL
131// for performance reasons prefer not implementing rather then implementing empty functions
132// especially for RawDataReady
133typedef long (__stdcall * pfnGetHWLO) (void); // see also GetHWLO64
134typedef long (__stdcall * pfnGetHWSR) (void);
135typedef void (__stdcall * pfnRawDataReady) (long samprate, void *Ldata, void *Rdata, int numsamples);
136typedef void (__stdcall * pfnShowGUI) (void);
137typedef void (__stdcall * pfnHideGUI) (void);
138typedef void (__stdcall * pfnSwitchGUI) (void); // new: switch visibility of GUI
139typedef void (__stdcall * pfnTuneChanged) (long tunefreq); // see also TuneChanged64
140typedef long (__stdcall * pfnGetTune) (void); // see also GetTune64
141typedef void (__stdcall * pfnModeChanged) (char mode);
142typedef char (__stdcall * pfnGetMode) (void);
143typedef void (__stdcall * pfnIFLimitsChanged)(long lowfreq, long highfreq); // see also IFLimitsChanged64
144typedef void (__stdcall * pfnFiltersChanged) (int loCut, int hiCut, int pitch); // lo/hiCut relative to tuneFreq
145typedef void (__stdcall * pfnMuteChanged) (bool muted);
146typedef void (__stdcall * pfnGetFilters) (int& loCut, int& hiCut, int& pitch);
147
148// optional functions - extended for receivers with frequency range over 2147 MHz - used from HDSDR
149// these functions 64 bit functions are prefered rather than using the 32 bit ones
150// for other Winrad derivations you should additionally implement the above "usual" 32 bit functions
151typedef int (__stdcall * pfnStartHW64) (int64_t extLOfreq); // "StartHW64" with HDSDR >= 2.14
152typedef int64_t (__stdcall * pfnSetHWLO64) (int64_t extLOfreq);
153typedef int64_t (__stdcall * pfnGetHWLO64) (void);
154typedef void (__stdcall * pfnTuneChanged64) (int64_t tunefreq);
155typedef int64_t (__stdcall * pfnGetTune64) (void);
156typedef void (__stdcall * pfnIFLimitsChanged64) (int64_t lowfreq, int64_t highfreq);
157
158// optional functions - extended for high precision
159typedef int (__stdcall * pfnStartHW_dbl) (double extLOfreq);
160typedef double (__stdcall * pfnSetHWLO_dbl) (double extLOfreq);
161typedef double (__stdcall * pfnGetHWLO_dbl) (void);
162typedef void (__stdcall * pfnTuneChanged_dbl)(double tunefreq);
163typedef double (__stdcall * pfnGetTune_dbl) (void);
164typedef void (__stdcall * pfnIFLimitsChanged_dbl) (double lowfreq, double highfreq);
165
166
167// optional functions, which can be implemented by ExtIO DLL
168// following functions may get called from HDSDR 2.13 and above
169
170// "VersionInfo" is called - when existing - after successful InitHW()
171// with this information an ExtIO may check which extHWstatusT enums are properly processed from application
172// this call shall no longer be used to determine features of the SDR
173// use "ExtIoSDRInfo" for this purpose
174typedef void (__stdcall * pfnVersionInfo) (const char * progname, int ver_major, int ver_minor);
175
176
177// "GetAttenuators" allows HDSDR to display a knob or slider for Attenuation / Amplification
178// see & use extHw_Changed_ATT enum if ATT can get changed by ExtIO dialog window or from hardware
179#define EXTIO_MAX_ATT_GAIN_VALUES 128
180typedef int (__stdcall * pfnGetAttenuators) (int idx, float * attenuation); // fill in attenuation
181 // use positive attenuation levels if signal is amplified (LNA)
182 // use negative attenuation levels if signal is attenuated
183 // sort by attenuation: use idx 0 for highest attenuation / most damping
184 // this functions is called with incrementing idx
185 // - until this functions returns != 0, which means that all attens are already delivered
186typedef int (__stdcall * pfnGetActualAttIdx)(void); // returns -1 on error
187typedef int (__stdcall * pfnSetAttenuator) (int idx); // returns != 0 on error
188
189// "SetModeRxTx" will only get called after a successful activation with ActivateTx()
190// see extHw_TX_Request/extHw_RX_Request enums below if modehange can get triggered from user / hardware
191typedef int (__stdcall * pfnSetModeRxTx) (int modeRxTx); // see enum extHw_ModeRxTxT
192
193// generation and transmission of I/Q samples for TX mode requires activation of the ExtIO DLL
194// contact LC at hdsdr.de to ask for activation keys and algorithm
195typedef int (__stdcall * pfnActivateTx) (int magicA, int magicB);
196
197// (de)activate all bandpass filter to allow "bandpass undersampling" (with external analog bandpass filter)
198// intended for future use: it may get set automatically depending on LO frequency and the "ExtIO Frequency Options"
199// deactivation of bp/lp-filters when real LO (in HDSDR) is > ADC_Samplerate/2 in undersampling mode
200typedef int (__stdcall * pfnDeactivateBP) (int deactivate);
201 // deactivate == 1 to deactivate all bandpass and lowpass filters of hardware
202 // deactivate == 0 to reactivate automatic bandpass selection depending on frequency
203
204// optional "ExtIoGetSrates" is for replacing the Soundcard Samplerate values in the Samplerate selection dialog
205// by these values supported from the SDR hardware.
206// see & use extHw_Changed_SampleRate enum ... and "GetHWSR". Enumeration API as with "GetAttenuators"
207// intended for future use - actually not implemented/called
208#define EXTIO_MAX_SRATE_VALUES 32
209typedef int (__stdcall * pfnExtIoGetSrates) (int idx, double * samplerate); // fill in possible samplerates
210 // this functions is called with incrementing idx
211 // - until this functions returns != 0, which means that all srates are already delivered
212typedef int (__stdcall * pfnExtIoGetActualSrateIdx) (void); // returns -1 on error
213typedef int (__stdcall * pfnExtIoSetSrate) (int idx); // returns != 0 on error
214
215// optional function to get 3dB bandwidth from samplerate
216typedef long (__stdcall * pfnExtIoGetBandwidth) (int srate_idx); // returns <= 0 on error
217
218// optional function to get center (= IF frequency) of 3dB band in Hz - for non I/Q receivers with 0 center
219typedef long (__stdcall * pfnExtIoGetBwCenter) (int srate_idx); // returns 0 on error, which is default
220
221// optional function to get AGC Mode: AGC_OFF (always agc_index = 0), AGC_SLOW, AGC_MEDIUM, AGC_FAST, ...
222// this functions is called with incrementing idx
223// - until this functions returns != 0, which means that all agc modes are already delivered
224#define EXTIO_MAX_AGC_VALUES 16
225typedef int (__stdcall * pfnExtIoGetAGCs) (int agc_idx, char * text); // text limited to max 16 char
226typedef int (__stdcall * pfnExtIoGetActualAGCidx)(void); // returns -1 on error
227typedef int (__stdcall * pfnExtIoSetAGC) (int agc_idx); // returns != 0 on error
228// optional: HDSDR >= 2.62
229typedef int (__stdcall * pfnExtIoShowMGC)(int agc_idx); // return 1, to continue showing MGC slider on AGC
230 // return 0, is default for not showing MGC slider
231
232// for AGC in AGC_OFF (agc_idx == 0), which is (M)anual (G)ain (C)ontrol
233// sometimes referred as "IFgain" - as in SDR-14/IP
234#define EXTIO_MAX_MGC_VALUES 128
235typedef int (__stdcall * pfnExtIoGetMGCs)(int mgc_idx, float * gain); // fill in gain
236 // sort by ascending gain: use idx 0 for lowest gain
237 // this functions is called with incrementing idx
238 // - until this functions returns != 0, which means that all gains are already delivered
239typedef int (__stdcall * pfnExtIoGetActualMgcIdx) (void); // returns -1 on error
240typedef int (__stdcall * pfnExtIoSetMGC) (int mgc_idx); // returns != 0 on error
241
242
243// not used in HDSDR - for now
244// optional function to get 3dB band of Preselectors
245// this functions is called with incrementing idx
246// - until this functions returns != 0, which means that all preselectors are already delivered
247// ExtIoSetPresel() with idx = -1 to activate automatic preselector selection
248// ExtIoSetPresel() with valid idx (>=0) deactivates automatic preselection
249typedef int (__stdcall * pfnExtIoGetPresels) ( int idx, int64_t * freq_low, int64_t * freq_high );
250typedef int (__stdcall * pfnExtIoGetActualPreselIdx) ( void ); // returns -1 on error
251typedef int (__stdcall * pfnExtIoSetPresel) ( int idx ); // returns != 0 on error
252
253// not used in HDSDR - for now
254// optional function to get frequency ranges usable with SetHWLO(),
255// f.e. the FUNcube Dongle Pro+ should deliver idx 0: low=0.15 high=250 MHz and idx 1: low=420 high=1900 MHz
256// with a gap from 250MHz to 420 MHz. see http://www.funcubedongle.com/?page_id=1073
257// if extIO is told to set a not-supported frequency with SetHWLO(), then the extIO should callback with extHw_Changed_LO
258// and set a new frequency, which is supported
259// this functions is called with incrementing idx
260// - until this functions returns != 0, which means that all frequency ranges are already delivered
261typedef int (__stdcall * pfnExtIoGetFreqRanges) ( int idx, int64_t * freq_low, int64_t * freq_high );
262
263// not used in HDSDR - for now
264// optional function to get full samplerate of A/D Converter
265// useful to know with direct samplers in bandpass undersampling mode
266// example: Perseus = 80 000 000 ; SDR-14 = 66 666 667
267// return <= 0 if undersampling not supported (when preselectors not deactivatable)
268typedef double (__stdcall * pfnExtIoGetAdcSrate) ( void );
269
270// HDSDR >= 2.51
271// optional functions to receive and set all special receiver settings (for save/restore in application)
272// allows application and profile specific settings.
273// easy to handle without problems with newer Windows versions saving a .ini file below programs as non-admin-user
274// Settings shall be zero-terminated C-Strings.
275// example settings: USB-Identifier(for opening specific device), IP/Port, AGC, Srate, ..
276// idx in 0 .. 999 => NOT more than 1000 values storable!
277// description max 1024 char
278// value max 1024 char
279// these functions are called with incrementing idx: 0, 1, ...
280// until ExtIoGetSetting() returns != 0, which means that all settings are already delivered
281typedef int (__stdcall * pfnExtIoGetSetting) ( int idx, char * description, char * value ); // will be called (at least) before exiting application
282typedef void (__stdcall * pfnExtIoSetSetting) ( int idx, const char * value ); // before calling InitHW() !!!
283 // there will be an extra call with idx = -1, if theses functions are supported by the SDR app
284 // suggestion: use index 0 as ExtIO identifier (save/check ExtIO name) to allow fast skipping of all following SetSetting calls
285 // when this identifier does not match
286
287// not used in HDSDR - for now
288// handling of VFOs - see also extHw_Changed_VFO
289// VFOindex is in 0 .. numVFO-1
290typedef void (__stdcall * pfnExtIoVFOchanged) ( int VFOindex, int numVFO, int64_t extLOfreq, int64_t tunefreq, char mode );
291typedef int (__stdcall * pfnExtIoGetVFOindex)( void ); // returns new VFOindex
292
293
294// HDSDR > 2.70
295
296typedef void (__stdcall * pfnExtIoSDRInfo)( int extSDRInfo, int additionalValue, void * additionalPtr );
297
298
299
300
301// hwtype codes to be set with pfnInitHW
302// Please ask Alberto di Bene (i2phd@weaksignals.com) for the assignment of an index code
303// for cases different from the above.
304// note: "exthwUSBdataNN" don't need to be from USB. The keyword "USB" is just for historical reasons,
305// which may get removed later ..
306typedef enum
307{
308 exthwNone = 0
309 , exthwSDR14 = 1
310 , exthwSDRX = 2
311 , exthwUSBdata16 = 3 // the hardware does its own digitization and the audio data are returned to Winrad
312 // via the callback device. Data must be in 16-bit (short) format, little endian.
313 // each sample occupies 2 bytes (=16 bits) with values from -2^15 to +2^15 -1
314 , exthwSCdata = 4 // The audio data are returned via the (S)ound (C)ard managed by Winrad. The external
315 // hardware just controls the LO, and possibly a preselector, under DLL control.
316 , exthwUSBdata24 = 5 // the hardware does its own digitization and the audio data are returned to Winrad
317 // via the callback device. Data are in 24-bit integer format, little endian.
318 // each sample just occupies 3 bytes (=24 bits) with values from -2^23 to +2^23 -1
319 , exthwUSBdata32 = 6 // the hardware does its own digitization and the audio data are returned to Winrad
320 // via the callback device. Data are in 32-bit integer format, little endian.
321 // each sample occupies 4 bytes (=32 bits) but with values from -2^23 to +2^23 -1
322 , exthwUSBfloat32 = 7 // the hardware does its own digitization and the audio data are returned to Winrad
323 // via the callback device. Data are in 32-bit float format, little endian.
324 , exthwHPSDR = 8 // for HPSDR only!
325
326 // HDSDR > 2.70
327 , exthwUSBdataU8 = 9 // the hardware does its own digitization and the audio data are returned to Winrad
328 // via the callback device. Data must be in 8-bit (unsigned) format, little endian.
329 // intended for RTL2832U based DVB-T USB sticks
330 // each sample occupies 1 byte (=8 bit) with values from 0 to 255
331 , exthwUSBdataS8 = 10// the hardware does its own digitization and the audio data are returned to Winrad
332 // via the callback device. Data must be in 8-bit (signed) format, little endian.
333 // each sample occupies 1 byte (=8 bit) with values from -128 to 127
334 , exthwFullPCM32 = 11 // the hardware does its own digitization and the audio data are returned to Winrad
335 // via the callback device. Data are in 32-bit integer format, little endian.
336 // each sample occupies 4 bytes (=32 bits) with full range: from -2^31 to +2^31 -1
337} extHWtypeT;
338
339// status codes for pfnExtIOCallback; used when cnt < 0
340typedef enum
341{
342 // only processed/understood for SDR14
343 extHw_Disconnected = 0 // SDR-14/IQ not connected or powered off
344 , extHw_READY = 1 // IDLE / Ready
345 , extHw_RUNNING = 2 // RUNNING => not disconnected
346 , extHw_ERROR = 3 // ??
347 , extHw_OVERLOAD = 4 // OVERLOAD => not disconnected
348
349 // for all extIO's
350 , extHw_Changed_SampleRate = 100 // sampling speed has changed in the external HW
351 , extHw_Changed_LO = 101 // LO frequency has changed in the external HW
352 , extHw_Lock_LO = 102
353 , extHw_Unlock_LO = 103
354 , extHw_Changed_LO_Not_TUNE = 104 // CURRENTLY NOT YET IMPLEMENTED
355 // LO freq. has changed, Winrad must keep the Tune freq. unchanged
356 // (must immediately call GetHWLO() )
357 , extHw_Changed_TUNE = 105 // a change of the Tune freq. is being requested.
358 // Winrad must call GetTune() to know which value is wanted
359 , extHw_Changed_MODE = 106 // a change of demod. mode is being requested.
360 // Winrad must call GetMode() to know the new mode
361 , extHw_Start = 107 // The DLL wants Winrad to Start
362 , extHw_Stop = 108 // The DLL wants Winrad to Stop
363 , extHw_Changed_FILTER = 109 // a change in the band limits is being requested
364 // Winrad must call GetFilters()
365
366 // Above status codes are processed with Winrad 1.32.
367 // All Winrad derivation like WRplus, WinradF, WinradHD and HDSDR should understand them,
368 // but these do not provide version info with VersionInfo(progname, ver_major, ver_minor).
369
370 , extHw_Mercury_DAC_ON = 110 // enable audio output on the Mercury DAC when using the HPSDR
371 , extHw_Mercury_DAC_OFF = 111 // disable audio output on the Mercury DAC when using the HPSDR
372 , extHw_PC_Audio_ON = 112 // enable audio output on the PC sound card when using the HPSDR
373 , extHw_PC_Audio_OFF = 113 // disable audio output on the PC sound card when using the HPSDR
374
375 , extHw_Audio_MUTE_ON = 114 // the DLL is asking Winrad to mute the audio output
376 , extHw_Audio_MUTE_OFF = 115 // the DLL is asking Winrad to unmute the audio output
377
378 // Above status codes are processed with Winrad 1.33 and HDSDR
379 // Winrad 1.33 and HDSDR still do not provide their version with VersionInfo()
380
381
382 // Following status codes are processed when VersionInfo delivers
383 // 0 == strcmp(progname, "HDSDR") && ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 13 ) )
384
385 // all extHw_XX_SwapIQ_YYY callbacks shall be reported after each OpenHW() call
386 , extHw_RX_SwapIQ_ON = 116 // additionaly swap IQ - this does not modify the menu point / user selection
387 , extHw_RX_SwapIQ_OFF = 117 // the user selected swapIQ is additionally applied
388 , extHw_TX_SwapIQ_ON = 118 // additionaly swap IQ - this does not modify the menu point / user selection
389 , extHw_TX_SwapIQ_OFF = 119 // the user selected swapIQ is additionally applied
390
391
392 // Following status codes (for I/Q transceivers) are processed when VersionInfo delivers
393 // 0 == strcmp(progname, "HDSDR") && ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 13 ) )
394
395 , extHw_TX_Request = 120 // DLL requests TX mode / User pressed PTT
396 // exciter/transmitter must wait until SetModeRxTx() is called!
397 , extHw_RX_Request = 121 // DLL wants to leave TX mode / User released PTT
398 // exciter/transmitter must wait until SetModeRxTx() is called!
399 , extHw_CW_Pressed = 122 // User pressed CW key
400 , extHw_CW_Released = 123 // User released CW key
401 , extHw_PTT_as_CWkey = 124 // handle extHw_TX_Request as extHw_CW_Pressed in CW mode
402 // and extHw_RX_Request as extHw_CW_Released
403 , extHw_Changed_ATT = 125 // Attenuator changed => call GetActualAttIdx()
404
405
406 // Following status codes are processed when VersionInfo delivers
407 // 0 == strcmp(progname, "HDSDR") && ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 14 ) )
408
409#if 0
410 // Following status codes are for future use - actually not implemented !
411 // 0 == strcmp(progname, "HDSDR") && ( ver_major > 2 || ( ver_major == 2 && ver_minor >>> 14 ) )
412
413 // following status codes to change sampleformat at runtime
414 , extHw_SampleFmt_IQ_UINT8 = 126 // change sample format to unsigned 8 bit INT (Realtek RTL2832U)
415 , extHw_SampleFmt_IQ_INT16 = 127 // -"- signed 16 bit INT
416 , extHw_SampleFmt_IQ_INT24 = 128 // -"- signed 24 bit INT
417 , extHw_SampleFmt_IQ_INT32 = 129 // -"- signed 32 bit INT
418 , extHw_SampleFmt_IQ_FLT32 = 130 // -"- signed 16 bit FLOAT
419#endif
420 // following status codes to change channel mode at runtime
421 , extHw_RX_ChanMode_LEFT = 131 // left channel only
422 , extHw_RX_ChanMode_RIGHT = 132 // right channel only
423 , extHw_RX_ChanMode_SUM_LR = 133 // sum of left + right channel
424 , extHw_RX_ChanMode_I_Q = 134 // I/Q with left channel = Inphase and right channel = Quadrature
425 // last option set I/Q and clear internal swap as with extHw_RX_SwapIQ_OFF
426 , extHw_RX_ChanMode_Q_I = 135 // I/Q with right channel = Inphase and left channel = Quadrature
427 // last option set I/Q and internal swap as with extHw_RX_SwapIQ_ON
428
429 , extHw_Changed_RF_IF = 136 // refresh selectable attenuators and Gains
430 // => starts calling GetAttenuators(), GetAGCs() & GetMGCs()
431 , extHw_Changed_SRATES = 137 // refresh selectable samplerates => starts calling GetSamplerates()
432
433 // Following status codes are for 3rd Party Software, currently not implemented in HDSDR
434 , extHw_Changed_PRESEL = 138 // Preselector changed => call ExtIoGetActualPreselIdx()
435 , extHw_Changed_PRESELS = 139 // refresh selectable preselectors => start calling ExtIoGetPresels()
436 , extHw_Changed_AGC = 140 // AGC changed => call ExtIoGetActualAGCidx()
437 , extHw_Changed_AGCS = 141 // refresh selectable AGCs => start calling ExtIoGetAGCs()
438 , extHw_Changed_SETTINGS = 142 // settings changed, call ExtIoGetSetting()
439 , extHw_Changed_FREQRANGES = 143 // refresh selectable frequency ranges, call ExtIoGetFreqRanges()
440
441 , extHw_Changed_VFO = 144 // refresh selectable VFO => starts calling ExtIoGetVFOindex()
442
443 // Following status codes are processed when VersionInfo delivers
444 // 0 == strcmp(progname, "HDSDR") && ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 60 ) )
445 , extHw_Changed_MGC = 145 // MGC changed => call ExtIoGetMGC()
446
447} extHWstatusT;
448
449// codes for pfnSetModeRxTx:
450typedef enum
451{
452 extHw_modeRX = 0
453 , extHw_modeTX = 1
454} extHw_ModeRxTxT;
455
456
457// codes for pfnExt
458typedef enum
459{
460 extSDR_NoInfo = 0 // sign SDR features would be signed with subsequent calls
461 , extSDR_supports_Settings = 1
462 , extSDR_supports_Atten = 2 // RF Attenuation / Gain may be set via pfnSetAttenuator()
463 , extSDR_supports_TX = 3 // pfnSetModeRxTx() may be called
464 , extSDR_controls_BP = 4 // pfnDeactivateBP() may be called
465 , extSDR_supports_AGC = 5 // pfnExtIoSetAGC() may be called
466 , extSDR_supports_MGC = 6 // IF Attenuation / Gain may be set via pfnExtIoSetMGC()
467 , extSDR_supports_PCMU8 = 7 // exthwUSBdataU8 is supported
468 , extSDR_supports_PCMS8 = 8 // exthwUSBdataS8 is supported
469 , extSDR_supports_PCM32 = 9 // exthwFullPCM32 is supported
470} extSDR_InfoT;
471
472#endif /* LC_ExtIO_TypesH */
473