📄 hamaro_str.h
字号:
typedef struct HAMARO_CMPLXNO /* represents a floating-type number within driver */
{ /* without using floating pt numbers. For example, */
signed long integer; /* Example usage: */
unsigned long divider; /* 0:0 = 0; 1:0 = Div 0 Err; 1:1 = 1; -1:1 = -1 */
}HAMARO_CMPLXNO; /* double d = ((double)HAMARO_CMPLXNO.integer / (double)HAMARO_CMPLXNO.divider); */
/*******************************************************************************************************/
/* HAMARO_SYMBCNT */
/*******************************************************************************************************/
typedef struct HAMARO_SYMBCNT
{
unsigned char sce_data[HAMARO_MAX_SCE_SNAPSHOTS][HAMARO_MAX_SCE_RAW_BYTES]; /* raw SCE data */
long intportion; /* integer portion */
long fracportion; /* fraction portion */
} HAMARO_SYMBCNT;
/*******************************************************************************************************/
/* HAMARO_NIM */
/*******************************************************************************************************/
typedef struct HAMARO_NIM
{
char nim_start;
HAMARO_DEMOD demod_type; /* type of demod: (see enum DEMOD) */
unsigned long demod_handle; /* file-handle-like number passed via InitEnv() and sent */
/* to Read/Write demod functions */
unsigned char register_offset; /* for a dual demod system, the register address offset. */
unsigned long version; /* indicates that i/o can be performed, if chip ver is stored */
int version_minor; /* Driver minor version number */
HAMARO_CHANOBJ chanobj; /* copy of last chanobj passed through HAMARO_ChangeChannel() */
HAMARO_TRANSPEC tspec; /* holds copy of last transport-spec setting */
#if HAMARO_INCLUDE_DEBUG
HAMAROERRNO __errno; /* HAMARO_NIM error number last processed */
char *errfname; /* file name (or reg.map var.name) where err occurred, */
long errline; /* line number where error was encountered */
#endif /* HAMARO_INCLUDE_DEBUG */
unsigned long iostatus; /* warning number from SBread, SBwrite user functions */
HAMARO_IQPAK *iqpak; /* pointer to I,Q constellation data */
HAMARO_TUNER tuner_type; /* tuner type: Rosie, Judy,.... */
char *tuner_str; /* pointer to string containing name of tuner associated with HAMARO_NIM */
unsigned int vcoedgecnt; /* counts vco edge detection attempts */
unsigned long freq_ideal; /* Ideal frequency (Fi) (i.e. freq. entered in GUI) */
unsigned long pll_frequency; /* tuned-to (attempted to) frequency */
signed int lsba_adj; /* count of adjustments made to tuner A reg, to induce a 1mhx offset */
/* required to increase performance of 2nd nim at same freq */
unsigned long tuner_nar; /* copy of calulated nar bit-string */
unsigned long tuner_vco; /* copy of calc'd vco bit-string */
unsigned long symbol_rate_ideal; /* last symbol-rate setting read/written to demod */
unsigned long symbol_rate; /* last symbol-rate setting read/written to demod */
unsigned long lnboffset; /* copy of last LNB offset */
long berbusy; /* flag holding last ber count/status of ber collection */
long bytebusy; /* flag holding last byte err count/status */
long blockbusy; /* flag holding last block err count/status */
long pnberbusy; /* pnber flag holding las pn ber count/status */
long pnberpolarity; /* PN polarity (current polarity being used) */
long pnber_not_rdy_count; /* PN ber not ready count. used to flop polarity */
long berwindowsize; /* holds last window size programmed to demod for PN BERReadyCount[21:0] */
int temp_SyncPunctMode; /* holds last setting of MPEG->syncpunctmode before PN Ber */
unsigned long tuner_offset; /* tuner offset range in Hz. (CR 6243) */
long actual_tuner_offset; /* actual tuner offset in Hz. (CR 6243) */
unsigned long saved_frequency; /* saved Fi (freq-ideal) used during SWAssistTuner() */
int swa_count; /* counter used to determine resource piggyness */
/* esno **********************************************************************************************/
HAMARO_ESNO esno; /* esno est samples and table pointer */
HAMARO_CCDATA HAMARO_ccdata; /* register settings saved at e.o. change-challel */
HAMARO_ACQSTATE prevstate; /* previous acq state */
int prevstatecounter; /* counter used during HAMARO_Monitor() funct */
unsigned long binsize; /* */
int numofbins; /* */
long centfreqloc; /* */
#if HAMARO_INCLUDE_ROSIE
HAMARO_TUNERIO_METH TUNER_io_method; /* method at which tuner I/O is performed */
#endif
unsigned char ucTunerIoDefaultSettingsFlag; /* flag = 1 if tuner I/O default
settings have been set once */
HAMARO_ACTIVE_TUNER tuner; /* active tuner */
unsigned long antialias_bandwidthkhz;/* (CR 7482) last anti-alais BW setting */
unsigned long antialias_mV_setting; /* (CR 7482) last anti-alias BW mV setting */
/* pointer to user-defined wait function to be invoked when HAMARO_OS_Wait() is called (if NULL is passed, */
BOOL (*wait)(struct HAMARO_NIM *nim,int mscount);/* the default HAMARO_DRIVER_wait() function is used) */
/* init. values from InitEnvironment() ***************************************************************/
unsigned long xtal;
unsigned long crystal_freq; /* tuner refclockout */
unsigned long tuner_crystal_freq; /* demod reference clock */
HAMARO_MPEG_OUT mpeg_out; /* nim's internal mpeg struct, hold current settings */
/* ser.bus Settings *********************************************************************************/
HAMARO_WRITE_SB SBWrite; /* ser.bus write() function (pointer to) */
HAMARO_READ_SB SBRead; /* ser.bus read() function (pointer to) */
HAMARO_CODERATE CLKSMDIV_CR; /* last coderate locked-to (used within clksmoothdiv set-up) */
HAMARO_CLOCKSMOOTHDIV CLKSMDIV_flag; /* if 1, then actual locked-to coderate may be unknown (so HAMARO_Monitor() */
/* must re-calc MPEG clkcmoother div value) */
HAMARO_SYMBCNT symbcnt; /* storage for symbol-count data */
unsigned long pdmfout; /* pdmfout register gain setting */
/* Shadow register values */
unsigned char ucPLLMult_shadow; /* shadow value of PLLMult */
#if HAMARO_INCLUDE_BANDWIDTHADJ
unsigned long anti_alias_bandwidth;
BOOL tuner_bw_adjust;
unsigned long shadowed_tuner_freq;
unsigned long shadowed_tuner_lnboffset;
HAMARO_SYMBRATE shadowed_tuner_symbrate;
#endif /* HAMARO_INCLUDE_BANDWIDTHADJ */
unsigned long sample_freq_less_than_4msps; /* for symbol rate < 4 MSps */
unsigned long sample_freq_nom_val;
}HAMARO_NIM;
/*******************************************************************************************************/
/* HAMARO_NIM_LIST */
/*******************************************************************************************************/
typedef struct
{
int nim_cnt; /* count of nims in list */
HAMARO_NIM *nim[HAMARO_MAX_NIMS]; /* list of NIMs maintained by current invocation of the driver */
}HAMARO_NIM_LIST;
/*******************************************************************************************************/
/* NIM_ERROR -- struct used to store error-decoding and string info */
/*******************************************************************************************************/
typedef struct HAMARO_NIM_ERROR
{
HAMAROERRNO __errno; /* error number */
char *errstr; /* associated error string */
}HAMARO_NIM_ERROR;
/*******************************************************************************************************/
/* HAMARO_LOCKIND */
/*******************************************************************************************************/
typedef struct HAMARO_LOCKIND
{ /* Lock Indicators: used to determine LED status on GUI */
BOOL pll; /* tuner LD gpio pin (indicates tuner pll lock) */
BOOL demod_pll; /* PLL locked if TRUE */
BOOL demod; /* DEMOD locked if TRUE */
BOOL viterbi; /* Viterbi locked if TRUE */
BOOL reedsolomon; /* reedsolomon (RS) locked if TRUE */
BOOL descramble; /* descramble locked if TRUE */
BOOL syncbyte; /* syncbyte locked */
}HAMARO_LOCKIND; /* BOOL's not used in B/Q/8 psk will be set to FALSE */
/*******************************************************************************************************/
/* VITIST (used Hamaro_drv.c) */
/*******************************************************************************************************/
typedef struct HAMARO_VITLIST
{ /* viterbi search list: (allows prioritized search) */
int vcnt; /* count of items in list */
HAMARO_CODERATE viterbi_list[HAMARO_MAX_VLIST]; /* viterbi search list */
}HAMARO_VITLIST;
/*******************************************************************************************************/
/* HAMARO_VERDRV */
/*******************************************************************************************************/
typedef struct HAMARO_VERDRV
{
char version_str[HAMARO_MAX_VERLEN]; /* string containing driver-specific version info */
}HAMARO_VERDRV;
/*******************************************************************************************************/
/*******************************************************************************************************/
/*******************************************************************************************************/
#endif /* #ifndef HAMARO_STR_H_DEFINED */
/* CR 9509 : Add an extra newline */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -