1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
|
/********************************************************************
* Copyright (C) 2012-2013 Texas Instruments Incorporated.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
* @defgroup DFE_FL_RX_API RX
* @ingroup DFE_FL_API
*/
/** @file dfe_fl_rx.h
*
* @path $(CSLPATH)\inc
*
* @brief Header file for functional layer of DFE_RX CSL
*
* Description
* - Function level symbolic constants, enumerations, structure definitions
* and function prototype declarations
*
*/
/* =============================================================================
* Revision History
* ===============
*
*
* =============================================================================
*/
/**
* @defgroup DFE_FL_RX_SYMBOL DFE Rx Symbols
* @ingroup DFE_FL_RX_API
*/
/**
* @defgroup DFE_FL_RX_DATASTRUCT DFE Rx Data Structures
* @ingroup DFE_FL_RX_API
*/
/**
* @defgroup DFE_FL_RX_ENUM DFE Rx Enumverated Data Types
* @ingroup DFE_FL_RX_API
*/
/**
* @defgroup DFE_FL_RX_FUNCTION DFE Rx Functions
* @ingroup DFE_FL_RX_API
*/
#ifndef _DFE_FL_RX_H_
#define _DFE_FL_RX_H_
#ifdef __cplusplus
extern "C" {
#endif
//#include <ti/csl/csl.h>
#include <ti/csl/cslr_dfe_rx.h>
#include <ti/drv/dfe/dfe_fl.h>
#include <ti/drv/dfe/dfe_fl_rxParams.h>
/**
* @addtogroup DFE_FL_RX_SYMBOL
* @{
*/
/// RX power meter result power is valid
#define DFE_FL_RX_POWMTR_RESULT_POWER_VALID 0x1u
/// RX power meter result magnitude square is valid
#define DFE_FL_RX_POWMTR_RESULT_MAGSQ_VALID 0x2u
/// RX power meter result histogram count1 is valid
#define DFE_FL_RX_POWMTR_RESULT_HISTCNT1_VALID 0x4u
/// RX power meter result histogram count2 is valid
#define DFE_FL_RX_POWMTR_RESULT_HISTCNT2_VALID 0x8u
/**
* @}
*/
/**
* @addtogroup DFE_FL_RX_ENUM
* @{
*/
/** @brief control commands
*/
typedef enum
{
///init clock gate, state, and clear data
DFE_FL_RX_CMD_CFG_INITS,
/// set signal ganerator sync source
DFE_FL_RX_CMD_SET_SIGGEN_SSEL,
/// set checksum sync source
DFE_FL_RX_CMD_SET_CHKSUM_SSEL,
/// set signal generator mode
DFE_FL_RX_CMD_SET_SIGGEN_MODE,
/// config signal generator ramp
DFE_FL_RX_CMD_CFG_SIGGEN_RAMP,
/// config checksum
DFE_FL_RX_CMD_CFG_CHKSUM,
/// Set testbus top control
DFE_FL_RX_CMD_SET_TOP_TEST_CTRL,
/// set testbus imbalance control
DFE_FL_RX_CMD_SET_IMB_TEST_CTRL,
/// set testbus feagc dc control
DFE_FL_RX_CMD_SET_FEAGC_DC_TEST_CTRL,
/// enable power meter interrupt
DFE_FL_RX_CMD_ENB_POWMTR_INTR,
/// disable power meter interrupt
DFE_FL_RX_CMD_DIS_POWMTR_INTR,
/// force generating power meter interrupt
DFE_FL_RX_CMD_SET_FORCE_POWMTR_INTR,
/// clear force generating power meter interrupt
DFE_FL_RX_CMD_CLR_FORCE_POWMTR_INTR,
/// clear power meter interrupt status
DFE_FL_RX_CMD_CLR_POWMTR_INTR_STATUS,
/// set power meter sync source
DFE_FL_RX_CMD_SET_POWMTR_SSEL,
/// config power meter global
DFE_FL_RX_CMD_CFG_POWMTR_GLOBAL,
/// set done reading power meter (HW interrupt mode)
DFE_FL_RX_CMD_SET_POWMTR_HANDSHAKE_DONE,
/// set read request to power meter (SW handshake mode)
DFE_FL_RX_CMD_SET_POWMTR_HANDSHAKE_READ_REQ,
/// config a power meter
DFE_FL_RX_CMD_CFG_POWMTR,
/// set one shot of power meter
DFE_FL_RX_CMD_SET_ONE_SHOT_MODE,
/// set meter mode of a power meter
DFE_FL_RX_CMD_SET_METER_MODE,
/// program switch bypass
DFE_FL_RX_CMD_SET_SWITCH_BYPASS,
/// set Rx NCO sync source
DFE_FL_RX_CMD_SET_NCO_SSEL,
/// program Rx NCO bypass
DFE_FL_RX_CMD_SET_NCO_BYPASS,
/// enable disable Rx NCO dither
DFE_FL_RX_CMD_ENB_NCO_DITHER,
/// program Rx NCO frequency
DFE_FL_RX_CMD_CFG_NCO_FREQ,
/// set Rx EQR sync source
DFE_FL_RX_CMD_SET_EQR_SSEL,
/// program Rx EQR bypass
DFE_FL_RX_CMD_SET_EQR_BYPASS,
/// program Rx EQR bypass
DFE_FL_RX_CMD_CFG_EQR_TAPS,
/// program Rx EQR shift (gain)
DFE_FL_RX_CMD_SET_EQR_SHIFT,
/// set DC_GSG sync source
DFE_FL_RX_CMD_SET_DC_GSG_SSEL,
/// set DKACC sync source
DFE_FL_RX_CMD_SET_DKACC_SSEL,
DFE_FL_RX_CMD_MAX_VALUE
} DfeFl_RxHwControlCmd;
/** @brief query commands
*/
typedef enum
{
/// read check sum result
DFE_FL_RX_QUERY_CHKSUM_RESULT = 0,
/// get power meter interrupt status
DFE_FL_RX_QUERY_POWMTR_INTR_STATUS,
/// get power meter read miss (HW interrupt mode)
DFE_FL_RX_QUERY_POWMTR_HANDSHAKE_READ_MISS,
/// get power meter read ACK (SW handshake mode)
DFE_FL_RX_QUERY_POWMTR_HANDSHAKE_READ_ACK,
/// read power meter result
DFE_FL_RX_QUERY_POWMTR_RESULT,
/// read power meter configuration
DFE_FL_RX_QUERY_GET_POWMTR,
/// get the NCO bypass
DFE_FL_RX_QUERY_GET_NCO_BYPASS,
/// get Rx NCO sync source
DFE_FL_RX_QUERY_NCO_SSEL,
/// get Rx EQR shift value
DFE_FL_RX_QUERY_EQR_SHIFT,
DFE_FL_RX_QUERY_MAX_VALUE
} DfeFl_RxHwStatusQuery;
/** @brief DC Canceller device */
typedef enum
{
/// DC canceller 0
DFE_FL_RX_DC_0 = 0 ,
/// DC canceller 1
DFE_FL_RX_DC_1,
/// DC canceller 2
DFE_FL_RX_DC_2,
/// DC canceller 3
DFE_FL_RX_DC_3,
/// DC canceller ALL
DFE_FL_RX_DC_ALL = 0xF
} DfeFl_RxDc;
/** @brief sig-gen device */
typedef enum
{
/// signal generator on I bus
DFE_FL_RX_SIGGEN_I = 0,
/// signal generator on Q bus
DFE_FL_RX_SIGGEN_Q
} DfeFl_RxSiggenDev;
/** @brief sig-gen mode enable */
typedef enum
{
/// signal generator enable mode, normal
DFE_FL_RX_SIGGEN_MODE_ENABLE_NORMAL = 0 ,
/// signal generator enable mode, sig-gen
DFE_FL_RX_SIGGEN_MODE_ENABLE_SIGGEN
} DfeFl_RxSiggenModeEnable;
/** @brief sig-gen mode frame */
typedef enum
{
/// signal generator frame mode, normal
DFE_FL_RX_SIGGEN_MODE_FRAME_NORMAL = 0 ,
/// signal generator frame mode, sig-gen
DFE_FL_RX_SIGGEN_MODE_FRAME_SIGGEN
} DfeFl_RxSiggenModeFrame;
/** @brief sig-gen mode ramp */
typedef enum
{
/// signal generator ramp mode, LFSR
DFE_FL_RX_SIGGEN_MODE_RAMP_NORMAL_LFSR = 0 ,
/// signal generator ramp mode, RAMP
DFE_FL_RX_SIGGEN_MODE_RAMP_RAMP
} DfeFl_RxSiggenModeRamp;
/** @brief Top Test Ctrl */
typedef enum
{
/// Rx testbus top select, off (normal mode)
DFE_FL_RX_TOP_TEST_CTRL_RXN = 0 ,
/// Rx testbus top select, BDC_F1
DFE_FL_RX_TOP_TEST_CTRL_BDC_F1,
/// Rx testbus top select, BDC_F2
DFE_FL_RX_TOP_TEST_CTRL_BDC_F2,
/// Rx testbus top select, IMB
DFE_FL_RX_TOP_TEST_CTRL_IMB,
/// Rx testbus top select, FEAGC
DFE_FL_RX_TOP_TEST_CTRL_FEAGC_TEST,
/// Rx testbus top select, FEAGC_IN
DFE_FL_RX_TOP_TEST_CTRL_FEAGC_IN,
/// Rx testbus top select, FEAGC_OUT
DFE_FL_RX_TOP_TEST_CTRL_FEAGC_OUT,
/// Rx testbus top select, DVGA_OUT
DFE_FL_RX_TOP_TEST_CTRL_DVGA_OUT,
/// Rx testbus top select, real to complex
DFE_FL_RX_TOP_TEST_CTRL_BDC_R2C,
/// Rx testbus top select, switch
DFE_FL_RX_TOP_TEST_CTRL_BDC_SW,
/// Rx testbus top select, BDC_NCO
DFE_FL_RX_TOP_TEST_CTRL_BDC_NCO_MIX
} DfeFl_RxTestCtrl;
/** @brief IMB Test Ctrl */
typedef enum
{
/// IMB testbus select, none
DFE_FL_RX_IMB_TEST_CTRL_NO_SEL = 0x0 ,
/// IMB testbus select, IMB_INPUT
DFE_FL_RX_IMB_TEST_CTRL_INPUT = 0x1,
/// IMB testbus select, IMB_OUTPUT
DFE_FL_RX_IMB_TEST_CTRL_OUTPUT = 0x2,
/// IMB testbus select, INTERNAL_S
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_S = 0x100,
/// IMB testbus select, INTERNAL_DCI
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_DCI = 0x101,
/// IMB testbus select, INTERNAL_DCQ
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_DCQ = 0x102,
/// IMB testbus select, INTERNAL_RMS
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_RMS = 0x103,
/// IMB testbus select, INTERNAL_DCMID
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_DCMID = 0x104,
/// IMB testbus select, INTERNAL_EACC
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_EACC = 0x105,
/// IMB testbus select, INTERNAL_E
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_E = 0x106,
/// IMB testbus select, INTERNAL_WACC
DFE_FL_RX_IMB_TEST_CTRL_INTERNAL_WACC = 0x107
} DfeFl_RxImbTestCtrl;
/** @brief feagc Test Ctrl */
typedef enum
{
/// feagc testbus select, lagecy GC5330
DFE_FL_RX_FEAGC_TEST_CTRL_5330 = 0x100 ,
/// feagc testbus select, DCIN_REAL
DFE_FL_RX_FEAGC_TEST_CTRL_DCIN_REAL = 0x101,
/// feagc testbus select, DCIN_IMAG
DFE_FL_RX_FEAGC_TEST_CTRL_DCIN_IMAG = 0x102,
/// feagc testbus select, DCCORR_S0
DFE_FL_RX_FEAGC_TEST_CTRL_DCCORR_S0 = 0x103,
/// feagc testbus select, DCCORR_S1
DFE_FL_RX_FEAGC_TEST_CTRL_DCCORR_S1 = 0x104,
/// feagc testbus select, DCCORR_S2
DFE_FL_RX_FEAGC_TEST_CTRL_DCCORR_S2 = 0x105,
/// feagc testbus select, DCCORR_S3
DFE_FL_RX_FEAGC_TEST_CTRL_DCCORR_S3 = 0x106,
/// feagc testbus select, DCOUT
DFE_FL_RX_FEAGC_TEST_CTRL_DCOUT = 0x107,
/// feagc testbus select, NOTCH_REAL
DFE_FL_RX_FEAGC_TEST_CTRL_NOTCH_REAL = 0x108,
/// feagc testbus select, NOTCH_IMAG
DFE_FL_RX_FEAGC_TEST_CTRL_NOTCH_IMAG = 0x109,
/// feagc testbus select, POWERIN
DFE_FL_RX_FEAGC_TEST_CTRL_POWERIN = 0x10a,
/// feagc testbus select, ERRMAPIN
DFE_FL_RX_FEAGC_TEST_CTRL_ERRMAPIN = 0x10b,
/// feagc testbus select, GAINLOOP
DFE_FL_RX_FEAGC_TEST_CTRL_GAINLOOP = 0x10c,
/// feagc testbus select, PEAKCNT
DFE_FL_RX_FEAGC_TEST_CTRL_PEAKCNT = 0x10d,
/// feagc testbus select, PEAKDECT
DFE_FL_RX_FEAGC_TEST_CTRL_PEAKDECT = 0x10e,
/// feagc testbus select, PEAKCNTIN
DFE_FL_RX_FEAGC_TEST_CTRL_PEAKCNTIN = 0x10f
} DfeFl_RxFeagcDcTestCtrl;
/** @brief power meter device */
typedef enum
{
/// RX power meter 0
DFE_FL_RX_POWMTR_0 = 0,
/// RX power meter 1
DFE_FL_RX_POWMTR_1,
/// RX power meter 2
DFE_FL_RX_POWMTR_2,
/// RX power meter 3
DFE_FL_RX_POWMTR_3
} DfeFl_RxPowmtrDev;
/** @brief power meter read mode */
typedef enum
{
/// Rx power meter read mode, INTERRUPT
DFE_FL_RX_POWMTR_READ_MODE_INTERRUPT = 0,
/// Rx power meter read mode, HANDSHAKE
DFE_FL_RX_POWMTR_READ_MODE_HANDSHAKE
} DfeFl_RxPowmtrReadMode;
/** @brief Rx NCO device */
typedef enum
{
/// Rx NCO 0
DFE_FL_RX_NCO_0 = 0,
/// Rx NCO 1
DFE_FL_RX_NCO_1,
/// Rx NCO 2
DFE_FL_RX_NCO_2,
/// Rx NCO 3
DFE_FL_RX_NCO_3
} DfeFl_RxNcoDev;
/** @brief Rx EQR device */
typedef enum
{
/// Rx EQR 0
DFE_FL_RX_EQR_0 = 0,
/// Rx EQR 1
DFE_FL_RX_EQR_1,
/// Rx EQR 2
DFE_FL_RX_EQR_2,
/// Rx EQR 3
DFE_FL_RX_EQR_3
} DfeFl_RxEqrDev;
/** @brief Rx EQR shift value */
typedef enum
{
/// Rx EQR shift value, 0.5
DFE_FL_RX_EQR_SHIFT_0P5 = 0,
// Rx EQR shift value, 1.0
DFE_FL_RX_EQR_SHIFT_1X,
// Rx EQR shift value, 2.0
DFE_FL_RX_EQR_SHIFT_2X,
// Rx EQR shift value, 4.0
DFE_FL_RX_EQR_SHIFT_4X
} DfeFl_RxEqrShift;
/**
* @}
*/
/**
* @addtogroup DFE_FL_RX_DATASTRUCT
* @{
*/
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_SET_SIGGEN_MODE
*/
typedef struct
{
/// sig-gen device
uint32_t sigGen;
/// enable/disble
uint32_t enable;
/// frame mode
uint32_t frame;
/// ramp mode
uint32_t ramp;
/// frame length
uint32_t frameLen;
} DfeFl_RxSiggenMode;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_CFG_SIGGEN_RAMP
*/
typedef struct
{
/// sig-gen device
uint32_t sigGen;
/// ramp start
uint32_t rampStart;
/// ramp stop
uint32_t rampStop;
/// ramp increment
uint32_t rampIncr;
/// pulse width
uint32_t pulseWidth;
} DfeFl_RxSiggenRampConfig;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_CFG_CHKSUM
*/
typedef struct
{
/// checksum mode
uint32_t chksumMode;
/// config latency mode
struct
{
/// stable length
uint32_t stableLen;
/// signal length
uint32_t signalLen;
/// channel select
uint32_t chanSel;
} latencyMode;
} DfeFl_RxChksumConfig;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_CFG_POWMTR_GLOBAL
*/
typedef struct
{
/// HW interrupt or SW handshake
uint32_t readMode;
/// histogram threshold 1
uint32_t histThresh1;
/// histogram threshold 2
uint32_t histThresh2;
} DfeFl_RxPowmtrGlobalConfig;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_SET_POWMTR_SSEL
* DFE_FL_RX_CMD_SET_POWMTR_HANDSHAKE_DONE
* DFE_FL_RX_CMD_SET_POWMTR_HANDSHAKE_READ_REQ
*
* DFE_FL_RX_QUERY_POWMTR_INTR_STATUS
* DFE_FL_RX_QUERY_POWMTR_HANDSHAKE_READ_MISS
* DFE_FL_RX_QUERY_POWMTR_HANDSKAHE_READ_ACK
*
*/
typedef struct
{
/// power meter device
uint32_t powmtr;
/// set or get value
uint32_t data;
} DfeFl_RxPowmtrGeneric;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_CFG_POWMTR
*/
typedef struct
{
/// power meter device
uint32_t powmtr;
/// delay from sync
uint32_t syncDelay;
/// samples for integration
uint32_t nSamples;
/// samples for interval
uint32_t interval;
} DfeFl_RxPowmtrConfig;
/** @brief argument for runtime control,
* DFE_FL_RX_QUERY_POWMTR_RESULT
*/
typedef struct
{
/// power meter device
uint32_t powmtr;
/// valid bit flag
uint32_t valid;
/// summation of power
uint64_t power;
/// max peak
uint64_t magsq;
/// count of samples that above threshold 1
uint32_t histcnt1;
/// count of samples that above threshold 2
uint32_t histcnt2;
} DfeFl_RxPowmtrResult;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_SET_NCO_SSEL
* DFE_FL_RX_QUERY_NCO_SSEL
*/
typedef struct
{
/// sync select for dither
uint32_t sselDither;
/// sync select for phase
uint32_t sselPhase;
/// sync select for frequency
uint32_t sselFreq;
} DfeFl_RxNcoSsel;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_ENB_NCO_DITHER
*/
typedef struct
{
/// nco device
uint32_t nco;
/// enable or disable
uint32_t enable;
} DfeFl_RxNcoDitherConfig;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_CFG_NCO_FREQ
*/
typedef struct
{
/// nco device
uint32_t nco;
/// frequency word
uint64_t freqWord;
} DfeFl_RxNcoFreqWord;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_SET_EQR_SSEL
* DFE_FL_RX_CMD_SET_EQR_SHIFT
*/
typedef struct
{
/// eqr device
uint32_t eqr;
/// get or set value
uint32_t data;
} DfeFl_RxEqrGeneric;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_CFG_EQR_TAPS
*/
typedef struct
{
/// eqr device
uint32_t eqr;
/// eqr taps for ii
uint32_t iiTaps[DFE_FL_RX_EQR_LEN];
/// eqr taps for iq
uint32_t iqTaps[DFE_FL_RX_EQR_LEN];
/// eqr taps for qi
uint32_t qiTaps[DFE_FL_RX_EQR_LEN];
/// eqr taps for qq
uint32_t qqTaps[DFE_FL_RX_EQR_LEN];
} DfeFl_RxEqrTapsConfig;
/** @brief argument for runtime control,
* DFE_FL_RX_CMD_SET_DKACC_SSEL
*/
typedef struct
{
/// DC device
uint32_t dc;
/// get or set value
uint32_t data;
} DfeFl_RxDcGeneric;
/** @brief overlay register pointer to BB instance
*/
typedef CSL_DFE_RX_REGS *DfeFl_RxRegsOvly;
/** @brief a Rx Object of Digital radio Front End (DFE) */
typedef struct
{
/// handle to DFE global
DfeFl_Handle hDfe;
/// pointer to register base address of a RX instance
DfeFl_RxRegsOvly regs;
/// This is the instance of RX being referred to by this object
DfeFl_InstNum perNum;
} DfeFl_RxObj;
/** @brief handle pointer to BB object
*/
typedef DfeFl_RxObj *DfeFl_RxHandle;
/**
* @}
*/
/**
* @addtogroup DFE_FL_RX_FUNCTION
* @{
*/
//DfeFl_Status dfeFl_RxInit();
DfeFl_RxHandle dfeFl_RxOpen
(
DfeFl_Handle hDfe,
DfeFl_RxObj *pDfeRxObj,
DfeFl_InstNum rxNum,
DfeFl_Status *pStatus
);
DfeFl_Status dfeFl_RxClose(DfeFl_RxHandle hDfeRx);
DfeFl_Status dfeFl_RxHwControl
(
DfeFl_RxHandle hDfeRx,
DfeFl_RxHwControlCmd ctrlCmd,
void *arg
);
DfeFl_Status dfeFl_RxGetHwStatus
(
DfeFl_RxHandle hDfeRx,
DfeFl_RxHwStatusQuery queryId,
void *arg
);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* _DFE_FL_RX_H_ */
|