📄 snimdefs.h
字号:
/*******************Zarlink Semiconductor Swindon UK******************************\
* $Workfile:: SnimDefs.h $ *
* $Revision:: 1.0 $ *
* Author: Colin E Undery *
* $Date:: 10 Oct 2006 11:21:28 $ *
* Description: non exported defintions used by the driver *
* *
* Revision History: *
* Version Reason Author Date *
* 1 Created Colin E Undery 27/1/2002 *
* *
* *
***********************************************************************************
* *
* Copyright ?Zarlink Semiconductor Ltd.,2002-2004. All rights reserved. This *
* copyrighted work constitutes an unpublished work created in 2004. Use of the *
* copyright notice is intended to provide notice that Zarlink Semiconductor Ltd *
* owns a copyright in this unpublished work; the copyright notice is not an *
* admission that publication has occurred. This work contains confidential, *
* proprietary information and trade secrets of Zarlink Semiconductor Ltd; it may *
* not be used,reproduced, transmitted,or modified, in whole or in part, in any *
* form or by any means without the prior written permission of Zarlink *
* Semiconductor Ltd. This work is provided on a right to use basis subject to *
* additional restrictions set out in the applicable license or other agreement. *
* *
\*******************Zarlink Semiconductor Swindon UK******************************/
#ifndef _357013F430DC43daAFFA6C66BFA7976F_
#define _357013F430DC43daAFFA6C66BFA7976F_
#include "snimdriv.h"
/*
demodulator state machine internal states
do not change sequence, since some states are used as general indicators
for example SNIM_DEMODFSM_SCANINIT is used by AbortScanSnim() to test if scan
is in progress
*/
typedef enum EDemodFsmStatesSnim
{
/* power control */
SNIM_DEMODFSM_OFF =0, /* chip is unpowered, or not located */
SNIM_DEMODFSM_WAITRESET, /* waiting for reset line release, prior to run mode */
SNIM_DEMODFSM_STANDBY, /* chip is powered, reset but in standby mode */
SNIM_DEMODFSM_IDLE, /* chip is powered, active and intitialised, but no locked*/
SNIM_DEMODFSM_TRAININIT, /* initialise tuner training*/
SNIM_DEMODFSM_TRAIN, /*in tuner training mode */
/* Channel Acquisition */
SNIM_DEMODFSM_ACQUIRE, /* launch Acquisition process*/
SNIM_DEMODFSM_WAITBPS, /* waiting for BandPolarSat state machine */
SNIM_DEMODFSM_WAITBPS_EXT, /* waiting for BandPolarSat fsm (external command)*/
SNIM_DEMODFSM_WAITLOCK, /* waiting for lock state machine*/
SNIM_DEMODFSM_INITLOCK, /* One off processing when lock starts or restarts e.g. zero error counters*/
SNIM_DEMODFSM_LOCK, /* chip is in locked state*/
SNIM_DEMODFSM_UNLOCK, /* chip has lost lock, waiting for auto relock */
/* scanning */
SNIM_DEMODFSM_SCANINIT, /* initializing scan */
SNIM_DEMODFSM_SCANNEW, /* start a new scan */
SNIM_DEMODFSM_SCANWAITBPS, /* waiting for BandPolarSat state machine */
SNIM_DEMODFSM_SCANWAITBPS_EXT, /* waiting for BandPolarSat FSM external command*/
SNIM_DEMODFSM_SCANWAITLOCK, /* waiting for lock state machine*/
SNIM_DEMODFSM_SCANFOUND, /* calculate found channel details */
SNIM_DEMODFSM_SCANSTOP /* wait for caller to read channel information */
}EDemodFsmStatesSnim;
/*internal commands used to program state machine*/
typedef enum EDemodCommandSnim
{
SNIM_FSMCOMMAND_NULL =0,
SNIM_FSMCOMMAND_OFF,
SNIM_FSMCOMMAND_STANDBY,
SNIM_FSMCOMMAND_RUN,
SNIM_FSMCOMMAND_NEWCHAN,
SNIM_FSMCOMMAND_SCAN,
SNIM_FSMCOMMAND_PROCEED,
SNIM_FSMCOMMAND_SCANABORT,
SNIM_FSMCOMMAND_BPSDONE,
SNIM_FSMCOMMAND_TRAIN
}EDemodCommandSnim;
/* internal states used by _LockFsmSnim fsm (stored in psSnim.LockBPSfsmState)*/
typedef enum ELockFsmStatesSnim
{
SNIM_LOCKFSM_IDLE=0,
SNIM_LOCKFSM_LOCK,
SNIM_LOCKFSM_BUSY, /* Busy state low water mark, not a real state*/
SNIM_LOCKFSM_START, /* set to this state before calling to start process */
SNIM_LOCKFSM_WAITTUNER,
SNIM_LOCKFSM_WAITQPSK,
SNIM_LOCKFSM_WAITFEC,
/* lock failed do not change order or insert see ESnimState*/
SNIM_LOCKFSM_PLL_TO, /* tuner pll did not lock within timeout */
SNIM_LOCKFSM_QPSK_TO, /* QPSK did not lock within timeout */
SNIM_LOCKFSM_FEC_TO, /* FEC did not lock within timeout*/
SNIM_LOCKFSM_COM_ERR
}ELockFsmStatesSnim;
/* internal states used by _BPSFsmSnim fsm (stored in psSnim.LockBPSfsmState)*/
typedef enum EBPSFsmStatesSnim
{
SNIM_BPSFSM_IDLE, /* ending state - failed*/
SNIM_BPSFSM_DONE, /* ending state - finished OK*/
SNIM_BPFSM_BUSY, /* dummy state, busy above this*/
SNIM_BPSFSM_STARTSAT, /* launch condition*/
SNIM_BPSFSM_WAITTONEOFF, /* wait for 22kHz hi band tone to turn off */
SNIM_BPSFSM_SENDBURST, /* start 22kHz tone burst*/
SNIM_BPSFSM_WAITBURST, /* wait for it*/
SNIM_BPSFSM_WAITSATSWITCH, /* wait for satellite switch to settle */
SNIM_BPSFSM_SETBAND, /* Set hi/lo band*/
SNIM_BPSFSM_SETPOLAR, /* set polarisation*/
SNIM_BPSFSM_WAITLNBSETTLE, /* allow LNB settling*/
SNIM_BPFSM_WAITING, /* dummy state, waiting for external action*/
SNIM_BPSFSM_WAITEXTSAT, /* waiting for sat switch*/
SNIM_BPSFSM_WAITEXTBAND, /* waiting for band switch*/
SNIM_BPSFSM_WAITEXTPOLAR /* waiting for polariser to be set*/
}EBPSFsmStatesSnim;
typedef enum EDiSEqCFsmStatesSnim
{
SNIM_DISEQCFSM_IDLE =0,
SNIM_DISEQCFSM_START,
SNIM_DISEQCFSM_TXWAIT,
SNIM_DISEQCFSM_RXWAIT
}EDiSEqCFsmStatesSnim;
/* DiSEqC 2 interrupt register */
#define SNIM_DSQ_STAT_RXNOREPLY 0x08 /* the receiver timed out */
#define SNIM_DSQ_STAT_RXMESSAGE 0x02 /* a message is available to read */
#define MT312_XTAL 10111 /* default crystal frequency */
#define MT312_ADDRESS 28
/* timers used in the system */
#define SNIM_DEMODFSM_TIMER 0 /* used for general state machine control */
#define SNIM_GENERAL_TIMER 1 /* used for general time-outs */
#define SNIM_DISEQC_TIMER 2 /* used by diSEqC state machine */
#define SNIM_RSUBC_TIMER 3 /* used to update the RSUBC measurement*/
#define SNIM_TIMERS_QTY 4 /* total number of timers */
/*Timer settings in milliseconds*/
#define SNIM_TIMEOUT_TUNERLOCK 250 /*timeout for tuner frequency lock */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -