📄 clidi.h
字号:
/*---------------------------------------------------------------------*
* *
* THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY *
* INFORMATION. IF PUBLICATION OCCURS, THE FOLLOWING NOTICE APPLIES: *
* "COPYRIGHT 2001 MICHAEL TSIROULNIKOV, ALL RIGHTS RESERVED" *
* *
*---------------------------------------------------------------------*/
#ifndef _clidi_h
#define _clidi_h
#include "stddefs.h"
#include "clid_miket.h"
/*--------------------- local defs ------------------------------------*/
#if ! defined (absval)
#define absval(x) ((x)>0)? (x): -(x)
#endif
#define CLID_MODE_TYPE1 (1)
#define CLID_MODE_TYPE2 (2)
#define CLID_MODE_CAS (3)
#define CLID_ST_IDLE (0)
#define CLID_ST_REVERSAL (1)
#define CLID_ST_MARKS (2)
#define CLID_ST_DATA (3)
#define CLID_ST_DONE (4)
#define CLID_ST_MAX (5)
#define CLID6_FR_SZ ((ICLID_FR_SZ*6)/8)
#define CLID_MAX_MARKS (10)
#define CLID_ALIGN_TAU (100)
#define CLID_SHIFT (4)
#define CLID_BPF_SZ (11)
#define CLID_BPF_SSZ (CLID_BPF_SZ)
#define CLID_BPF_ASZ (CLID_BPF_SSZ+ICLID_FR_SZ)
#define CLID_LPF_SZ (17)
#define CLID_LPF_SSZ (CLID_LPF_SZ)
#define CLID_LPF_ASZ (CLID_LPF_SZ+ICLID_FR_SZ)
#define CLID_MF_SZ (6)
#define CLID_MF_SSZ (CLID_MF_SZ)
#define CLID_MF_ASZ (CLID_MF_SZ+CLID6_FR_SZ)
#define CLID_OUT_SSZ (54)
#define CLID_OUT_ASZ (CLID_OUT_SSZ+CLID6_FR_SZ)
#define CLID_CAS_IDX (4)
#define CLID_CAS_FD_SSZ (4)
#define CLID_CAS_FD_ASZ (CLID_CAS_FD_SSZ+CLID_CAS_IDX)
#define CLID_CAS_BP_SSZ (100)
#define CLID_CAS_BP_ASZ (CLID_CAS_FD_SSZ+ICLID_FR_SZ)
#define CLID_CAS_LO_MIN_EN_MASK (0x0001)
#define CLID_CAS_LO_MAX_EN_MASK (0x0002)
#define CLID_CAS_LO_FREQ_DEV_MASK (0x0004)
#define CLID_CAS_TWIST_MASK (0x0008)
#define CLID_CAS_HI_MIN_EN_MASK (0x0010)
#define CLID_CAS_HI_MAX_EN_MASK (0x0020)
#define CLID_CAS_HI_FREQ_DEV_MASK (0x0040)
/* aliased with start of CLID_tDb */
typedef struct
{
S16 asBpSav[CLID_CAS_BP_SSZ];
S16 asLoI[CLID_CAS_FD_ASZ];
S16 asLoQ[CLID_CAS_FD_ASZ];
S16 asHiI[CLID_CAS_FD_ASZ];
S16 asHiQ[CLID_CAS_FD_ASZ];
} CLID_tCasDb;
typedef struct
{
U16 auByteStorage[ICLID_MSG_SZ];
S16 asBpSav[CLID_BPF_SSZ];
S16 asLpISav[CLID_LPF_SSZ];
S16 asLpQSav[CLID_LPF_SSZ];
S16 asMfISav[CLID_MF_SSZ];
S16 asMfQSav[CLID_MF_SSZ];
S16 asOutSav[CLID_OUT_SSZ];
S16 sIsOn;
S16 sState;
S16 sAlignment;
S16 sStart;
S16 sCurrBitLen;
S16 sBits;
S16 sBytes;
S16 sLen;
S16 sCheckSum;
S16 sEven;
S16 sCasIdx;
U16 uCasReg;
ICLID_tCfg Cfg;
CLID_MIKET_tStts Stts;
} CLID_tDb;
typedef struct
{
S16 sLoIC1;
S16 sLoQC1;
S16 sLoIS1;
S16 sLoQS1;
S16 sLoIC2;
S16 sLoQC2;
S16 sLoIS2;
S16 sLoQS2;
S16 sHiIC1;
S16 sHiQC1;
S16 sHiIS1;
S16 sHiQS1;
S16 sHiIC2;
S16 sHiQC2;
S16 sHiIS2;
S16 sHiQS2;
S16 sLoEn;
S16 sLoFreq;
S16 sHiEn;
S16 sHiFreq;
S16 sTest;
} CLID_tCas;
typedef struct
{
S16 asBp [CLID_BPF_ASZ];
S16 asLpI [CLID_LPF_ASZ];
S16 asLpQ [CLID_LPF_ASZ];
S16 asMfI [CLID_MF_ASZ];
S16 asMfQ [CLID_MF_ASZ];
S16 asOut [CLID_OUT_ASZ];
CLID_tCas Cas;
S16 asCasBp [CLID_CAS_BP_ASZ];
S16 asCasLoI[CLID_CAS_FD_ASZ];
S16 asCasLoQ[CLID_CAS_FD_ASZ];
S16 asCasHiI[CLID_CAS_FD_ASZ];
S16 asCasHiQ[CLID_CAS_FD_ASZ];
S16 asSum [CLID_SHIFT];
U16 auByte[CLID_SHIFT];
S16 sAlignment;
S16 sBits;
S16 sCurrBitLen;
S16 sAverage;
} CLID_tSc;
/*--------------------- public vars- ----------------------------------*/
/*--------------------- local vars ------------------------------------*/
extern const S16 CLID_asBpfI[];
extern const S16 CLID_asBpfQ[];
extern const S16 CLID_asMfI[];
extern const S16 CLID_asMfQ[];
extern const S16 CLID_as1700[];
extern const S16 CLID_asLpf24[];
extern const S16 CLID_asShape[];
extern const S16 CLID_asCasLoI[];
extern const S16 CLID_asCasLoQ[];
extern const S16 CLID_asCasHiI[];
extern const S16 CLID_asCasHiQ[];
extern const S16 CLID_asCasFd[];
/*--------------------- local functions -------------------------------*/
extern S16 _en2log(S32 slEn);
extern void clid_move_data_in (CLID_tDb *pDb, CLID_tSc *pSc, S16 *psIn);
extern void clid_move_data_out (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_bp_filter (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_convert_baseband (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_resample_6k (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_matched_filter (CLID_tDb *pDb, CLID_tSc *pSc);
extern S16 clid_match_byte (S16 *psBuff, U16 *puByte);
extern void clid_cas_move_data_in (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_cas_bp_filter (CLID_tDb *pDb, CLID_tSc *pSc, S16 *psIn);
extern void clid_cas_freqdet_flt (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_cas_freqdet (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_cas_test (CLID_tDb *pDb, CLID_tSc *pSc);
extern void clid_cas_move_data_out (CLID_tDb *pDb, CLID_tSc *pSc);
#if !defined (_dsp)
extern void clid_compare(S16 sBytes, U16 uByte);
#endif
/*--------------------- public functions -----------------------------*/
/*---------------------------------------------------------------------*/
#endif /* _clidi_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -