phantom_struct.h

来自「QPSK Tuner details, for conexant chipset」· C头文件 代码 · 共 208 行

H
208
字号
#ifndef PHANTOM_STRUCT_H_DEFINED
#define PHANTOM_STRUCT_H_DEFINED

/* phantom_struct.h */
/*+++ *******************************************************************\
*
*  Abstract:
*
*       Contains various Phantom structures.
*
*  Created: 3/30/2004
*
*  Author: Amarnath Puttur
*
*  Copyright and Disclaimer: 
*  
*     --------------------------------------------------------------- 
*     This software is provided "AS IS" without warranty of any kind, 
*     either expressed or implied, including but not limited to the 
*     implied warranties of noninfringement, merchantability and/or 
*     fitness for a particular purpose.
*     --------------------------------------------------------------- 
*   
*     Copyright (c) 2004 Conexant Systems, Inc. 
*     All rights reserved. 
*
\******************************************************************* ---*/
  
/*******************************************************************************************************/
/* PHANTOM_CHANOBJ -- Channel object */
/*******************************************************************************************************/
typedef struct PHANTOM_CHANOBJ
{                                           /* channel object structure passed via ChangeChannel() */
	unsigned long        frequency;              /* tuner frequency in kHz */
	PHANTOM_SYMBRATE     symbrate;               /* symbol rate (kSps) */
	PHANTOM_ACQ_MODE     acqmode;                /* blind/quick acquisition mode */
	PHANTOM_SPEC_INV     specinv;                /* spectral inversion */
    PHANTOM_RX_OPER_MODE rx_operation_mode;      /* receiver operation mode */
    PHANTOM_PILOT        pilot;
	PHANTOM_LNBDC_LEVEL  lnbdc;                  /* lnb polarity */
	PHANTOM_LNBTONE      lnbtone;                /* lnb tone */
	PHANTOM_ROLLOFF      rolloff;                /* matched filter roll-off factor */
	unsigned long        lnb_offset;             /* lnb offset */
	unsigned short       requested_search_range; /* requested freq search range in kHz  */
	unsigned int         viterbicoderates;       /* additional code rates for DTV and DVB */
}PHANTOM_CHANOBJ;


/*******************************************************************************************************/
/* PHANTOM_MPEG_OUT */
/*******************************************************************************************************/
typedef struct
{
	PHANTOM_OUTPUT_MODE           output_mode;             /* MPGDataWidth      */
	PHANTOM_CLK_PARITY_MODE       clk_parity_mode;
	PHANTOM_SYNC_BYTE_INSERT_MODE insert_sync_byte;        /* MPGSyncByteInsert */
	PHANTOM_TEI_BIT               tei_bit;                 /* TEI bit           */
	PHANTOM_INVERT_CLK            invert_clk;              /* InvertClk         */

	PHANTOM_NULL_DATA_MODE        null_data_mode;          /* MPGFixNullDataEn  */
	PHANTOM_NULL_DATA_VALUE       null_data_value;         /* MPGNullDataVal    */

	PHANTOM_CNTL_SIGNAL_POL       start_signal_polarity;   /* MPGStartPol       */
	PHANTOM_START_SIGNAL_WIDTH    start_signal_width;      /* MPGStartMode      */
	PHANTOM_CNTL_SIGNAL_POL       valid_signal_polarity;   /* MPGValidPol       */
	PHANTOM_CNTL_SIGNAL_MODE      valid_signal_active_mode;/* MPGValidMode      */
	PHANTOM_CNTL_SIGNAL_POL       fail_signal_polarity;    /* MPGFailPol        */
	PHANTOM_CNTL_SIGNAL_MODE      fail_signal_active_mode; /* MPGFailMode       */
	PHANTOM_CLKOUT                clk_out_edge;            /* MPGClkPos[1:0]    */

    PHANTOM_TSTATE                tristate_config;         /* MPEG output enable control */
    unsigned char                 extra_clocks_between_packets; 
} PHANTOM_MPEG_OUT;

/*******************************************************************************************************/
/* PHANTOM_M_N */
/*******************************************************************************************************/
typedef struct _m_n_
{
   unsigned long  m;
   unsigned long  n;
   unsigned short m_n_rate; /* 2^8*(m/n) */
} PHANTOM_M_N;

/*******************************************************************************************************/
/* PHANTOM_NIM */
/*******************************************************************************************************/
typedef struct PHANTOM_NIM
{
    char                   nim_start;
    PHANTOM_DEMOD          demod_type;        /* type of demod */
    unsigned long          demod_handle;      /* file-handle-like number passed via InitEnv() and sent */
    unsigned char          chip_version;      /* HW chip version */
                                              /* to Read/Write demod functions */
    PHANTOM_TUNER_REF_CLOCKOUT_DIV tuner_ref_clkout_div; /* tuner's post divide setting */
    unsigned long          demod_ref_clock;   /* demod's reference clock */

    unsigned long          version;           /* indicates that i/o can be performed, if chip ver is stored */
    int                    version_minor;     /* Driver minor version number */

    PHANTOM_RX_OPER_MODE   rx_operation_mode; /* receiver operation mode */

    unsigned long          iostatus;          /* warning number from SBread, SBwrite user functions */
    unsigned long          freq_ideal;        /* Freq. entered by the host app */                                  
    unsigned long          symbol_rate;       /* Last symbol-rate setting read/written to demod */
    unsigned char          pll_sdiv;          /* PLL_SDIV : 0xF2[7:0] */
    unsigned long          vco_freq;          /* VCO frequency */

    PHANTOM_ACQ_STATE      prev_acqstate;     /* previous acq state */
    PHANTOM_TRACKING_STATE track_state;       /* tracking state */

    unsigned long          crystal_freq;      /* rate in hz of crystal soldered to nim board */
    PHANTOM_MPEG_OUT       mpeg_out;          /* nim's internal mpeg struct, hold current settings */
    PHANTOM_PILOT          last_pilot;

    /* ser.bus Settings  */
    PHANTOM_WRITE_SB       SBWrite;           /* ser.bus write() function (pointer to)  */
    PHANTOM_READ_SB        SBRead;            /* ser.bus read() function (pointer to) */
    PHANTOM_MULTI_WRITE_SB SBMultiWrite;      /* ser.bus multi byte write() function (pointer to)  */

    BOOL                   tuner_bw_adjust;   /* controls the BW adjustment requirement */
    BOOL                   mpeg_clock_rate_adjust; /* Adjust output rate when extra clocks between packets are requested */
    /* shadowed register values */
    unsigned long          sample_frequency;  /* shadow value of sample frequency for the current mode */
    signed char            tuner_gain_thresh; /* Shadowed threshold in dBm */
}PHANTOM_NIM;


/*******************************************************************************************************/
/* PHANTOM_NIM_LIST */
/*******************************************************************************************************/
typedef struct
{
	PHANTOM_NIM  *nim[PHANTOM_MAX_NIMS];                 /* list of NIMs maintained by current invocation of the driver */
}PHANTOM_NIM_LIST;


/*******************************************************************************************************/
/* PHANTOM_LOCKIND */
/*******************************************************************************************************/
typedef struct PHANTOM_LOCKIND                
{                                      /* Lock Indicators:  used to determine LED status on GUI */
	BOOL   pll;                          /* Indicates tuner pll lock */
	BOOL   demod_sync;                   /* PLL locked if TRUE */
	
    BOOL   ldpc;                         /* LDPC lock if TRUE */
	BOOL   viterbi;                      /* Viterbi locked if TRUE and LDPC will be FALSE */
	
    BOOL   bch;                          /* BCH lock if TRUE */
    BOOL   reed_solomon;                 /* Reedsolomon (RS) locked if TRUE */

    BOOL   lp;                           /* BCH: Low Priority of H8PSK */
}   PHANTOM_LOCKIND;                             


/*******************************************************************************************************
 * PHANTOM_STATUSPARAM
 *******************************************************************************************************/
typedef struct PHANTOM_STATUSPARAM
{
	unsigned long   symbol_rate;        /* kSps */
	unsigned char   specinv;            /* 1 = inverted */
	long            ctl;                /* kHz   */
	long            btl;                /* kSps  */
	unsigned char   saturated;          /* 1 = saturated */
	long            bits_per_symbol;    
    unsigned short  esno_estimate;      /* in dB x 10 */
    unsigned long   corr_bit_err;    
    unsigned short  uncorr_frame_err;
    unsigned short  crc_frame_err;
	PHANTOM_MSTATUS ber_mstatus;        /* for RS/BCH BER and PER : PHANTOM_MSTATUS_READY/PHANTOM_MSTATUS_NOT_READY */
    PHANTOM_MSTATUS crc_pkterr_mstatus; /* for CRC8 PER */
    unsigned short  crc_win_adjustment;   /* window adjustment */
    unsigned short  ber_win_adjustment;   /* window adjustment */
	signed char     power_estimation;   /* Range -25 dBm to -70 dBm. Estimated input power */
	PHANTOM_LOCKIND lock_indicator;     /* lock status */  
} PHANTOM_STATUSPARAM;


/*******************************************************************************************************/
/* PHANTOM_DRIVER_VERSION */
/*******************************************************************************************************/
typedef struct PHANTOM_DRIVER_VERSION
{
	char     version_str[PHANTOM_MAX_VERSION_LENGTH];    /* string containing driver-specific version info */
} PHANTOM_DRIVER_VERSION;

/*******************************************************************************************************/
/* Software Download Structure */
/*******************************************************************************************************/
typedef struct 
{
	unsigned long code_length;
	unsigned char *p_code;
} PHANTOM_SW_DOWNLOAD;

/*******************************************************************************************************/
/* BCDNO */
/*******************************************************************************************************/
typedef struct PHANTOM_BCDNO
{                                      /* binary-coded-decimal struct */
	signed char  sign[1];                        /* size: '-' if negative value */
	signed char  digits[PHANTOM_MAX_BCDNO+1];    /* storage for bcd number */
} PHANTOM_BCDNO;


#endif  /* #ifndef PHANTOM_STRUCT_H_DEFINED */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?