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

📄 mt2063.h

📁 microtune 公司 硅高频头 源码
💻 H
📖 第 1 页 / 共 3 页
字号:
**  Name: MT2063_Open****  Description:    Initialize the tuner's register values.****  Usage:          status = MT2063_Open(0xC0, &hMT2063, NULL);**                  if (MT_IS_ERROR(status))**                      //  Check error codes for reason****  Parameters:     MT2063_Addr  - Serial bus address of the tuner.**                  hMT2063      - Tuner handle passed back.**                  hUserData    - User-defined data, if needed for the**                                 MT_ReadSub() & MT_WriteSub functions.****  Returns:        status:**                      MT_OK             - No errors**                      MT_TUNER_ID_ERR   - Tuner Part/Rev code mismatch**                      MT_TUNER_INIT_ERR - Tuner initialization failed**                      MT_COMM_ERR       - Serial bus communications error**                      MT_ARG_NULL       - Null pointer argument passed**                      MT_TUNER_CNT_ERR  - Too many tuners open****  Dependencies:   MT_ReadSub  - Read byte(s) of data from the two-wire bus**                  MT_WriteSub - Write byte(s) of data to the two-wire bus****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.********************************************************************************/UData_t MT2063_Open(UData_t MT2063_Addr,                    Handle_t* hMT2063,                    Handle_t hUserData);/**********************************************************************************  Name: MT2063_Close****  Description:    Release the handle to the tuner.****  Parameters:     hMT2063      - Handle to the MT2063 tuner****  Usage:          status = MT2063_Close(hMT2063);****  Returns:        status:**                      MT_OK         - No errors**                      MT_INV_HANDLE - Invalid tuner handle****  Dependencies:   mt_errordef.h - definition of error codes****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.********************************************************************************/UData_t MT2063_Close(Handle_t hMT2063);/********************************************************************************  Name: MT2063_Tune****  Description:    Change the tuner's tuned frequency to f_in.****  Parameters:     h           - Tuner handle (returned by MT2063_Open)**                  f_in        - RF input center frequency (in Hz).****  Usage:          status = MT2063_Tune(hMT2063,**                                       f_in)****  Returns:        status:**                      MT_OK            - No errors**                      MT_INV_HANDLE    - Invalid tuner handle**                      MT_UPC_UNLOCK    - Upconverter PLL unlocked**                      MT_DNC_UNLOCK    - Downconverter PLL unlocked**                      MT_COMM_ERR      - Serial bus communications error**                      MT_SPUR_CNT_MASK - Count of avoided LO spurs**                      MT_SPUR_PRESENT  - LO spur possible in output**                      MT_FIN_RANGE     - Input freq out of range**                      MT_FOUT_RANGE    - Output freq out of range**                      MT_UPC_RANGE     - Upconverter freq out of range**                      MT_DNC_RANGE     - Downconverter freq out of range****  Dependencies:   MUST CALL MT2063_Open BEFORE MT2063_Tune!****                  MT_ReadSub   - Read data from the two-wire serial bus**                  MT_WriteSub  - Write data to the two-wire serial bus**                  MT_Sleep     - Delay execution for x milliseconds****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.******************************************************************************/UData_t MT2063_Tune(Handle_t h,                    UData_t f_in);    /* RF input center frequency   *//**********************************************************************************  Name: MT2063_GetGPIO****  Description:    Get the current MT2063 GPIO value.****  Parameters:     h            - Open handle to the tuner (from MT2063_Open).**                  attr         - Selects input readback, I/O direction or**                                 output value**                  bit          - Selects GPIO0, GPIO1, or GPIO2**                  *value       - current setting of GPIO pin****  Usage:          status = MT2063_GetGPIO(hMT2063, MT2063_GPIO2, &value);****  Returns:        status:**                      MT_OK            - No errors**                      MT_COMM_ERR      - Serial bus communications error**                      MT_INV_HANDLE    - Invalid tuner handle**                      MT_ARG_NULL      - Null pointer argument passed****  Dependencies:   MT_ReadSub  - Read byte(s) of data from the serial bus****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.********************************************************************************/UData_t MT2063_GetGPIO(Handle_t h, MT2063_GPIO_ID gpio_id, MT2063_GPIO_Attr attr, UData_t* value);/********************************************************************************  Name: MT2063_GetLocked****  Description:    Checks to see if LO1 and LO2 are locked.****  Parameters:     h            - Open handle to the tuner (from MT2063_Open).****  Usage:          status = MT2063_GetLocked(hMT2063);**                  if (status & (MT_UPC_UNLOCK | MT_DNC_UNLOCK))**                      //  error!, one or more PLL's unlocked****  Returns:        status:**                      MT_OK            - No errors**                      MT_UPC_UNLOCK    - Upconverter PLL unlocked**                      MT_DNC_UNLOCK    - Downconverter PLL unlocked**                      MT_COMM_ERR      - Serial bus communications error**                      MT_INV_HANDLE    - Invalid tuner handle****  Dependencies:   MT_ReadSub    - Read byte(s) of data from the serial bus**                  MT_Sleep      - Delay execution for x milliseconds****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.******************************************************************************/UData_t MT2063_GetLocked(Handle_t h);/********************************************************************************  Name: MT2063_GetParam****  Description:    Gets a tuning algorithm parameter.****                  This function provides access to the internals of the**                  tuning algorithm - mostly for testing purposes.****  Parameters:     h           - Tuner handle (returned by MT2063_Open)**                  param       - Tuning algorithm parameter**                                (see enum MT2063_Param)**                  pValue      - ptr to returned value****                  param                   Description**                  ----------------------  --------------------------------**                  MT2063_IC_ADDR          Serial Bus address of this tuner**                  MT2063_MAX_OPEN         Max # of MT2063's allowed open**                  MT2063_NUM_OPEN         # of MT2063's open**                  MT2063_SRO_FREQ         crystal frequency**                  MT2063_STEPSIZE         minimum tuning step size**                  MT2063_INPUT_FREQ       input center frequency**                  MT2063_LO1_FREQ         LO1 Frequency**                  MT2063_LO1_STEPSIZE     LO1 minimum step size**                  MT2063_LO1_FRACN_AVOID  LO1 FracN keep-out region**                  MT2063_IF1_ACTUAL       Current 1st IF in use**                  MT2063_IF1_REQUEST      Requested 1st IF**                  MT2063_IF1_CENTER       Center of 1st IF SAW filter**                  MT2063_IF1_BW           Bandwidth of 1st IF SAW filter**                  MT2063_ZIF_BW           zero-IF bandwidth**                  MT2063_LO2_FREQ         LO2 Frequency**                  MT2063_LO2_STEPSIZE     LO2 minimum step size**                  MT2063_LO2_FRACN_AVOID  LO2 FracN keep-out region**                  MT2063_OUTPUT_FREQ      output center frequency**                  MT2063_OUTPUT_BW        output bandwidth**                  MT2063_LO_SEPARATION    min inter-tuner LO separation**                  MT2063_AS_ALG           ID of avoid-spurs algorithm in use**                  MT2063_MAX_HARM1        max # of intra-tuner harmonics**                  MT2063_MAX_HARM2        max # of inter-tuner harmonics**                  MT2063_EXCL_ZONES       # of 1st IF exclusion zones**                  MT2063_NUM_SPURS        # of spurs found/avoided**                  MT2063_SPUR_AVOIDED     >0 spurs avoided**                  MT2063_SPUR_PRESENT     >0 spurs in output (mathematically)****  Usage:          status |= MT2063_GetParam(hMT2063,**                                            MT2063_IF1_ACTUAL,**                                            &f_IF1_Actual);****  Returns:        status:**                      MT_OK            - No errors**                      MT_INV_HANDLE    - Invalid tuner handle**                      MT_ARG_NULL      - Null pointer argument passed**                      MT_ARG_RANGE     - Invalid parameter requested****  Dependencies:   USERS MUST CALL MT2063_Open() FIRST!****  See Also:       MT2063_SetParam, MT2063_Open****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.******************************************************************************/UData_t MT2063_GetParam(Handle_t     h,                        MT2063_Param param,                        UData_t*     pValue);/********************************************************************************  Name: MT2063_GetReg****  Description:    Gets an MT2063 register.****  Parameters:     h           - Tuner handle (returned by MT2063_Open)**                  reg         - MT2063 register/subaddress location**                  *val        - MT2063 register/subaddress value****  Returns:        status:**                      MT_OK            - No errors**                      MT_COMM_ERR      - Serial bus communications error**                      MT_INV_HANDLE    - Invalid tuner handle**                      MT_ARG_NULL      - Null pointer argument passed**                      MT_ARG_RANGE     - Argument out of range****  Dependencies:   USERS MUST CALL MT2063_Open() FIRST!****                  Use this function if you need to read a register from**                  the MT2063.****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.******************************************************************************/UData_t MT2063_GetReg(Handle_t h,                      U8Data   reg,                      U8Data*  val);/**********************************************************************************  Name: MT2063_GetTemp****  Description:    Get the MT2063 Temperature register.****  Parameters:     h            - Open handle to the tuner (from MT2063_Open).**                  *value       - value read from the register****                                    Binary**                  Value Returned    Value    Approx Temp**                  ---------------------------------------------**                  MT2063_T_0C       0000         0C**                  MT2063_T_10C      0001        10C**                  MT2063_T_20C      0010        20C**                  MT2063_T_30C      0011        30C**                  MT2063_T_40C      0100        40C**                  MT2063_T_50C      0101        50C**                  MT2063_T_60C      0110        60C**                  MT2063_T_70C      0111        70C**                  MT2063_T_80C      1000        80C**                  MT2063_T_90C      1001        90C**                  MT2063_T_100C     1010       100C**                  MT2063_T_110C     1011       110C**                  MT2063_T_120C     1100       120C**                  MT2063_T_130C     1101       130C**                  MT2063_T_140C     1110       140C**                  MT2063_T_150C     1111       150C****  Returns:        status:**                      MT_OK            - No errors**                      MT_COMM_ERR      - Serial bus communications error**                      MT_INV_HANDLE    - Invalid tuner handle**                      MT_ARG_NULL      - Null pointer argument passed**                      MT_ARG_RANGE     - Argument out of range****  Dependencies:   MT_ReadSub  - Read byte(s) of data from the two-wire bus**                  MT_WriteSub - Write byte(s) of data to the two-wire bus****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.********************************************************************************/UData_t MT2063_GetTemp(Handle_t h, MT2063_Temperature* value);/********************************************************************************  Name: MT2063_GetUserData****  Description:    Gets the user-defined data item.****  Parameters:     h           - Tuner handle (returned by MT2063_Open)****  Usage:          status = MT2063_GetUserData(hMT2063, &hUserData);****  Returns:        status:**                      MT_OK            - No errors**                      MT_INV_HANDLE    - Invalid tuner handle**                      MT_ARG_NULL      - Null pointer argument passed****  Dependencies:   USERS MUST CALL MT2063_Open() FIRST!****                  The hUserData parameter is a user-specific argument**                  that is stored internally with the other tuner-**                  specific information.****                  For example, if additional arguments are needed**                  for the user to identify the device communicating**                  with the tuner, this argument can be used to supply**                  the necessary information.****                  The hUserData parameter is initialized in the tuner's**                  Open function to NULL.****  See Also:       MT2063_Open****  Revision History:****   SCR      Date      Author  Description**  -------------------------------------------------------------------------**   138   06-19-2007    DAD    Ver 1.00: Initial, derived from mt2067_b.******************************************************************************/UData_t MT2063_GetUserData(Handle_t h,                           Handle_t* hUserData);/******************************************************************************

⌨️ 快捷键说明

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