📄 cu1216.h
字号:
#ifndef __CU1216
#define __CU1216
#include "DemodDrv.h"
#include "i2c.h"
//
// The demodulator handle
//
#if 0
typedef struct {
int Cu1216_Index;
unsigned int uTimer1Start;
unsigned int uTimer1End;
unsigned int uTimer0Start;
unsigned int uTimer0End;
I2C_PORT iPinType;
} DEMOD_CABLE_DATA;
#endif
//-----------------------------------------------------------------------------
// New add type by TCL DTV:
// Date Author Description
//2004.3.10 pddsyj signal input type
//-----------------------------------------------------------------------------
//
typedef struct
{
long Frequency ; /* carrier frequency (in Hz) */
long SymbolRate; /* Symbol Rate (in Baud) */
int QAMSize; /* QAM size (16/32/64/128/256) */
} SIGNAL;
#define CABLE_I2C_PIN_SET I2C_PIN_SET2
// //////////////////////////////////////////////////////////////////////////
// Function Name:
// Cu1216_Init
//
// Input Parameters:
// None
//
// Return Value:
// None
//
// Description:
// Initial the DEMOD driver, This function need to call once at the power-
// up stage.
// //////////////////////////////////////////////////////////////////////////
extern void Cu1216_Init(DEMOD_HANDLE handle, int iIndex);
extern int Cu1216_Connect( DEMOD_HANDLE handle, o_dvb_delivery *tuning_info);
extern int Cu1216_SetLnb(DEMOD_HANDLE handle, o_demodulator_lnb *pLnb);
void Cu1216_AbortScan( DEMOD_HANDLE handle );
// //////////////////////////////////////////////////////////////////////////
// Function Name:
// Cu1216_GetSignalData
//
// Input Parameters:
// pSignal - o_demodulator_signal defined by OpenTV
//
// Return Value:
// Dcf8710_GetSignalData is always considered valid, whether the demodulator
// is locked or not, and irrespective of whether the demodulator is being
// used for scanning (through the requests above) or is connected using the
// normal demodulator functions. A FAILURE response is expected only if the
// demodulator control driver does not provide the capability. A set request
// is always invalid and should result in an immediate FAILURE response.
//
// Description:
// Gets information on the quality of the signal being received by the
// tuner and demodulation hardware.
// //////////////////////////////////////////////////////////////////////////
extern int Cu1216_GetSignalData(DEMOD_HANDLE handle, o_demodulator_signal *pSignal);
extern int Cu1216_GetSignalData1(DEMOD_HANDLE handle, unsigned long *Ber);
extern int Cu1216_GetSignalData2(DEMOD_HANDLE handle, unsigned char *Lvl);
// //////////////////////////////////////////////////////////////////////////
// Function Name:
// Cu1216_ScanRequest
//
// Input Parameters:
// pRequest - Pointer to o_demodulator_scan_request defined in OpenTV
//
// Return Value:
// If the scanning operation is still in progress or an error was encountered, the
// demodulator control driver should return FAILURE for a get request. Similarly,
// the demodulator control driver should return FAILURE for a set operation if a
// scanning operation is in progress or a located signal source has not been
// unlocked.
//
// Description:
// Initiates a scanning operation for the demodulator identified by the
// last successful Dcf8710_SetScanMode (per demodulator).
// When the demodulator locates a signal or encounters an error, a callback
// called with NOTIFY_Dcf8710_LOCKED.
// //////////////////////////////////////////////////////////////////////////
extern int Cu1216_ScanRequest(DEMOD_HANDLE handle, o_demodulator_scan_request *pRequest ,unsigned long *ulScanSymbolRates);
// //////////////////////////////////////////////////////////////////////////
// Function Name:
// Cu1216_GetScanRequest
//
// Input Parameters:
// pRequest :
//
// Return Value:
// 0 on fail 1 on success.
//
// Description:
// Retrieves connection information for this demodulator when a signal is
// successfully locked.
// //////////////////////////////////////////////////////////////////////////
extern int Cu1216_GetScanRequest(DEMOD_HANDLE handle, o_demodulator_scan_request *pRequest );
// //////////////////////////////////////////////////////////////////////////
// Function Name:
// Cu1216_GetScanProgress
//
// Input Parameters:
// demodulator - demodulator ID
//
// Return Value:
// Number between 0 to 100 which represent the location of the current
// demodulator frequency in the demodulator frequency range
//
// Description:
// This function return the percentage of the current frequency in the totlal
// possible frequency range of the specify demodulator. It may use for
// display a progress bar while the auto scanning is active
// //////////////////////////////////////////////////////////////////////////
extern int Cu1216_GetScanProgress(DEMOD_HANDLE handle, unsigned long demodulator);
// //////////////////////////////////////////////////////////////////////////
// Function Name:
// Cu1216_GetType
//
// Input Parameters:
// o_demodulator_type - Define in OpenTV specification includes two fields:
// index - Specifies a value between zero and (number_of_demodulators-1),
// where the number_of_demodulators value is obtained from the
// Dcf8710_Query.
// demodulator - Is a returned value that identifies the type of demodulator
// device using the following OpenTV-defined types:
// SATELLITE_DEMOD 0x0100 to 0x01ff
// CABLE_DEMOD 0x0200 to 0x02ff
// TERESTRIAL_DEMOD 0x0300 to 0x03ff
//
// Return Value:
// The demodulator control driver should return FAILURE if the provided index is
// invalid.
//
// Description:
// This function retrieves the type of specific demodulator
// //////////////////////////////////////////////////////////////////////////
int Cu1216_GetType(DEMOD_HANDLE handle);
DTV_BOOL Cu1216_CheckI2cPin( I2C_PORT iPinType );
void Cu1216_IdleDemod( DEMOD_HANDLE handle );
void Cu1216_UnIdleDemod( DEMOD_HANDLE handle );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -