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

📄 mt_userdef.h

📁 用于DRX3973或DRX39系列的芯片的控制
💻 H
📖 第 1 页 / 共 2 页
字号:
**                      user-defined
**
**  Notes:          This is a callback function that is called from the
**                  the tuning algorithm.  You MUST provide code for this
**                  function to read data using the tuner's 2-wire serial
**                  bus.
**
**                  The hUserData parameter is a user-specific argument.
**                  If additional arguments are needed for the user's
**                  serial bus read/write functions, this argument can be
**                  used to supply the necessary information.
**                  The hUserData parameter is initialized in the tuner's Open
**                  function.
**
**  Revision History:
**
**   SCR      Date      Author  Description
**  -------------------------------------------------------------------------
**   N/A   03-25-2004    DAD    Original
**
*****************************************************************************/
UData_t MT_ReadSub(Handle_t hUserData,
                   UData_t addr,
                   U8Data subAddress,
                   U8Data *pData,
                   UData_t cnt);


/*****************************************************************************
**
**  Name: MT_Sleep
**
**  Description:    Delay execution for "nMinDelayTime" milliseconds
**
**  Parameters:     hUserData     - User-specific I/O parameter that was
**                                  passed to tuner's Open function.
**                  nMinDelayTime - Delay time in milliseconds
**
**  Returns:        None.
**
**  Notes:          This is a callback function that is called from the
**                  the tuning algorithm.  You MUST provide code that
**                  blocks execution for the specified period of time.
**
**  Revision History:
**
**   SCR      Date      Author  Description
**  -------------------------------------------------------------------------
**   N/A   03-25-2004    DAD    Original
**
*****************************************************************************/
void MT_Sleep(Handle_t hUserData,
              UData_t nMinDelayTime);


/*****************************************************************************
**
**  Name: MT_TunerGain  (for MT2060 only)
**
**  Description:    Measure the relative tuner gain using the demodulator
**
**  Parameters:     hUserData  - User-specific I/O parameter that was
**                               passed to tuner's Open function.
**                  pMeas      - Tuner gain (1/100 of dB scale).
**                               ie. 1234 = 12.34 (dB)
**
**  Returns:        status:
**                      MT_OK  - No errors
**                      user-defined errors could be set
**
**  Notes:          This is a callback function that is called from the
**                  the 1st IF location routine.  You MUST provide
**                  code that measures the relative tuner gain in a dB
**                  (not linear) scale.  The return value is an integer
**                  value scaled to 1/100 of a dB.
**
**  Revision History:
**
**   SCR      Date      Author  Description
**  -------------------------------------------------------------------------
**   N/A   06-16-2004    DAD    Original
**   N/A   11-30-2004    DAD    Renamed from MT_DemodInputPower.  This name
**                              better describes what this function does.
**
*****************************************************************************/
UData_t MT_TunerGain(Handle_t hUserData,
                     SData_t* pMeas);

#if defined( __cplusplus )
}
#endif

#ifdef USE_DUMMY_MT2060

/*****************************************************************************
** This is the dummy interface needed to compile the drxdriver WITHOUT the
** need for Microtune sources
*****************************************************************************/

#if defined( __cplusplus )
extern "C"                /* Use "C" external linkage         */
{
#endif

#define MT_IS_ERROR(s) (((s) >> 30) != 0)
#define MT_NO_ERROR(s) (((s) >> 30) == 0)

#define MT_ERROR     (1 << 31)
#define MT_OK        (0x00000000)
#define MT_COMM_ERR  (0x80000008)

typedef enum
{
    MT2060_VGAG_0DB
} MT2060_VGA_Gain_Range;

typedef enum
{
    MT2060_STEPSIZE,
    MT2060_INPUT_FREQ
} MT2060_Param;

UData_t MT2060_Open(UData_t MT2060_Addr,
                    Handle_t* hMT2060,
                    Handle_t hUserData);

UData_t MT2060_SetGainRange(Handle_t h, UData_t range);

UData_t MT2060_SetParam(Handle_t     h,
                        MT2060_Param param,
                        UData_t      nValue);

UData_t MT2060_Close(Handle_t hMT2060);

UData_t MT2060_ChangeFreq(Handle_t h,
                          UData_t f_in,
                          UData_t f_IF1,
                          UData_t f_out,
                          UData_t f_IFBW);

UData_t MT2060_GetLocked(Handle_t h);

#if defined( __cplusplus )
}
#endif

#else /* #if USE_DUMMY_MT2060 */

/*****************************************************************************
** This is the interface needed to compile the drxdriver WITH the Microtune
** sources.
*****************************************************************************/
/* Microtune interface files */
#include "mt_errordef.h"
#include "mt2060.h"

#endif /* #if USE_DUMMY_MT2060 */

#ifdef USE_DUMMY_MT2121

/*****************************************************************************
** This is the dummy interface needed to compile the drxdriver WITHOUT the
** need for Microtune sources
*****************************************************************************/

#if defined( __cplusplus )
extern "C"                /* Use "C" external linkage         */
{
#endif

#define MT_IS_ERROR(s) (((s) >> 30) != 0)
#define MT_NO_ERROR(s) (((s) >> 30) == 0)

#define MT_ERROR     (1 << 31)
#define MT_OK        (0x00000000)
#define MT_COMM_ERR  (0x80000008)

typedef enum
{
    MT2121_VGAG_0DB
} MT2121_VGA_Gain_Range;

typedef enum
{
    MT2121_STEPSIZE,
    MT2121_INPUT_FREQ
} MT2121_Param;

UData_t MT2121_Open(UData_t MT2121_Addr,
                    Handle_t* hMT2121,
                    Handle_t hUserData);

UData_t MT2121_SetGainRange(Handle_t h, UData_t range);

UData_t MT2121_SetParam(Handle_t     h,
                        MT2121_Param param,
                        UData_t      nValue);

UData_t MT2121_Close(Handle_t hMT2121);

UData_t MT2121_ChangeFreq(Handle_t h,
                          UData_t f_in,
                          UData_t f_IF1,
                          UData_t f_out,
                          UData_t f_IFBW);

UData_t MT2121_GetLocked(Handle_t h);

#if defined( __cplusplus )
}
#endif

#else /* #if USE_DUMMY_MT2121 */

/*****************************************************************************
** This is the interface needed to compile the drxdriver WITH the Microtune
** sources.
*****************************************************************************/
/* Microtune interface files */
#include "mt_errordef.h"
#include "mt2121.h"

#endif /* #if USE_DUMMY_MT2121 */

#endif /* #if !defined( __MT_USERDEF_H ) */

⌨️ 快捷键说明

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