⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drv2005.h

📁 mstar 776 开发的车载dvd
💻 H
📖 第 1 页 / 共 4 页
字号:
 **********************************************************************/
DRV2_API Data16 NxtSetMpegMode(void *pContext,
					Bool bGatedOutputEnable,
					Bool bContinuousRateEnable,
					Bool bParallelOutputEnable,
					Bool bHeaderEnable);
 
/**********************************************************************
 *
 * NxtSetAuxAgcMode
 *
 * Defines whether the tuner supports an auxiliary AGC voltage
 * in addition to the RF and IF AGC voltages.
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	Bool bAuxAgcPresent - TRUE for tuners with aux AGC, FALSE otherwise
 *
 * Returns:
 *	Data16 - NXT_NO_ERROR, no errors
 *           NXT_ERR_INIT, DCB has not been initialized
 *
 * Notes:
 *	bAuxAgcPresent defaults to FALSE if this call is never made.
 *
 *	bAuxAgcPresent affects the AGC Take-Over-Point operation that is
 *	started by calling NxtTopStart().
 *
 *  The user can query the tuner driver with the function NxtTunerIOCTL()
 *  and see if Aux AGC is supported with the NxtTunerIOCTL Function Code
 *  NXT_TUNER_AUXAGC_SUPPORTED.
 *
 **********************************************************************/
DRV2_API Data16 NxtSetAuxAgcMode(void *pContext,
					Bool bAuxAgcPresent);

/**********************************************************************
 *
 * NxtSetFatAgcData
 *
 * Sets FAT AGC data.
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *  Data16 *pFatAgcData - pointer to FAT AGC data
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	
 *
 **********************************************************************/
DRV2_API Data16 NxtSetFatAgcData(void *pContext,
					Data16 *pFatAgcData);
 
/**********************************************************************
 *
 * NxtSetFatAgcSdmPolarity
 *
 * Sets the AGC output polarity separately for each SDM output
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	NxtPolarity_t sdm1Polarity - INVERTED or NON_INVERTED for SDM 1 output
 *	NxtPolarity_t sdm2Polarity - INVERTED or NON_INVERTED for SDM 2 output
 *	NxtPolarity_t sdmXPolarity - INVERTED or NON_INVERTED for SDM X output
 *	NxtPolarity_t sdmAPolarity - INVERTED or NON_INVERTED for SDM A output
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	SDM1, SDM2 and SDMA polarities default to INVERTED and SDMX polarity defaults
 *	to NON_INVERTED if this function is not called.
 *
 **********************************************************************/
DRV2_API Data16 NxtSetFatAgcSdmPolarity(void *pContext,
					NxtPolarity_t sdm1Polarity,
					NxtPolarity_t sdm2Polarity,
					NxtPolarity_t sdmXPolarity,
					NxtPolarity_t sdmAPolarity);

/**********************************************************************
 *
 * NxtSetRegister
 *
 * Copies data to one or more contiguous registers in the referenced ASIC.
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	Data16 deviceRegister - device and register info about first register to write
 *	Data8 byteCount - number of registers to write, 0 - 255 (in range)
 *	Data8 *pBuffer - user-supplied data to write to registers
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	Use this function instead of the IIC driver equivalent in order to
 *	include critical-section protection.
 *
 *	deviceRegister is a 16 bit value- the upper byte is the IIC	device 
 *	ID (00 or 01) and the lower byte is the register offset. These two 
 *	bytes are appended to generate 16-bit deviceRegister.
 *
 **********************************************************************/
DRV2_API Data16 NxtSetRegister(void *pContext,
					Data16 deviceRegister,
					Data8  byteCount,
					Data8 *pBuffer);

/**********************************************************************
 *
 * NxtGpioControl
 *
 * Controls the general purpose I/O pins on the Nxt200X
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	NxtGpioMode_t mode - one of the following values:
 *		NXT_GPIO_ASSIGN - assigns GPIO pins for User or Nxt200X control
 *		NXT_GPIO_SET_IO - sets User-Controlled pins as Input or Output
 *		NXT_GPIO_READ - reads User-Controlled Inputs
 *		NXT_GPIO_WRITE - writes User-Controlled Outputs
 *	Data8 *pData - for NXT_GPIO_ASSIGN, contains the assignment mask
 *	             - for NXT_GPIO_SET_IO, contains the Input/Output mask
 *	             - for NXT_GPIO_WRITE, contains data to write
 *
 * Outputs:
 *	Data8 *pData - for NXT_GPIO_READ, contains read data
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	The use of this API is optional; if it is never called, all GPIO
 *	pins remain assigned to Nxt200X control.  Refer to the User's
 *	guide for default Nxt200X assignment, and full details on the use
 *	of this API.
 *
 **********************************************************************/
DRV2_API Data16 NxtGpioControl(	void *pContext,
					NxtGpioMode_t mode,
					Data16 *pData);

/**********************************************************************
 *
 * NxtCoreControl
 *
 * Optionally resets/powers-down selected core sections.
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	NxtCoreControl_t coreControl - picks core section to control
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	Acquisition is stopped in this API.  Use NxtStart()
 *	to restart acquisition after any core control.
 *
 **********************************************************************/
DRV2_API Data16 NxtCoreControl(void *pContext,
					NxtCoreControl_t coreControl);


