source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/ads/bads.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 67.7 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2005-2012, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bads.h $
11 * $brcm_Revision: Hydra_Software_Devel/72 $
12 * $brcm_Date: 3/5/12 5:27p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/portinginterface/ads/bads.h $
19 *
20 * Hydra_Software_Devel/72   3/5/12 5:27p atanugul
21 * SW3128-130: Add feGain and digitalAgcGain fields to ADS status and
22 * increase the resolution for equalizerGain units to 1/100th of dB
23 *
24 * Hydra_Software_Devel/71   2/16/12 6:14p atanugul
25 * SW3128-124: Update description for BADS_GetScanStatus()
26 *
27 * Hydra_Software_Devel/70   2/15/12 3:11p atanugul
28 * SW3128-123: Fix description for dsChannelPower
29 *
30 * Hydra_Software_Devel/69   2/15/12 2:57p atanugul
31 * SW3128-123: Add accCleanCount to BADS_STATUS structure
32 *
33 * Hydra_Software_Devel/68   2/14/12 10:42a atanugul
34 * SW3128-119: Update SetAcquireParams API to make the second parameter as
35 * const
36 *
37 * Hydra_Software_Devel/67   2/8/12 5:14p atanugul
38 * SW3128-119: Implement new apis for SetAcquireParams, GetAcquireParams
39 * and GetDefaultAcquireParams
40 *
41 * Hydra_Software_Devel/66   1/25/12 3:32p atanugul
42 * SW7425-2260: Update majVer and minVer in BADS_Version structure to be
43 * uint32_t
44 *
45 * Hydra_Software_Devel/65   1/10/12 4:56p atanugul
46 * SW3128-107:Enable HAB CRC Check in PI
47 *
48 * Hydra_Software_Devel/64   12/22/11 3:37p atanugul
49 * SW3128-100: Check for power status before sending HAB commands
50 *
51 * Hydra_Software_Devel/63   12/8/11 3:12p atanugul
52 * SW3128-89: Add PI support for Spectrum Analyzer Data retrieval
53 *
54 * Hydra_Software_Devel/62   11/16/11 4:23p atanugul
55 * SW3461-79: Add No Signal to GetLockStatus()
56 *
57 * Hydra_Software_Devel/61   11/3/11 3:07p atanugul
58 * SW3128-2: Add familyId to BADS_Version and change chipId to type
59 * uint32_t
60 *
61 * Hydra_Software_Devel/60   10/5/11 3:53p atanugul
62 * SW3128-50: Update BADS_312x_GetScanStatus()
63 *
64 * Hydra_Software_Devel/59   9/15/11 3:19p atanugul
65 * SW3128-50: Add BADS_GetScanStatus()
66 *
67 * Hydra_Software_Devel/58   8/31/11 5:42p nickh
68 * SW7425-1129: Expose 3255 RPC call that returns the number of bonded
69 * channels reserved for Docsis
70 *
71 * Hydra_Software_Devel/57   7/6/11 3:18p vishk
72 * SW7125-983: SW7125-1017: [Kbro 7019] Tuner 3109 AGC Return Value Not
73 * Accurate Accumulated counters for 7125 & 3255 frontends
74 *
75 * Hydra_Software_Devel/56   6/27/11 10:28a atanugul
76 * SW3128-21: Add minor AP version to BADS_Version
77 *
78 * Hydra_Software_Devel/55   5/27/11 1:57p vishk
79 * SW7231-180: Remove duplicate member variables in bads.h and convert
80 * BADS_AutomaticFrequencyOffset and NEXUS_FrontendQamFrequencyOffset
81 * enum types to unsigned integer.
82 *
83 * Hydra_Software_Devel/54   5/26/11 5:16p vishk
84 * SW3128-2: update variables according to naming convention. Introduced
85 * BADS_AutomaticFrequencyOffset_eVariable for variable frequency
86 * offset/carrier range.
87 *
88 * Hydra_Software_Devel/53   5/16/11 2:52p atanugul
89 * SW3128-2: update variables according to naming convention
90 *
91 * Hydra_Software_Devel/52   5/16/11 12:52p farshidf
92 * SWDTV-7035: update naming convention
93 *
94 * Hydra_Software_Devel/51   5/11/11 11:35a vishk
95 * SWDTV-6857: waring fix and add BADS_Acquire_Type_eLast
96 *
97 * Hydra_Software_Devel/50   5/6/11 4:23p farshidf
98 * SWDTV-6857: waring fix
99 *
100 * Hydra_Software_Devel/49   5/6/11 2:22p farshidf
101 * SWDTV-6857: merge main
102 *
103 * Hydra_Software_Devel/SWDTV-6857/1   5/6/11 2:01p farshidf
104 * SWDTV-6857: add the scan structure and Calls
105 *
106 * Hydra_Software_Devel/48   4/25/11 6:22p farshidf
107 * SWDTV-6191: update the ADS callback
108 *
109 * Hydra_Software_Devel/47   2/1/11 2:14p atanugul
110 * SW3128-2: Add Support for BCM3128
111 *
112 * Hydra_Software_Devel/46   12/2/10 12:20p mward
113 * SW7125-728: Add Annex C support.
114 *
115 * Hydra_Software_Devel/45   11/24/10 8:07p agin
116 * SW7405-5021:  Allow 7405 host to control LNA via 31xx tuner/demod
117 * chips.
118 *
119 * Hydra_Software_Devel/44   10/28/10 4:26p VISHK
120 * SW7420-1020: Request for non-blocking call support in Nexus frontend
121 *
122 * Hydra_Software_Devel/43   10/22/10 11:12a VISHK
123 * SW7420-1020: Request for non-blocking call support in Nexus frontend
124 *
125 * Hydra_Software_Devel/42   10/21/10 6:56p vishk
126 * SW7420-1020: Request for non-blocking call support in Nexus frontend
127 *
128 * Hydra_Software_Devel/41   10/5/10 7:30p VISHK
129 * SW7405-4915: Add nexus api to control power saver mode in downstream
130 * demod and tuner, out of banddemod and tuner and upstream. Also add
131 * nexus api to control daisy chaining of the frontends.
132 *
133 * Hydra_Software_Devel/40   9/21/10 11:17a farshidf
134 * SW7550-573: merge to main
135 *
136 * Hydra_Software_Devel/SW7550-573/1   9/17/10 1:46p pinglong
137 * SW7550-573: add corrected bits for QAM status
138 *
139 * Hydra_Software_Devel/39   9/1/10 2:06p VISHK
140 * SW7405-4839: To change the default frequncy offset.
141 *
142 * Hydra_Software_Devel/38   8/30/10 4:01p farshidf
143 * SW7550-543: merge to main branch
144 *
145 * Hydra_Software_Devel/37   8/24/10 11:31a VISHK
146 * SW7405-4808 : Connect reset status api for ADS and AOB to nexus api.
147 *
148 * Hydra_Software_Devel/36   8/5/10 4:41p VISHK
149 * SW7405-4722: Add support for "Frequency offset" and "Null packets" for
150 * ADS and expose "auto acquire" in nexus for AOB
151 * Hydra_Software_Devel/SW7550-543/2   8/30/10 3:27p farshidf
152 * SW7550-543: change the stopTimer to untune
153 *
154 * Hydra_Software_Devel/SW7550-543/1   8/27/10 4:55p pinglong
155 * SW7550-543: support channel switch between QAM and OFDM on bcm97590
156 *
157 * Hydra_Software_Devel/35   7/2/10 4:28p vishk
158 * SW7420-873: Add support to inform application to update frontend tuner
159 * gain and to inform that there is no signal to tune upon multiple tries
160 * to acquire
161 *
162 * Hydra_Software_Devel/34   6/25/10 2:28p farshidf
163 * SW7550-475: add the symbolRateError for QAM status
164 *
165 * Hydra_Software_Devel/33   4/14/10 4:43p farshidf
166 * SW7550-38: merge the ADS changes requires for 7550
167 *
168 * Hydra_Software_Devel/ADS_7550_40_9/1   4/14/10 3:29p cbrooks
169 * Fixed AGC
170 *
171 * Hydra_Software_Devel/32   2/11/10 11:02a farshidf
172 * SW7550-262: add the re-acquire feature for 7550 QAM code
173 *
174 * Hydra_Software_Devel/31   1/21/10 1:48p VISHK
175 * SW7405-3596: To make QAM auto acquire a user configurable parameter
176 * from Nexus
177 *
178 * Hydra_Software_Devel/30   1/13/10 6:58p VISHK
179 * SW7405-3722: BCM3109: Signal power reported is not correct
180 *
181 * Hydra_Software_Devel/29   12/31/09 3:08p VISHK
182 * SW7550-135: Support 7550 QAM/DVB-C support in Nexus
183 *
184 * Hydra_Software_Devel/29   12/31/09 3:07p VISHK
185 * SW7550-135: Support 7550 QAM/DVB-C support in Nexus
186 *
187 * Hydra_Software_Devel/28   12/3/09 6:31p farshidf
188 * SW7550-38: initial ADS code
189 *
190 * Hydra_Software_Devel/27   12/1/09 4:27p farshidf
191 * SW7550-38: compile fix
192 *
193 * Hydra_Software_Devel/26   12/1/09 4:25p farshidf
194 * SW7550-38: add the settings for 7550
195 *
196 * Hydra_Software_Devel/25   11/18/09 6:08p farshidf
197 * SW7550-38: add the 7550 ADS code
198 *
199 * Hydra_Software_Devel/24   11/5/09 1:46p VISHK
200 * SW7405-3210: BADS_31xx_GetStatus not returning values for
201 * correctedCount, uncorrectedCount and berRawCount
202 *
203 * Hydra_Software_Devel/23   9/15/09 4:34p vishk
204 * SW7405-2852: 31xx: ADS add support configure of Parallel or Serial
205 * Downstream interface.
206 *
207 * SW7405-3009:Need to be able to shut down bcm3117 GPIO_00 to reduce
208 * potential FCC concern.
209 *
210 * Hydra_Software_Devel/22   9/14/09 2:29p vishk
211 * SW7405-2852: 31xx: ADS add support configure of Parallel or Serial
212 * Downstream interface.
213 *
214 * SW7405-3009:Need to be able to shut down bcm3117 GPIO_00 to reduce
215 * potential FCC concern.
216 *
217 * Hydra_Software_Devel/21   8/25/09 11:19a vishk
218 * SW7405-2839: Bcm31xx: Add Power Management support for ADS
219 *
220 * Hydra_Software_Devel/20   8/24/09 3:44p vishk
221 * SW7405-2839: Bcm31xx: Add Power Management support for ADS
222 *
223 * Hydra_Software_Devel/20   8/21/09 6:24p vishk
224 * PR 57482: Bcm31xx: Add Power Management support for ADS
225 *
226 * Hydra_Software_Devel/19   6/29/09 5:25p vishk
227 * PR 56070: BCM31xx: Need to read dsChannelPower
228 *
229 * Hydra_Software_Devel/18   6/17/09 11:26a vishk
230 * PR 55960: Need to query spectrumInverted setting for BCM31xx
231 *
232 * Hydra_Software_Devel/17   6/16/09 4:38p vishk
233 * PR 55960: Need to query spectrumInverted setting for BCM31xx
234 *
235 * Hydra_Software_Devel/16   2/24/09 3:23p vishk
236 * PR 46431: ADS PI: Add support for BCM3117, BCM3114, and BCM3112.
237 * PR 46436: AOB PI: Add support for BCM3117 and BCM3114
238 *
239 * Hydra_Software_Devel/15   2/20/09 4:43p vishk
240 * PR 46431: ADS PI: Add support for BCM3117, BCM3114, and BCM3112.
241 * PR 46436: AOB PI: Add support for BCM3117 and BCM3114
242 *
243 * Hydra_Software_Devel/14   2/20/09 4:34p vishk
244 * PR 46431: ADS PI: Add support for BCM3117, BCM3114, and BCM3112.
245 * PR 46436: AOB PI: Add support for BCM3117 and BCM3114
246 *
247 * Hydra_Software_Devel/13   1/29/09 7:23p vishk
248 * PR 46431: ADS PI: Add support for BCM3117, BCM3114, and BCM3112.
249 * PR 46436: AOB PI: Add support for BCM3117 and BCM3114
250 *
251 * Hydra_Software_Devel/12   10/13/08 11:41a anilmm
252 * PR47842: BER calculation software implementation
253 *
254 * Hydra_Software_Devel/11   5/27/08 4:27p haisongw
255 * PR43047: Add two parameters in BADS_GetStatus() to sync up with 325X
256 * docsis 2.0.0 release
257 *
258 * Hydra_Software_Devel/10   12/20/07 6:02p haisongw
259 * PR36061: speed up 325x QAM acqusition time
260 *
261 * Hydra_Software_Devel/9   10/12/07 1:28p haisongw
262 * PR36060: add OCAP DPM support for three 3420 tuners
263 *
264 * Hydra_Software_Devel/8   9/7/07 3:03p haisongw
265 * PR28691: adding comments for BADS_EnablePowerSaver()
266 *
267 * Hydra_Software_Devel/7   5/10/07 6:22p haisongw
268 * PR30640: Add an option to enable/disable 325X ADS auto-reacquiring
269 *
270 * Hydra_Software_Devel/6   4/16/07 6:12p haisongw
271 * PR25049: SetTop API function btuner_get_qam_status() returns incomplete
272 * information
273 *
274 * Hydra_Software_Devel/5   6/27/06 3:08p haisongw
275 * PR22368: Add AOB, AUS and TNR3255ob support.
276 *
277 * Hydra_Software_Devel/4   6/26/06 6:24p haisongw
278 * PR 20984: Update DocJet comments
279 *
280 * Hydra_Software_Devel/3   5/12/06 5:32p haisongw
281 * PR 20984: fix DocJet errors
282 *
283 * Hydra_Software_Devel/2   4/11/06 4:53p dlwin
284 * PR 19978: Merge 3255 support.
285 *
286 * Hydra_Software_Devel/PROD_DSG_REFSW_Devel/1   4/3/06 4:18p haisongw
287 * PR 19978:add  tuner Settop API support on BCM97455 platform
288 *
289 * Hydra_Software_Devel/1   12/13/05 2:56p dlwin
290 * PR 18598: Add new ADS for 3255
291 *
292 ***************************************************************************/
293
294/*= Module Overview *********************************************************
295<verbatim>
296
297Overview
298The Advance Qam inband DownStream (ADS) receiver represents one of the components
299that makes up the Front End subsystem of a SetTop Box.  The ADS receiver is
300responsible for demodulating a Qam signal.
301
302Broadcom provides two classes of Qam Demodulation devices, simple and advance.
303The term "simple" and "advance" refers to the use of embedded Acquisition Processor.
304
305The simple Qam Demodulation devices do not contain an embedded Acquistion Processor,
306therefore requires the host processor to start acquisition, monitor the state of the
307downstream signal, and if signal it lost, restart the process of reacquiring the
308downstream signal. Bcm3255, Bcm3125 are classified as simple Qam Demodulation devices.
309
310Advance Qam Demodulation devices contain an embedded Acquisition Processor (AP).
311Taking advantage of the AP, advance device requires much less resources of the
312host processor. Once host processor requests AP to acquire a signal, the AP will
313start the acquisition process. When it locks to signal, it will notify the host.
314When signal is loss, the AP will notify the host and start the process of
315reacquiring the downstream signal without host involvement. Bcm3255 is
316classified as advance Qam Demodulation devices.
317
318This module represents the public API for all advance ADS modules. It was created
319to support multiple advance Qam Downstream modules, 3255, 3256, etc on the same
320system (board). To support multiple Qam Downstream chips for a given system, all the
321public API have been vitualized. These vitual function pointer are initialized
322to a specific device when the device is created. Please see the sample code
323for how this is done. After the function pointers are initialized, ADS functions
324can be used.
325
326
327Design
328The design for BADS PI API is broken into three parts.
329
330o Part 1 (open/close/configuration):
331
332    These APIs are used for opening and closing BADS device/device channel.
333    When a device/device channel is opened, the device/device channel can be
334    configured.
335
336o Part 2 (acquire/get/set):
337
338    These APIs are used for getting and setting runtime attributes of BADS.
339    Along with get and set APIs, an acquire API is also provided.  The acquire
340    API is used to acquire (lock) Inband Downstream signal.
341
342o Part 3 (process):
343
344    This API is used to process notification.
345
346
347Usage
348The usage of BADS involves the following:
349
350   * Configure/Open of BADS
351
352      * Configure BADS device for the target system
353      * Open BADS device
354      * Configure BADS device channel for the target system
355      * Open BADS device channel
356
357   * Program/Acquire device channel
358
359      * Try to acquire Inband Downstream signal
360      * Check status of acquisition
361
362
363Interrupt Requirements
364No interrrupt processing is done by this module.
365
366************** Sample code for 3255 **********************
367//
368// NOTE: The following sample code does not do any error checking.
369//
370// In this example, the target H/W board is configured for an
371// Inband Downstream Annex B application, with a Crystal Frequency of 24.00 MHz
372// and IF Frequency of 43.75 MHz.
373//
374static BADS_Handle adsDev;
375static BADS_ChannelHandle ibChn[2];
376static BCHP_Handle hChip3255;
377static BREG_Handle hReg3255;
378static BRPC_Handle hRpc;
379
380static BADS_CallbackFunc cbLockChangeFunc(
381    BADS_ChannelHandle hIbChn,          // Handle of channel in question
382    void *pParam
383    )
384{
385    bool *lockStatus = (bool *) pParam;
386
387    BADS_GetLockStatus( hIbChn, lockStatus );
388
389    return;
390}
391
392main( void )
393{
394    BADS_Settings adsDevSettings;
395    BADS_ChannelSettings adsChnDevSettings;
396    BADS_InbandParam ibParam;
397    bool isLock;
398
399    // Initialize hChip3255, hReg3255, and hRpc . . .
400
401    // BADS initialization for BCM3255
402    BADS_3255_GetDefaultSetting( &settings );
403    // Mutex to lock access to 3255 commands, so the other lock 3255 tuner, OOB
404    // are not access during DS access.
405    settings.xtalFreq = 24000000;
406    settings.hRpc = hRpc;
407    BADS_Open( hAds, hChip3255, hReg3255, &settings );
408
409    // Now, get ready to open the DS channel
410    BADS_GetChannelDefaultSettings( hAds, &adsChnDevSettings );
411    adsChnDevSettings.ifFreq = 43750000;
412    // Open it channel 0
413    BADS_OpenChannel( adsDev, &ibChn[0], 0, &adsChnDevSettings );
414
415    // Now startup the RPC Notificiation Backup Ground thread/task . . .
416
417    // Install callback for state change event, where last parameter
418    // is for general use.
419    BADS_InstallCallback( ibChn[0], BADS_Callback_eLockChange, cbLockChangeFunc, (void *) &isLock );
420
421    // Tune Tuner . . .
422
423    // Acquire Inband Downstream Signal, Annex B, Qam 64 modulation with a
424    // symbol rate of 5.056 MBaud.
425    BADS_GetIbParamsDefault( ibChn[0], &inParams );
426    ibParams.modType = BADS_ModulationType_eAnnexBQam64;
427    ibParams.symbolRate = 5056000;
428    BADS_Acquire( ibChn[0], &ibParams );
429
430    while(1)
431    {
432        // Print the lock status every second
433        BKNI_Sleep(1000);
434        printf("Lock Status: %s\n", (isLock==true): "locked", "not lock");
435    }
436}
437
438void checkRpcNotificationThread(. . .)
439{
440    while (!system_terminated)
441    {
442        uint32_t device_id, event;
443
444        lock_with_system_sw();
445        BRPC_CheckNotification(hRpc, &device_id, &event, 0);
446        if ((event>>16))
447        {
448            switch (device_id)
449            {
450                case BRPC_DEV_ID_DS0:
451                    BADS_ProcessNotification(ibChn[0]);
452                    break;
453                case BRPC_DEV_ID_DS1:
454                    BADS_ProcessNotification(ibChn[1]);
455                    break;
456                case BRPC_DEV_ID_OB0:
457                    BAOB_ProcessNotification(ob);
458                    break;
459                default:
460                    // device not used
461                    break;
462            }
463            unlock_with_system_sw();
464        }
465        else
466        {
467            unlock_with_system_sw();
468            BKNI_Sleep(500);
469        }
470    }
471}
472
473</verbatim>
474
475************** Sample code for chips 3117/3114/3112/3109 **********************
476
477</verbatim>
478
479******************* Handle L1 Interrup from 3117 *****************************
480
481static void App_L1_isr_handler(void *pParam1, int pParam2)
482{
483    BHAB_Handle hab = (BHAB_Handle)pParam2;
484    BHAB_HandleInterrupt_isr(hab);
485}
486
487static void Interrupt_event_handler(void *pParam)
488{
489    BHAB_Handle hab = (BHAB_Handle)pParam;
490    BHAB_ProcessInterruptEvent(hab);
491}
492
493***************************** Create HAB ************************************
494//The application needs to create the instance of this basemodule for 3117/3114/3112 or 3109
495//and pass the handle to the pi as mentioned in the sample code below.
496
497BHAB_Handle hab;
498
499static void Hab_create()
500{
501    BHAB_Settings stHabSettings;
502   
503    BHAB_3117_GetDefaultSettings(&stHabSettings);
504
505    Populate the HAB settings structure.
506
507    BHAB_Open( &hab, i2c/spi handle, &stHabSettings);
508
509    //Download code binary for the Acquisition Processon
510    BHAB_InitAp(&hab, AP_binary);
511   
512    Get interrupt_event handle and register interrupt_event callback
513
514    BHAB_GetInterruptEventHandle(&hab, interrupt_event handle);
515
516    Interrupt_event_handler should be called when interrupt event is set by HAB
517}
518
519******************* Notify the app of lock status change ************************
520static BADS_CallbackFunc cbLockChangeFunc(
521    BADS_ChannelHandle hIbChn,         
522    void *pParam
523    )
524{
525    bool *lockStatus = (bool *) pParam;
526
527    BADS_GetLockStatus( hIbChn, lockStatus );
528
529    return;
530}
531
532**************************************************************************
533static BTNR_Handle hTnr;
534static BADS_Handle hAds;
535static BADS_ChannelHandle ibChn[2];
536static BCHP_Handle hChip3117;
537static BREG_Handle hReg3117;
538
539
540main( void )
541{
542    BADS_Settings settings;
543    BADS_ChannelSettings adsChnDevSettings;
544    BADS_InbandParam ibParam;
545    bool isLock;
546    BTNR_3117Ib_Settings tnrIb3117_cfg;
547    uint8_t frequency = 765; //in MHZ (for example).
548       
549    //Open Tuner . . .
550    BTNR_3117Ib_GetDefaultSettings(&tnrIb3117_cfg);
551    BTNR_3117Ib_Open(&hTnr,&tnrIb3117_cfg, hab);
552   
553    BADS_3117_GetDefaultSettings( &settings );
554    settings.hGeneric = hab;
555    BADS_Open( hAds, hChip3117, hReg3117, &settings );
556
557    BADS_GetChannelDefaultSettings( hAds, &adsChnDevSettings );
558    BADS_OpenChannel( hAds, &ibChn[0], 0, &adsChnDevSettings );
559
560    // Install callback for state change event, where last parameter
561    // is for general use.
562    BADS_InstallCallback( ibChn[0], BADS_Callback_eLockChange, cbLockChangeFunc, (void *) &isLock );
563
564    //Tune Tuner . . .
565    BTNR_SetTunerRfFreq(hTnr, frequency, BTNR_TunerMode_eDigital);
566
567    // Acquire Inband Downstream Signal, Annex B, Qam 64 modulation with a
568    // symbol rate of 5.056 MBaud.
569    ibParam.modType = BADS_ModulationType_eAnnexBQam64;
570    ibParam.symbolRate = 5056000;
571    BADS_Acquire( ibChn[0], &ibParam );
572
573    while(1)
574    {
575        // Print the lock status every second
576        BKNI_Sleep(1000);
577        printf("Lock Status: %s\n", (isLock==true): "locked", "not lock");
578    }
579}
580
581</verbatim>
582
583**************************************************************************/
584#ifndef BADS_H__
585#define BADS_H__
586
587#include "bchp.h"
588#include "breg_mem.h"
589#include "bint.h"
590#include "bkni.h"
591#include "berr_ids.h"
592#include "bmem.h"
593#include "btmr.h"
594
595#ifdef __cplusplus
596extern "C" {
597#endif
598
599/***************************************************************************
600Summary:
601    Error Codes specific to BADS
602
603Description:
604
605See Also:
606
607****************************************************************************/
608#define BADS_ERR_NOTAVAIL_MODULATION_TYPE       BERR_MAKE_CODE(BERR_ADS_ID, 0)
609#define BADS_ERR_NOTAVAIL_CHN_NO                BERR_MAKE_CODE(BERR_ADS_ID, 1)
610#define BADS_ERR_SYMBOLRATE_EXCEEDED            BERR_MAKE_CODE(BERR_ADS_ID, 2)
611#define BADS_ERR_POWER_DOWN                     BERR_MAKE_CODE(BERR_ADS_ID, 3)
612#define BADS_ERR_INVALID_CRC                    BERR_MAKE_CODE(BERR_ADS_ID, 4)
613
614
615/***************************************************************************
616Summary:
617    The handle for Qam In-Band Downstream module.
618
619Description:
620    An opaque handle for BADS device.
621
622See Also:
623    BADS_Open()
624
625****************************************************************************/
626typedef struct BADS_P_Handle                *BADS_Handle;
627
628/***************************************************************************
629Summary:
630    The handle for Qam In-Band Downstream module.
631
632Description:
633    An opaque handle for BADS device channel.
634
635See Also:
636    BADS_OpenChannel()
637
638****************************************************************************/
639typedef struct BADS_P_ChannelHandle         *BADS_ChannelHandle;
640
641
642
643/***************************************************************************
644Summary:
645    Enumeration for QPSK OOB spectrum setting
646
647Description:
648    This enumeration defines the valid spectrum setting.
649
650See Also:
651****************************************************************************/
652typedef enum BADS_SpectrumMode
653{
654    BADS_SpectrumMode_eAuto,
655    BADS_SpectrumMode_eManual,
656    BADS_SpectrumMode_eLast
657} BADS_SpectrumMode;
658
659/***************************************************************************
660Summary:
661    Enumeration for QPSK OOB DPM setting
662
663Description:
664    This enumeration defines the valid DPM setting.
665
666See Also:
667****************************************************************************/
668typedef enum BADS_DpmMode
669{
670    BADS_DpmMode_Disabled,
671    BADS_DpmMode_Enabled,
672    BADS_DpmMode_eLast
673} BADS_DpmMode;
674
675
676/***************************************************************************
677Summary:
678    Enumeration for QPSK OOB Inverted spectrum setting
679
680Description:
681    This enumeration defines the valid Inverted spectrum setting.
682
683See Also:
684****************************************************************************/
685typedef enum BADS_InvertSpectrum
686{
687    BADS_InvertSpectrum_eNoInverted,
688    BADS_InvertSpectrum_eInverted,
689    BADS_InvertSpectrum_eLast
690} BADS_InvertSpectrum;
691
692/***************************************************************************
693Summary:
694    Enumeration for modulation type
695
696Description:
697    This enumeration defines the valid modulation types.
698
699See Also:
700    BADS_Acquire(), BADS_GetStatus()
701
702****************************************************************************/
703typedef enum BADS_ModulationType
704{
705    /* Most of these are currently not supported, are here for future use */
706    BADS_ModulationType_eAnnexAQam16,
707    BADS_ModulationType_eAnnexAQam32,
708    BADS_ModulationType_eAnnexAQam64,
709    BADS_ModulationType_eAnnexAQam128,
710    BADS_ModulationType_eAnnexAQam256,
711    BADS_ModulationType_eAnnexAQam512,
712    BADS_ModulationType_eAnnexAQam1024,
713    BADS_ModulationType_eAnnexAQam2048,
714    BADS_ModulationType_eAnnexAQam4096,
715    BADS_ModulationType_eAnnexBQam16,
716    BADS_ModulationType_eAnnexBQam32,
717    BADS_ModulationType_eAnnexBQam64,
718    BADS_ModulationType_eAnnexBQam128,
719    BADS_ModulationType_eAnnexBQam256,
720    BADS_ModulationType_eAnnexBQam512,
721    BADS_ModulationType_eAnnexBQam1024,
722    BADS_ModulationType_eAnnexBQam2048,
723    BADS_ModulationType_eAnnexBQam4096,
724    BADS_ModulationType_eAnnexCQam16,
725    BADS_ModulationType_eAnnexCQam32,
726    BADS_ModulationType_eAnnexCQam64,
727    BADS_ModulationType_eAnnexCQam128,
728    BADS_ModulationType_eAnnexCQam256,
729    BADS_ModulationType_eAnnexCQam512,
730    BADS_ModulationType_eAnnexCQam1024,
731    BADS_ModulationType_eAnnexCQam2048,
732    BADS_ModulationType_eAnnexCQam4096,
733    BADS_ModulationType_eLast
734} BADS_ModulationType;
735
736/***************************************************************************
737The BADS_AutomaticFrequencyOffset enum has been deprecated. It is an unsigned integer in units of Hz now.
738The following #defines are for backward compatibility only.
739***************************************************************************/
740
741#define BADS_AutomaticFrequencyOffset uint32_t
742
743#define BADS_AutomaticFrequencyOffset_eAnnexAQam200 200000
744#define BADS_AutomaticFrequencyOffset_eAnnexAQam125 125000
745#define BADS_AutomaticFrequencyOffset_eAnnexAQam250 250000
746#define BADS_AutomaticFrequencyOffset_eAnnexAMax 3
747#define BADS_AutomaticFrequencyOffset_eAnnexBQam180 180000
748#define BADS_AutomaticFrequencyOffset_eAnnexBQam125 125000
749#define BADS_AutomaticFrequencyOffset_eAnnexBQam250 250000
750#define BADS_AutomaticFrequencyOffset_eAnnexBQam200 200000
751#define BADS_AutomaticFrequencyOffset_eLast 8
752
753/***************************************************************************
754Summary:
755    Enumeration for Callback types
756
757Description:
758    This enumeration defines Callback types.
759
760See Also:
761
762****************************************************************************/
763typedef enum BADS_Callback
764{
765    BADS_Callback_eLockChange,          /* Callback to notify application of lock change */
766    BADS_Callback_eUpdateGain,          /* Callback to notify application to update gain */ 
767    BADS_Callback_eNoSignal,            /* Callback to notify application there is no signal */ 
768    BADS_Callback_eAsyncStatusReady,    /* Callback to notify application there is no signal */   
769        BADS_Callback_eTuner,                           /* Callback to tuner regarding a new setting */ 
770    BADS_Callback_eSpectrumDataReady,   /* Callback to notify application that spectrum analyzer data is ready */ 
771    BADS_Callback_eLast                 /* More may be required */
772} BADS_Callback;
773
774/***************************************************************************
775Summary:
776    Enumeration for Acquire types
777
778Description:
779    This enumeration defines the different acquisition type.
780
781See Also:
782
783****************************************************************************/
784typedef enum BADS_AcquireType
785{
786        BADS_AcquireType_eAuto,
787        BADS_AcquireType_eFast,
788        BADS_AcquireType_eSlow,
789        BADS_AcquireType_eScan,
790        BADS_AcquireType_eLast
791}BADS_AcquireType;
792
793/***************************************************************************
794Summary:
795    Enumeration for Acquisition Status
796
797Description:
798    This enumeration defines the different acquisition statuses.
799
800See Also:
801
802****************************************************************************/
803typedef enum BADS_AcquisitionStatus
804{           
805    BADS_AcquisitionStatus_eNoSignal,     
806    BADS_AcquisitionStatus_eUnlocked,     
807    BADS_AcquisitionStatus_eLockedFast,     
808    BADS_AcquisitionStatus_eLockedSlow     
809} BADS_AcquisitionStatus;
810
811/***************************************************************************
812Summary:
813    Enumeration for BPS
814
815Description:
816    This enumeration defines the different BPS modes.
817
818See Also:
819
820****************************************************************************/
821typedef enum BADS_BPS
822{     
823    BADS_BPS_eQam16,     
824    BADS_BPS_eQam32,     
825    BADS_BPS_eQam64,     
826    BADS_BPS_eQam128,     
827    BADS_BPS_eQam256,     
828    BADS_BPS_eQam512,     
829    BADS_BPS_eQam1024
830} BADS_BPS;
831
832/***************************************************************************
833Summary:
834    Enumeration for Interleaver
835
836Description:
837    This enumeration defines the different Interleaver types.
838
839See Also:
840
841****************************************************************************/
842typedef enum BADS_Interleaver
843{     
844    BADS_Interleaver_eI128_J1,     
845    BADS_Interleaver_eI128_J2,     
846    BADS_Interleaver_eI128_J3,   
847    BADS_Interleaver_eI128_J4,     
848    BADS_Interleaver_eI64_J2,     
849    BADS_Interleaver_eI32_J4,   
850    BADS_Interleaver_eI16_J8,     
851    BADS_Interleaver_eI8_J16,     
852    BADS_Interleaver_eI4_J32,     
853    BADS_Interleaver_eI2_J64,     
854    BADS_Interleaver_eI1_J128,     
855    BADS_Interleaver_eI12_J17,     
856    BADS_Interleaver_eUnsupported
857} BADS_Interleaver;
858
859/***************************************************************************
860Summary:
861    Enumeration for Lock Status
862
863Description:
864    This enumeration represents the lock status of of a ADS channel.
865
866See Also:
867
868****************************************************************************/
869typedef enum BADS_LockStatus
870{           
871    BADS_LockStatus_eUnlocked,
872    BADS_LockStatus_eLocked, 
873    BADS_LockStatus_eNoSignal,     
874    BADS_LockStatus_eLast   
875} BADS_LockStatus;
876
877/***************************************************************************
878Summary:
879    Enumeration for FFT Size for Spetrum Analyzer Data
880
881Description:
882    This enumeration represents the FFT Size for Spetrum Analyzer Data.
883
884See Also:
885
886****************************************************************************/
887typedef enum BADS_FftSize
888{
889    BADS_FftSize_e64 = 0x6,
890    BADS_FftSize_e128 = 0x7,
891    BADS_FftSize_e256 = 0x8,
892    BADS_FftSize_e512 = 0x9,
893    BADS_FftSize_e1024 = 0x0a,
894    BADS_FftSize_e2048 = 0x0b,
895    BADS_FftSize_e4096 = 0x0c,
896    BBADS_FftSize_eLast
897} BADS_FftSize;
898
899/***************************************************************************
900Summary:
901    This structure represents ADS Qam In-Band Downstream acquisition parameters.
902
903Description:
904
905See Also:
906    BADS_Acquire()
907
908****************************************************************************/
909typedef struct BADS_InbandParam
910{
911    BADS_ModulationType modType;        /* Modulation type */
912    uint32_t            symbolRate;             /* in Baud, for 3128/3461 this is only valid for Annex A  */
913    BADS_InvertSpectrum invertSpectrum;
914    BADS_SpectrumMode   spectrum;
915    BADS_DpmMode        enableDpm;
916    bool                autoAcquire;
917    bool                enableNullPackets; /* Enables/disables improved locking mechanism for Annex_A signals containing >98% null packets.*/
918    unsigned            frequencyOffset; /*   Automatic frequency Offset (pull-in) range of the qam demodulator
919                                                        For example "frequencyOffset = 180000" can pull in carriers offset +/-180KHz   from the tuned frequency */
920    BADS_AcquireType    acquisitionType;
921    bool                tuneAcquire; /* This bit directs the Downstream Demodulator to initiate an acquire immediately after its associated WFE or Tuner is tuned. 
922                                        If the bit is set, then the Demodulator will initiate an acquire immediately after the tuner has completed a tune  regardless of autoacquire.   
923                                        Note: Unless otherwise indicated, this flag only applies to the Acquisition Processors Internal WFE or Internal Tuner. */
924} BADS_InbandParam;
925
926/***************************************************************************
927Summary:
928    This structure represents ADS Qam In-Band Downstream version.
929
930Description:
931
932See Also:
933    BADS_GetVersion
934
935****************************************************************************/
936typedef struct BADS_Version
937{
938    uint32_t    familyId;  /* chip Family ID */
939    uint32_t    chipId;  /* chip ID */
940    uint32_t    majVer; /* major chip revision number */
941    uint32_t    minVer; /* minor chip revision number */
942    uint8_t     apVer;   /* major AP microcode version */
943    uint8_t     minApVer;   /* minor AP microcode version */
944} BADS_Version;
945
946/***************************************************************************
947Summary:
948    This structure represents the ADS Scan Status for a Qam In-Band Downstream
949    channel.
950
951Description:
952    This structure is returned when BADS_GetScanStatus() is called.  This
953    structure contains the scan status of Qam In-Band Downstream
954    channel.
955
956See Also:
957    BADS_ScanStatus()
958
959****************************************************************************/
960typedef struct BADS_ScanStatus
961{
962    BADS_AcquisitionStatus acquisitionStatus; /* Acquisition Status (NoSignal, Unlocked, LockedFast, LockedSlow)  */
963    BADS_ModulationType modType;        /* Modulation type */
964    bool isSpectrumInverted;            /* If 1, Spectrum is inverted. */
965    bool autoAcquire;                   /* If 1, autoAcquire is enabled */
966    BADS_Interleaver interleaver;           /* FEC interleaver */
967    uint32_t symbolRate;                /* symbol rate in Baud */
968    int32_t carrierFreqOffset;          /* carrier frequency offset in 1/1000 Hz */     
969} BADS_ScanStatus;
970
971/***************************************************************************
972Summary:
973    This structure represents the ADS Status for a Qam In-Band Downstream
974    channel.
975
976Description:
977    This structure is returned when BADS_GetStatus() is called.  This
978    structure contains the complete status of Qam In-Band Downstream
979    channel.
980
981See Also:
982    BADS_GetStatus()
983
984****************************************************************************/
985typedef struct BADS_Status
986{
987    bool isPowerSaverEnabled;           /* Eanble=1, Disable=0 */
988    BADS_ModulationType modType;        /* Modulation type */
989    uint32_t ifFreq;                    /* in Hertz, IF freq. */
990    uint32_t symbolRate;                /* in Baud */
991    int32_t  symbolRateError;            /* symbol rate error in Baud */
992    bool isFecLock;                     /* lock=1, unlock=0 */
993    bool isQamLock;                     /* lock=1, unlock=0 */
994    uint32_t correctedCount;            /* reset on every read */
995    uint32_t uncorrectedCount;          /* reset on every read */
996    int32_t snrEstimate;                /* in 1/256 dB */
997    int32_t agcIntLevel;                /* in 1/10 percent */
998    int32_t agcExtLevel;                /* in 1/10 percent */
999    int32_t carrierFreqOffset;          /* in 1/1000 Hz */
1000    int32_t carrierPhaseOffset;         /* in 1/1000 Hz */
1001    uint32_t rxSymbolRate;              /* in Baud, received symbol rate */
1002    uint16_t interleaveDepth;           /* use in Docsis */
1003    uint32_t goodRsBlockCount;          /* reset on every read */
1004    uint32_t berRawCount;               /* reset on every read */
1005    int32_t dsChannelPower;             /* in 1/10th of a dBmV unit; OCAP DPM support for video channels */
1006    uint32_t mainTap;                   /* Channel main tap coefficient */
1007    int32_t feGain;                     /* in 1/100th of a dB */
1008    int32_t digitalAgcGain;             /* in 1/100th of a dB */   
1009    uint32_t equalizerGain;             /* Channel equalizer gain value in in 1/100th of a dB */
1010    /* OCAP required postRsBER for all DS channels. postRsBER and elapsedTimeSec will be reset on every channel change*/
1011    /* fpostRsBER normally between xxxe-6 to xxxe-12 float value, to send this small float number over rMagnum to host, we convert it to uint32 using the formula*/
1012    uint32_t postRsBER;                 /* Converted floating point fpostRsBER --> uint32_t postRsBER for rMagnum transport: */
1013                                        /* int ipostRsBER = (int)( log(fpostRsBER) * 1000000.0 ); uint32_t postRsBER = (uint32_t)ipostRsBER; */
1014                                        /* Host side will need this to convert it back: int ipostRsBER = (int)postRsBER; float fpostRsBER = exp( (float)ipostRsBER/1000000.0 ); */
1015    uint32_t elapsedTimeSec;            /* postRsBER over this time */
1016    bool isSpectrumInverted;            /* If 1, Spectrum is inverted relative to the AP bootup. */
1017    uint32_t cleanCount;                /* reset on every reset status*/
1018    int32_t agcAGFLevel;                /* in 1/10 percent */
1019    int32_t agcAGF2Level;               /* in 1/10 percent */
1020    uint32_t correctedBits;             /* reset on every reset status */
1021    uint32_t accCorrectedCount;         /* Accumulated corrected block count. Reset on every reset status */
1022    uint32_t accUncorrectedCount;       /* Accumulated un corrected block count. Reset on every reset status */
1023    uint32_t accCleanCount;             /* Accumulated clean block count. Reset on every reset status */
1024} BADS_Status;
1025
1026/***************************************************************************
1027Summary:
1028    Structure for Spectrum Analyzer Data
1029
1030Description:
1031
1032See Also:
1033    BADS_GetSpectrumAnalyzerData()
1034
1035****************************************************************************/
1036typedef struct BADS_SpectrumData
1037{
1038    uint32_t *data; /* ptr to the data */
1039    uint16_t datalength; /* data length in number of words */   
1040    bool moreData; /* this bit indicates whether there is more data available or not */
1041} BADS_SpectrumData;
1042
1043/***************************************************************************
1044Summary:
1045    Spectrum settings for Spectrum Analyzer Data
1046
1047Description:
1048
1049See Also:
1050    BADS_RequestSpectrumAnalyzerData()
1051
1052****************************************************************************/
1053typedef struct BADS_SpectrumSettings
1054{
1055    uint32_t startFreq; /* The start frequency of the spectrum analyzer in Hz */
1056    uint32_t stopFreq; /* The stop frequency of the spectrum analyzer in Hz */
1057    BADS_FftSize fftSize; /*  FFT Size */
1058    uint8_t binAverage; /*  Total number of samples to be averaged per bin. It's value ranges from 0 to 255*/
1059    uint32_t numSamples; /* Total number of 32-bit frequency values to return */
1060} BADS_SpectrumSettings;
1061
1062/***************************************************************************
1063Summary:
1064    Callback used for event notification.
1065
1066Description:
1067    When this PI wants to notify an application, it will call this callback
1068    function the callback function is registered.
1069
1070See Also:
1071    BADS_InstallLockStateChangeCallback(), BADS_InstallInterruptCallback()
1072
1073****************************************************************************/
1074typedef BERR_Code (*BADS_CallbackFunc)(void *pParam );
1075
1076
1077/***************************************************************************
1078Summary:
1079    Structure for API function table
1080
1081Description:
1082   This structure contains pointers to all public BADS functions.
1083
1084See Also:
1085    None.
1086
1087****************************************************************************/
1088struct BADS_Settings;
1089struct BADS_ChannelSettings;
1090struct BADS_DaisyChainSettings;
1091struct BADS_ChannelScanSettings;
1092
1093typedef struct BADS_ApiFunctTable
1094{
1095    BERR_Code (*Open)(BADS_Handle *, BCHP_Handle, BREG_Handle, BINT_Handle, const struct BADS_Settings *);
1096    BERR_Code (*Close)(BADS_Handle);
1097    BERR_Code (*Init)(BADS_Handle);
1098    BERR_Code (*GetVersion)(BADS_Handle, BADS_Version *);
1099    BERR_Code (*GetBondingCapability)(BADS_Handle, unsigned int *);
1100    BERR_Code (*GetTotalChannels)(BADS_Handle, unsigned int *);
1101    BERR_Code (*OpenChannel)(BADS_Handle, BADS_ChannelHandle *, unsigned int, const struct BADS_ChannelSettings *);
1102    BERR_Code (*CloseChannel)(BADS_ChannelHandle);
1103    BERR_Code (*GetDevice)(BADS_ChannelHandle, BADS_Handle *);
1104    BERR_Code (*GetChannelDefaultSettings)(BADS_Handle, unsigned int, struct BADS_ChannelSettings *);
1105    BERR_Code (*GetStatus)(BADS_ChannelHandle, BADS_Status *);
1106    BERR_Code (*GetLockStatus)(BADS_ChannelHandle, BADS_LockStatus *);
1107    BERR_Code (*GetSoftDecision)(BADS_ChannelHandle, int16_t nbrToGet, int16_t *iVal, int16_t *qVal, int16_t *nbrGot );
1108    BERR_Code (*InstallCallback)(BADS_ChannelHandle, BADS_Callback, BADS_CallbackFunc, void *);
1109    BERR_Code (*GetDefaultAcquireParams)(BADS_InbandParam *);
1110    BERR_Code (*SetAcquireParams)(BADS_ChannelHandle, const BADS_InbandParam *);
1111    BERR_Code (*GetAcquireParams)(BADS_ChannelHandle, BADS_InbandParam *);   
1112    BERR_Code (*Acquire)(BADS_ChannelHandle, BADS_InbandParam *);
1113    BERR_Code (*EnablePowerSaver)(BADS_ChannelHandle); 
1114    BERR_Code (*DisablePowerSaver)(BADS_ChannelHandle);
1115    BERR_Code (*ProcessNotification)(BADS_ChannelHandle, unsigned int event);
1116    BERR_Code (*SetDaisyChain)(BADS_Handle, bool enableDaisyChain);
1117    BERR_Code (*GetDaisyChain)(BADS_Handle, bool *isEnableDaisyChain);
1118    BERR_Code (*ResetStatus)(BADS_ChannelHandle);
1119    BERR_Code (*GetInterruptEventHandle)(BADS_Handle, BKNI_EventHandle*);
1120    BERR_Code (*ProcessInterruptEvent)(BADS_Handle);
1121    BERR_Code (*Untune)(BADS_Handle);
1122    BERR_Code (*RequestAsyncStatus)(BADS_ChannelHandle);
1123    BERR_Code (*GetAsyncStatus)(BADS_ChannelHandle, BADS_Status *);
1124    BERR_Code (*GetScanStatus)(BADS_ChannelHandle, BADS_ScanStatus *); 
1125    BERR_Code (*ReadSlave)(BADS_ChannelHandle, uint8_t chipAddr, uint32_t subAddr, uint8_t subAddrLen, uint32_t *data, uint8_t dataLen);
1126    BERR_Code (*WriteSlave)(BADS_ChannelHandle, uint8_t chipAddr, uint32_t subAddr, uint8_t subAddrLen, uint32_t *data, uint8_t dataLen);
1127        BERR_Code (*SetScanParam)(BADS_ChannelHandle,  struct BADS_ChannelScanSettings *);
1128        BERR_Code (*GetScanParam)(BADS_ChannelHandle, struct BADS_ChannelScanSettings *);
1129    BERR_Code (*RequestSpectrumAnalyzerData)(BADS_ChannelHandle, struct BADS_SpectrumSettings *);
1130    BERR_Code (*GetSpectrumAnalyzerData)(BADS_ChannelHandle, struct BADS_SpectrumData *);
1131} BADS_ApiFunctTable;
1132/***************************************************************************
1133Summary:
1134    Required daisy chain settings structure for controlling the daisy chain of 31xx devices.
1135
1136Description:
1137    Required daisy chain settings structure for controlling the daisy chain of 31xx devices.
1138    When turned off the RF out is turned off for the particulat 31xx device and hence all the
1139    31xx devices connected to the current device wont recieve the RF signal.
1140
1141See Also:
1142    BADS_Open()
1143
1144****************************************************************************/
1145typedef struct BADS_DaisyChainSettings
1146{
1147    bool enable; /* 1 = enable, 0=disable. */
1148} BADS_DaisyChainSettings;
1149
1150/***************************************************************************
1151Summary:
1152    Enumeration for
1153
1154Description:
1155    This enumeration defines
1156
1157See Also:
1158
1159****************************************************************************/
1160typedef enum BADS_TransportData
1161{
1162    BADS_TransportData_eSerial,         /* GPIO[0:7] on 31xx are configured as input and the transport data is sent out on DS_Data. */
1163    BADS_TransportData_eGpioSerial,     /* GPIO[1:7] on 31xx are configured as input and the transport data is sent out on GPIO[0]. */
1164    BADS_TransportData_eGpioParallel,   /* GPIO[0:7] on 31xx are configured as output and the transport data is sent out on GPIO[0:7]. */
1165    BADS_TransportData_eMax
1166} BADS_TransportData;
1167
1168/***************************************************************************
1169Summary:
1170    Required default settings structure for Qam In-Band Downstream module.
1171
1172Description:
1173    The default setting structure defines the default configuration of
1174    Qam In-Band Downstream when the device is opened.
1175
1176See Also:
1177    BADS_Open()
1178
1179****************************************************************************/
1180typedef struct BADS_Settings
1181{
1182    unsigned int devId;     /* generic device ID */
1183    void *hGeneric;         /* generic handle can be used for anything */
1184    BADS_ApiFunctTable funcPtr;
1185    bool isOpenDrain; /* true = Open Drain mode, false = Normal mode. */
1186    BADS_TransportData transportConfig; /* Chooses the trasnport configuration as mentioned in the BADS_TransportData structure. */
1187    BMEM_Heap_Handle      hHeap;        /* require to be able to share memory with BBS required for 7550 */
1188    BTMR_Handle           hTmr;        /* for peridic check equired for 7550 */
1189} BADS_Settings;
1190
1191/***************************************************************************
1192Summary:
1193    Required default settings structure for Qam In-Band Downstream module.
1194
1195Description:
1196    The default setting structure defines the default configuration of
1197    Qam In-Band Downstream channel when the device channel is opened.
1198
1199See Also:
1200    BADS_OpenChannel()
1201
1202****************************************************************************/
1203#define BADS_SETTINGS_IFFREQ                    (43750000)      /* 43.75 MHz */
1204typedef struct BADS_ChannelSettings
1205{
1206    unsigned long ifFreq; /* IF Frequency in Hertz */
1207    bool autoAcquire; /* 325X does auto-reacuire or not*/
1208    bool fastAcquire; /* 325X uses 2X faster acquire time
1209                        in expense of stability or not*/
1210} BADS_ChannelSettings;
1211
1212/***************************************************************************
1213Summary:
1214    Scan Parameter settings.
1215
1216Description:
1217
1218See Also:
1219    BADS_SetScanParam()
1220
1221****************************************************************************/
1222typedef struct BADS_ChannelScanSettings
1223{
1224    bool                AI;                     /* Enable/Disable auto invert spectrum */
1225    bool                QM;                     /* Enable/Disable QAM mode search  */
1226    bool                CO;                     /* Enable/Disable Carrier Offset search  */
1227    bool                TO;                     /* Enable/Disable auto baud rate detection  */
1228    bool                B1024;          /* Enable/Disable Auto Search for 1024Q while receiver is in Annex B mode */
1229    bool                B256;           /* Enable/Disable Auto Search for 256Q while receiver is in Annex B mode */
1230    bool                B64;   
1231    bool                A1024;           /* Enable/Disable Auto Search for 1024Q while receiver is in Annex A mode  */
1232    bool                A512;
1233    bool                A256;
1234    bool                A128;
1235    bool                A64;
1236    bool                A32;
1237    bool                A16;            /* Enable/Disable Auto Search for 16Q while receiver is in Annex A mode */
1238    uint32_t    carrierSearch;          /* 256*Hz */
1239    uint32_t    upperBaudSearch;  /*upper baud search range in Hz */ 
1240    uint32_t    lowerBaudSearch; /*Lower baud search range in Hz */
1241} BADS_ChannelScanSettings;
1242
1243/***************************************************************************
1244Summary:
1245    This function opens Qam In-Band Downstream module.
1246
1247Description:
1248    This function is responsible for opening BADS module. When BADS is
1249    opened, it will create a module handle and configure the module based
1250    on the default settings. Once the device is opened, it must be closed
1251    before it can be opened again.
1252
1253Returns:
1254    TODO:
1255
1256See Also:
1257    BADS_Close(), BADS_OpenChannel(), BADS_CloseChannel(),
1258
1259****************************************************************************/
1260BERR_Code BADS_Open(
1261    BADS_Handle *pAds,                  /* [out] Returns handle */
1262    BCHP_Handle hChip,                  /* [in] Chip handle */
1263    BREG_Handle hRegister,              /* [in] Register handle */
1264    BINT_Handle hInterrupt,             /* [in] Interrupt handle, Bcm3250 */
1265    const BADS_Settings *pDefSettings   /* [in] Default settings */
1266    );
1267
1268/***************************************************************************
1269Summary:
1270    This function closes Qam In-Band Downstream module.
1271
1272Description:
1273    This function is responsible for closing BADS module. Closing BADS
1274    will free main BADS handle. It is required that all opened
1275    BDQS channels must be closed before calling this function. If this
1276    is not done, the results will be unpredicable.
1277
1278Returns:
1279    TODO:
1280
1281See Also:
1282    BADS_Open(), BADS_CloseChannel()
1283
1284****************************************************************************/
1285BERR_Code BADS_Close(
1286    BADS_Handle hDev                    /* [in] Device handle */
1287    );
1288
1289/***************************************************************************
1290Summary:
1291    This function initialize Qam In-Band Downstream module.
1292
1293Description:
1294    This function is responsible for initializing BADS module. The initialize
1295    function may do none or one or more of the following:
1296    - Download FW into ADS core
1297    - Startup ADS core
1298    - Retrieve information from ADS core regarding ADS static configuration
1299    - etc
1300
1301Returns:
1302    TODO:
1303
1304See Also:
1305    BADS_3255_Open(), BADS_3255_Close()
1306
1307****************************************************************************/
1308BERR_Code BADS_Init(
1309    BADS_Handle hDev                    /* [in] Device handle */
1310    );
1311
1312/***************************************************************************
1313Summary:
1314    This function returns the version information.
1315
1316Description:
1317    This function is responsible for returning the version information.
1318
1319Returns:
1320    TODO:
1321
1322See Also:
1323    BADS_Open()
1324
1325****************************************************************************/
1326BERR_Code BADS_GetVersion(
1327    BADS_Handle hDev,                   /* [in] Device handle */
1328    BADS_Version *pVersion              /* [out] Returns version */
1329    );
1330
1331/***************************************************************************
1332Summary:
1333    This function returns the number of bonded channels stored and reserved
1334    for Docsis.  The Docsis channels start at DS0 while the video channels
1335    start at the offset determined by the number of bonded channels returned
1336    from this function
1337
1338Description:
1339    This function is responsible for returning the number of bonded channels.
1340
1341Returns:
1342    TODO:
1343
1344See Also:
1345    BADS_GetTotalChannels()
1346
1347****************************************************************************/
1348BERR_Code BADS_GetBondingCapability(
1349    BADS_Handle hDev,                   /* [in] Device handle */
1350    unsigned int *bondedChannels         /* [out] Returns the number of bonded channels  */
1351    );
1352
1353/***************************************************************************
1354Summary:
1355    This function returns the total number of channels supported by
1356    Qam In-Band Downstream module.
1357
1358Description:
1359    This function is responsible for getting total number of channels
1360    supported by BADS module, since BADS device is implemented as a
1361    device channel.
1362
1363Returns:
1364    TODO:
1365
1366See Also:
1367    BADS_OpenChannel(), BADS_ChannelDefaultSettings()
1368
1369****************************************************************************/
1370BERR_Code BADS_GetTotalChannels(
1371    BADS_Handle hDev,                   /* [in] Device handle */
1372    unsigned int *totalChannels         /* [out] Returns total number downstream channels supported */
1373    );
1374
1375/***************************************************************************
1376Summary:
1377    This function gets default setting for a Qam In-Band Downstream module channel.
1378
1379Description:
1380    This function is responsible for returning the default setting for
1381    channel of BADS. The return default setting is used when opening
1382    a channel.
1383
1384Returns:
1385    TODO:
1386
1387See Also:
1388    BADS_OpenChannel()
1389
1390****************************************************************************/
1391BERR_Code BADS_GetChannelDefaultSettings(
1392    BADS_Handle hDev,                   /* [in] Device handle */
1393    unsigned int channelNo,             /* [in] Channel number to default setting for */
1394    BADS_ChannelSettings *pChnDefSettings /* [out] Returns channel default setting */
1395    );
1396
1397/***************************************************************************
1398Summary:
1399    This function opens Qam In-Band Downstream module channel.
1400
1401Description:
1402    This function is responsible for opening BADS module channel. When a
1403    BADS channel is opened, it will create a module channel handle and
1404    configure the module based on the channel default settings. Once a
1405    channel is opened, it must be closed before it can be opened again.
1406
1407Returns:
1408    TODO:
1409
1410See Also:
1411    BADS_CloseChannel(), BADS_GetChannelDefaultSettings()
1412
1413****************************************************************************/
1414BERR_Code BADS_OpenChannel(
1415    BADS_Handle hDev,                   /* [in] Device handle */
1416    BADS_ChannelHandle *phChn,          /* [out] Returns channel handle */
1417    unsigned int channelNo,             /* [in] Channel number to open */
1418    const BADS_ChannelSettings *pChnDefSettings /* [in] Channel default setting */
1419    );
1420
1421/***************************************************************************
1422Summary:
1423    This function closes Qam In-Band Downstream module channel.
1424
1425Description:
1426    This function is responsible for closing BADS module channel. Closing
1427    BADS channel it will free BADS channel handle. It is required that all
1428    opened BDQS channels must be closed before closing BADS.
1429
1430Returns:
1431    TODO:
1432
1433See Also:
1434    BADS_OpenChannel(), BADS_CloseChannel()
1435
1436****************************************************************************/
1437BERR_Code BADS_CloseChannel(
1438    BADS_ChannelHandle hChn             /* [in] Device channel handle */
1439    );
1440
1441/***************************************************************************
1442Summary:
1443    This function gets Qam In-Band Downstream module device handle based on
1444    the device channel handle.
1445
1446Description:
1447    This function is responsible returning BADS module handle based on the
1448    BADS module channel.
1449
1450Returns:
1451    TODO:
1452
1453See Also:
1454
1455****************************************************************************/
1456BERR_Code BADS_GetDevice(
1457    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1458    BADS_Handle *pAds                   /* [out] Returns Device handle */
1459    );
1460
1461
1462/***************************************************************************
1463Summary:
1464    This function gets the status synchronously of Qam In-Band Downstream module channel.
1465
1466Description:
1467    This function is responsible for synchronously getting the complete status for
1468    a Qam In-Band Downstream module channel.
1469
1470Returns:
1471    TODO:
1472
1473See Also: BADS_RequestStatus
1474
1475****************************************************************************/
1476BERR_Code BADS_GetStatus(
1477    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1478    BADS_Status *pStatus                /* [out] Returns status */
1479    );
1480
1481
1482/***************************************************************************
1483Summary:
1484    This function requests the status asynchronously of Qam In-Band Downstream module channel.
1485
1486Description:
1487    This function is responsible for requesting the status to be calculated asynchronously for
1488    a Qam In-Band Downstream module channel. The Qam frontend is responsible to inform
1489    the backend when the status is ready either through an interrupt or by any other predetermined
1490    method.
1491   
1492Returns:
1493    TODO:
1494
1495See Also: BADS_GetStatus
1496
1497****************************************************************************/
1498BERR_Code BADS_RequestAsyncStatus(
1499    BADS_ChannelHandle hChn            /* [in] Device channel handle */
1500    );
1501
1502/***************************************************************************
1503Summary:
1504    This function gets the status asynchronously of Qam In-Band Downstream module channel.
1505
1506Description:
1507    This function is responsible for asynchronously getting the complete status for
1508    a Qam In-Band Downstream module channel. BADS_RequestAsyncStatus() is called before to
1509    notify the frontend to calculate the status and notify the backend asynchronously that
1510    the status is ready then BADS_GetAsyncStatus() needs to be called to retrieve the status.
1511
1512Returns:
1513    TODO:
1514
1515See Also: BADS_RequestAsyncStatus
1516
1517****************************************************************************/
1518BERR_Code BADS_GetAsyncStatus(
1519    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1520    BADS_Status *pStatus                /* [out] Returns status */
1521    );
1522
1523
1524/***************************************************************************
1525Summary:
1526    This function gets the scan status synchronously of a Qam In-Band
1527    Downstream module channel.
1528
1529Description:
1530    This function is responsible for synchronously getting the scan status
1531    for a Qam In-Band Downstream module channel. Please note that this API
1532    should only be called after calling tune and acquire. Scan Status is an
1533    acquisition status, it gives the status at the last acquisition and not
1534    the current status. So, it is only valid if a tune and acquire was
1535    issued prior to calling this API.
1536
1537Returns:
1538    TODO:
1539
1540See Also:
1541
1542****************************************************************************/
1543BERR_Code BADS_GetScanStatus(
1544    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1545    BADS_ScanStatus *pScanStatus                /* [out] Returns status */
1546    );
1547
1548
1549/***************************************************************************
1550Summary:
1551    This function gets the lock status for a Qam In-Band Downstream
1552    module channel.
1553
1554Description:
1555    This function is responsible for getting the lock status
1556    for a BADS module channel.
1557
1558    NOTE: Do not call this function from an ISR context.
1559
1560Returns:
1561    TODO:
1562
1563See Also:
1564    BADS_GetStatus()
1565
1566****************************************************************************/
1567BERR_Code BADS_GetLockStatus(
1568    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1569    BADS_LockStatus *pLockStatus         /* [out] Returns lock status */
1570    );
1571
1572/***************************************************************************
1573Summary:
1574    This function gets the I and Q values for soft decision of a
1575    Qam In-Band Downstream module channel.
1576
1577Description:
1578    This function is responsible for getting the I and Q values for soft
1579    decision of a BADS module channel.
1580
1581Returns:
1582    TODO:
1583
1584See Also:
1585
1586****************************************************************************/
1587BERR_Code BADS_GetSoftDecision(
1588    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1589    int16_t nbrToGet,                   /* [in] Number values to get */
1590    int16_t *iVal,                      /* [out] Ptr to array to store output I soft decision */
1591    int16_t *qVal,                      /* [out] Ptr to array to store output Q soft decision */
1592    int16_t *nbrGotten                  /* [out] Number of values gotten/read */
1593    );
1594
1595/***************************************************************************
1596Summary:
1597    This function returns the default acquire parameters for a specific
1598    ADS module.
1599
1600Description:
1601    This function returns the default acquire parameters for a specific
1602    ADS module.
1603
1604Returns:
1605    TODO:
1606
1607See Also:
1608
1609****************************************************************************/ 
1610BERR_Code BADS_GetDefaultAcquireParams(
1611    BADS_ChannelHandle hChn ,           /* [in] Device channel handle */
1612    BADS_InbandParam *ibParams          /* [out] default Inband Parameters */
1613    );
1614   
1615/***************************************************************************
1616Summary:
1617    This function sends the acquire parameters for a specific ADS module.
1618
1619Description:
1620    This function sends the acquire parameters for a specific ADS module.
1621    This sets the acquire parameters for a specific acquire.
1622
1623Returns:
1624    TODO:
1625
1626See Also:
1627    BADS_GetAsyncStatus(), BADS_GetSoftDecision()
1628
1629****************************************************************************/
1630BERR_Code BADS_SetAcquireParams(
1631    BADS_ChannelHandle hChn ,           /* [in] Device channel handle */
1632    const BADS_InbandParam *ibParams          /* [in] Inband Parameters to use */
1633    );
1634
1635/***************************************************************************
1636Summary:
1637    This function retrieves the acquire parameters set for a specific ADS module.
1638
1639Description:
1640    This function gets the acquire parameters for a specific ADS module.
1641
1642Returns:
1643    TODO:
1644
1645See Also:
1646
1647****************************************************************************/ 
1648BERR_Code BADS_GetAcquireParams(
1649    BADS_ChannelHandle hChn ,           /* [in] Device channel handle */
1650    BADS_InbandParam *ibParams          /* [out] Inband Parameters to use */
1651    );
1652   
1653/***************************************************************************
1654Summary:
1655    This function tries to acquire downstream lock for the specific
1656    Qam In-Band Downstream module channel.
1657
1658Description:
1659    This function starts the process of trying to acquire a specific Qam
1660    In-Band Downstream channel. Once the acquistion process is started, the
1661    ADS module will notify the application when its lock status changes
1662    through a Callback function. ADS will try to maintain lock with the
1663    downstream signal. If ADS loses lock, it will notify the application and
1664    automatically try to reacquire the downstream. Once it reacquire downstream
1665    lock, it will notify the application.
1666
1667Returns:
1668    TODO:
1669
1670See Also:
1671
1672****************************************************************************/
1673BERR_Code BADS_Acquire(
1674    BADS_ChannelHandle hChn ,           /* [in] Device channel handle */
1675    BADS_InbandParam *ibParams          /* [in] Inband Parameters to use */
1676    );
1677
1678/***************************************************************************
1679Summary:
1680    This function enable the power-saver mode.
1681
1682Description:
1683    This function is responsible for enabling the downstream receiver
1684    power-saver mode.  When the BADS is in the power-saver mode, the
1685    Qam In-Band Downstream receiver is shutdown. BADS_Acquire() will
1686    disables power-saver mode automatically. Also BADS_DisablePowerSaver()
1687    can be used to disable power-saver mode.
1688
1689
1690Returns:
1691    TODO:
1692
1693See Also:
1694    BADS_Acquire()
1695
1696****************************************************************************/
1697BERR_Code BADS_EnablePowerSaver(
1698    BADS_ChannelHandle hChn             /* [in] Device channel handle */
1699    );
1700
1701
1702/***************************************************************************
1703Summary:
1704    This function disables the power-saver mode.
1705
1706Description:
1707    This function is responsible for disabling the downstream receiver
1708    power-saver mode.  When the BADS is in the power-saver mode, the
1709    Qam In-Band Downstream receiver is shutdown.
1710
1711
1712Returns:
1713    TODO:
1714
1715See Also:
1716    BADS_Acquire()
1717
1718****************************************************************************/
1719BERR_Code BADS_DisablePowerSaver(
1720    BADS_ChannelHandle hChn             /* [in] Device channel handle */
1721    );
1722
1723/***************************************************************************
1724Summary:
1725    This function is responsible for processing a notificiation for the specific
1726    Qam In-Band Downstream module channel.
1727
1728Description:
1729    This function needs to called when notification is received.
1730
1731Returns:
1732    TODO:
1733
1734See Also:
1735
1736****************************************************************************/
1737BERR_Code BADS_ProcessNotification(
1738    BADS_ChannelHandle hChn,                /* [in] Device channel handle */
1739    unsigned int event                      /* [in] Event code and event data*/
1740    );
1741
1742/***************************************************************************
1743Summary:
1744    This function is responsible for installing a callback function.
1745
1746Description:
1747    This function installs a callback function.
1748
1749Returns:
1750    TODO:
1751
1752See Also:
1753
1754****************************************************************************/
1755BERR_Code BADS_InstallCallback(
1756    BADS_ChannelHandle hChn,            /* [in] Device channel handle */
1757    BADS_Callback callbackType,         /* [in] Type of callback */
1758    BADS_CallbackFunc pCallback,        /* [in] Function Ptr to callback */
1759    void *pParam                        /* [in] Generic parameter send on callback */
1760    );
1761
1762/***************************************************************************
1763Summary:
1764    This function opens configures (enables/disables) the 31xx device's RF out for daisy chaining.
1765
1766Description:
1767    This function opens configures (enables/disables) the 31xx device's RF out for daisy chaining.
1768   
1769Returns:
1770    TODO:
1771
1772See Also:   
1773****************************************************************************/
1774BERR_Code BADS_SetDaisyChain(
1775    BADS_Handle hDev,       /* [in] Device channel handle */
1776    bool enableDaisyChain   /* [in] Eanble/disable daisy chain. */
1777    );
1778
1779/***************************************************************************
1780Summary:
1781    This function opens tells if the 31xx device's RF out daisy chaining is enabled/disabled.
1782
1783Description:
1784    This function opens tells if the 31xx device's RF out daisy chaining is enabled/disabled.
1785   
1786Returns:
1787    TODO:
1788
1789See Also:   
1790****************************************************************************/
1791BERR_Code BADS_GetDaisyChain(
1792    BADS_Handle hDev,           /* [in] Device channel handle */
1793    bool *isEnableDaisyChain    /* [out] Eanble/disable daisy chain. */
1794    );
1795
1796/***************************************************************************
1797Summary:
1798    This function resets the 31xx device's FEC bit error and block counters.
1799
1800Description:
1801   
1802Returns:
1803    TODO:
1804
1805See Also:   
1806****************************************************************************/
1807BERR_Code BADS_ResetStatus(
1808    BADS_ChannelHandle hChn     /* [in] Device channel handle */
1809    );
1810
1811/******************************************************************************
1812Summary:
1813   This function returns the BADS interrupt event handle.
1814Description:
1815 
1816Returns:
1817   BERR_Code
1818******************************************************************************/
1819BERR_Code BADS_GetInterruptEventHandle(
1820   BADS_Handle hDev,            /* [in] BADS handle */
1821   BKNI_EventHandle *phEvent /* [out] event handle */
1822);
1823
1824/******************************************************************************
1825Summary:
1826   This function returns the BADS interrupt event handle.
1827Description:
1828 
1829Returns:
1830   BERR_Code
1831******************************************************************************/
1832BERR_Code BADS_ProcessInterruptEvent(
1833   BADS_Handle hDev            /* [in] BADS handle */
1834);
1835
1836/******************************************************************************
1837Summary:
1838   This function stops the BADS timer.
1839Description:
1840 
1841Returns:
1842   BERR_Code
1843******************************************************************************/
1844BERR_Code BADS_Untune(
1845    BADS_Handle hDev                    /* [in] BADS handle */
1846);
1847
1848/******************************************************************************
1849Summary:
1850   This function allows the reading from a slave device attached to the demod chip.
1851Description:
1852 
1853Returns:
1854   BERR_Code
1855******************************************************************************/
1856BERR_Code BADS_ReadSlave(
1857    BADS_ChannelHandle hChn,     /* [in] Device channel handle */
1858        uint8_t chipAddr,                        /* [in] chip addr of the i2c slave device */
1859        uint32_t subAddr,                        /* [in] sub addr of the register to read from the slave device */
1860        uint8_t subAddrLen,                      /* [in] how many bytes is the sub addr? one to four*/
1861        uint32_t *data,                          /* [out] ptr to the data that we will read from the slave device */
1862        uint8_t dataLen                          /* [in] how many bytes are we going to read? one to four*/
1863);
1864
1865/******************************************************************************
1866Summary:
1867   This function allows the writing to a slave device attached to the demod chip.
1868Description:
1869 
1870Returns:
1871   BERR_Code
1872******************************************************************************/
1873BERR_Code BADS_WriteSlave(
1874    BADS_ChannelHandle hChn,     /* [in] Device channel handle */
1875        uint8_t chipAddr,                        /* [in] chip addr of the i2c slave device */
1876        uint32_t subAddr,                        /* [in] sub addr of the register to read from the slave device */
1877        uint8_t subAddrLen,                      /* [in] how many bytes is the sub addr? one to four*/
1878        uint32_t *data,                          /* [in] ptr to the data that we will write to the slave device */
1879        uint8_t dataLen                          /* [in] how many bytes are we going to write? one to four*/
1880);
1881
1882/******************************************************************************
1883Summary:
1884   This function will pass the scan parameter to ADS.
1885Description:
1886 
1887Returns:
1888   BERR_Code
1889******************************************************************************/
1890BERR_Code BADS_SetScanParam(
1891                BADS_ChannelHandle hChn,     /* [in] Device channel handle */ 
1892            BADS_ChannelScanSettings *pChnScanSettings /* [in] Set Channel setting */
1893);
1894
1895/******************************************************************************
1896Summary:
1897   This function will get the scan parameter from ADS.
1898Description:
1899 
1900Returns:
1901   BERR_Code
1902******************************************************************************/
1903BERR_Code BADS_GetScanParam (
1904                BADS_ChannelHandle hChn,     /* [in] Device channel handle */ 
1905                 BADS_ChannelScanSettings *pChnScanSettings /* [out] Returns channel default setting */
1906);
1907
1908/******************************************************************************
1909Summary:
1910   This function sends request for spectrum analyzer data to the LEAP.
1911Description:
1912 
1913Returns:
1914   BERR_Code
1915******************************************************************************/
1916BERR_Code BADS_RequestSpectrumAnalyzerData(
1917    BADS_ChannelHandle hChn,     /* [in] Device channel handle */ 
1918    BADS_SpectrumSettings *pSettings /* [in] spectrum settings */
1919    );
1920
1921/******************************************************************************
1922Summary:
1923   This function gets spectrum analyzer data from the LEAP.
1924Description:
1925 
1926Returns:
1927   BERR_Code
1928******************************************************************************/   
1929BERR_Code BADS_GetSpectrumAnalyzerData(
1930    BADS_ChannelHandle hChn,     /* [in] Device channel handle */ 
1931    BADS_SpectrumData  *pSpectrumData /* [out] spectrum Data*/
1932    );
1933   
1934#ifdef __cplusplus
1935}
1936#endif
1937
1938#endif
1939
Note: See TracBrowser for help on using the repository browser.