/**********************************************************************
 *
 * NxtSetAdcInputGain
 *
 * Sets the peak-to-peak input gain in FAT_ADC and FDC_ADC
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	NxtAdcGainControl_t adcGainCtl - one of	NxtAdcGainControl_t
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	This function should be called to set the FAT_ADC and FDC_ADC gain
 *	input. The default is 2V peak-to-peak for both FAT_ADC and FDC_ADC.
 *
 *	Only one of FAT_ADC and FDC_ADC can be set in one function call.
 *	
 **********************************************************************/
DRV2_API Data16 NxtSetAdcInputGain(void *pContext, 
					NxtAdcGainControl_t adcGainCtl);

/**********************************************************************
 *
 * NxtOutputControl
 *
 * Enables/tristates the output of various cores
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	NxtControl_t pgaOutput - NXT_ENABLE or NXT_TRISTATE
 *	NxtControl_t fdcAgcOutput - NXT_ENABLE or NXT_TRISTATE
 *	NxtControl_t fatAgcOutput - NXT_ENABLE or NXT_TRISTATE
 *	NxtControl_t mpegOutput - NXT_ENABLE or NXT_TRISTATE
 *	NxtControl_t podOutput - NXT_ENABLE or NXT_TRISTATE
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	The use of this API is optional. All values default to Enabled if
 *	this API is never called.
 *
 *	Use NXT_TRISTATE to tristate an output. Use NXT_ENABLE to enable an output. 
 *	NXT_DISABLE is treated same as NXT_TRISTATE.
 *	
 **********************************************************************/
DRV2_API Data16 NxtOutputControl(void *pContext, 
					NxtControl_t pgaOutput,
					NxtControl_t fdcAgcOutput,
					NxtControl_t fatAgcOutput,
					NxtControl_t mpegOutput,
					NxtControl_t podOutput);

/**********************************************************************
 *
 * NxtConfigInternalBert
 *
 * Configures the internal BERT
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	NxtBertSource_t bertSource - the source on BER data
 *	NxtBertPnSequence_t bertAlgorithm - the PN sequence algorithm
 *	NxtPolarity_t PNSequence - the PN sequence polarity
 *	NxtBertHeaderRemove_t removeBytes - number of bytes to remove in header
 *	Data8 winSize - BERT window size. max allowed size is 2^31
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	This function should be called before NxtStartBert is called.
 *	BERT is turned off following this call. Use NxtStartBert to 
 *	restart BERT.
 *	
 **********************************************************************/
DRV2_API Data16 NxtConfigInternalBert(void *pContext, 
					NxtBertSource_t bertSource, 
					NxtBertPnSequence_t bertAlgorithm, 
					NxtPolarity_t PNSequence, 
					NxtBertHeaderRemove_t removeBytes, 
					Data8 winSize);

/**********************************************************************
 *
 * NxtStartBert
 *
 * Starts BERT
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	
 * Outputs:
 *	None
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	
 *
 *
 **********************************************************************/
DRV2_API Data16 NxtStartBert(void *pContext);

/**********************************************************************
 *
 * NxtStopBert
 *
 * Stops BERT
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *
 * Outputs:
 *	None
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	
 *
 *
 **********************************************************************/
DRV2_API Data16 NxtStopBert(void *pContext);

/**********************************************************************/
/*                       Interrupt-Related APIs                       */
/**********************************************************************/

/**********************************************************************
 *
 * NxtSetInterruptMask
 *
 * Determines which interrupt sources may generate a hardware interrupt
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	Data8 interruptMask - bit-mapped interrupt mask to enable interrupts
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	The default condition is that no interrupts are enabled.
 *	
 *	If multiple interrupt sources are to be enabled, the caller must OR 
 *	their values together 
 *
 **********************************************************************/
DRV2_API Data16 NxtSetInterruptMask(void *pContext,
					Data8 interruptMask);

/**********************************************************************
 *
 * NxtGetInterruptSource
 *
 * Tells which interrupt source has generated a hardware interrupt
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *
 * Outputs:
 *	Data8 *pInterruptSource - bit-mapped interrupt source identifiers
 *	Data8 *pStatusResult 	- for NXT_INT_NTSC and NXT_INT_XFER, indicates
 *								the result of the operation:
 *								0 = no NTSC detect / no transfer error
 *								NXT_NTSC_DETECTED = NTSC present
 *								NXT_XFER_ERROR = transfer error occurred
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	The interrupt source register is automatically cleared when this 
 *	function is called.
 *	DO NOT call this function from interrupt-level code, or a deadlock
 *	may occur.
 *
 **********************************************************************/
DRV2_API Data16 NxtGetInterruptSource(void *pContext,
					Data8 *pInterruptSource,
					Data8 *pStatusResult);


/**********************************************************************
 *
 * NxtReadIicXferData
 *
 * Retrieves data from NxtIicXfer NXT_IIC_READ after an interrupt.
 *
 * Inputs:
 *	void *pContext - NULL, or user-defined ID for multiple NXT200Xs
 *	Data8 byteCount - number of bytes to copy
 *
 * Outputs:
 *	Data8 *pBuffer - buffer to receive byteCount bytes
 *
 * Returns:
 *	Data16
 *
 * Notes:
 *	This function will only return valid information after:
 *	  1) The previous NxtIicXfer() operation was NXT_IIC_READ,
 *	  2) NxtGetInterruptSource() has indicated a NXT_INT_XFER source, and
 *    3) NxtGetInterruptSource() has indicated no error in the transfer.
 *	These conditions are assumed -- there is no error checking for this.
 *
 **********************************************************************/
DRV2_API Data16 NxtReadIicXferData(void *pContext,
					Data8 byteCount,
					Data8 *pBuffer);

#endif

⌨️ 快捷键说明

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