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

📄 tlg1100api.h

📁 泰景的模拟电视全部驱动及MTK平台界面代码
💻 H
📖 第 1 页 / 共 5 页
字号:
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetI2SMasterAudioClock(uint32 base_addr, uint16 *M, uint16 *S);

/** Set the current I2S clock configuration parameters.
 *
 * This procedure sets I2S clock configuration parameters of the TLG1100. The M and S values
 * should be set correctly in I2S master mode. 
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * 
 * @param M				I2S clock configuration, M value.
 *                      Possible values are: 1-32
 * @param S				I2S clock configuration, S value.
 *                      Possible values are: 1-64                                     
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetI2SMasterAudioClock(uint32 base_addr, uint16 M, uint16 S);

/** Get the current state of the Audio Test Tone Mode.
 *
 * This procedure returns whether or not Audio Test Tone mode is enabled. Note
 * Audio Test Tone mode must be enabled before test tones may be generated with
 * TLG_SetAudioTestToneL() or TLG_SetAudioTestToneR().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the current mode.
 *                      Possible values are: 
 *                      - TLG_OFF
 *                      - TLG_ON
 *
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioTestToneMode(uint32 base_addr, uint16 *val);

/** Enables/Disables Audio Test Tone mode.
 * 
 * This procedure is used to turn on/off Audio Test Tone mode. Note Audio Test 
 * Tone mode must be enabled before test tones may be generated with
 * TLG_SetAudioTestToneL() or TLG_SetAudioTestToneR(). Note that previous to 
 * TLG1100 rev 1.3 test tones are only generated when the Audio Mode is set 
 * to TLG_MASTER or TLG_SLAVE. They are not supported for TLG_DAC. For rev 1.3
 * and later all audio modes support test tones.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           The new mode. Possible values are: 
 *                      - TLG_OFF
 *                      - TLG_ON
 *
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioTestToneMode(uint32 base_addr, uint16 val);

/** Get the current state of the I2S Debug Waveform.
 *
 * This procedure returns whether or not the I2S Debug Waveform is enabled. Note
 * Audio Test Tone mode must be enabled before the debug waveform may be generated.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the current mode.
 *                      Possible values are: 
 *                      - TLG_OFF
 *                      - TLG_ON
 *
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetI2SDebugWaveform(uint32 base_addr, uint16 *val);

/** Enables/Disables the I2S Debug Waveform.
 * 
 * This procedure is used to turn on/off the I2S Debug Waveform. Note Audio Test 
 * Tone mode must be enabled before debug waveform may be generated. 
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           The new mode. Possible values are: 
 *                      - TLG_OFF
 *                      - TLG_ON
 *
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetI2SDebugWaveform(uint32 base_addr, uint16 val);

/** Get the current audio test tone value for left channel.
 *
 * This procedure returns the currently configured Left test tone value. Note
 * that in order to generate test tones you must first call
 * TLG_SetAudioTestToneMode(base_addr, TLG_ON). Test tones are affected by
 * TLG_SetAudioEnable() and TLG_SetAudioGain().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the current mode.
 *                      Possible values are: 
 *                      - TLG_OFF
 *                      - TLG_1KHZ
 *                      - TLG_3KHZ
 *                      - TLG_8KHZ
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioTestToneL(uint32 base_addr, uint16 *val);

/** Turn on/off audio test tone for left channel.
 *
 * This procedure sets the Left test tone value. Note
 * that in order to generate test tones you must first call
 * TLG_SetAudioTestToneMode(base_addr, TLG_ON). Test tones are affected by
 * TLG_SetAudioEnable() and TLG_SetAudioGain().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set mode to. Possible values:
 *                      - TLG_OFF
 *                      - TLG_1KHZ
 *                      - TLG_3KHZ
 *                      - TLG_8KHZ
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioTestToneL(uint32 base_addr, uint16 val);

/** Get the current audio test tone value for right channel.
 *
 * This procedure returns the currently configured right test tone value. Note
 * that in order to generate test tones you must first call
 * TLG_SetAudioTestToneMode(base_addr, TLG_ON). Test tones are affected by
 * TLG_SetAudioEnable() and TLG_SetAudioGain().
 *
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the current mode.
 *                      Possible values are: 
 *                      - TLG_OFF
 *                      - TLG_1KHZ
 *                      - TLG_3KHZ
 *                      - TLG_8KHZ
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioTestToneR(uint32 base_addr, uint16 *val);

/** Turn on/off audio test tone for right channel.
 *
 * This procedure sets the right test tone value. Note
 * that in order to generate test tones you must first call
 * TLG_SetAudioTestToneMode(base_addr, TLG_ON). Test tones are affected by
 * TLG_SetAudioEnable() and TLG_SetAudioGain().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set mode to. Possible values:
 *                      - TLG_OFF
 *                      - TLG_1KHZ
 *                      - TLG_3KHZ
 *                      - TLG_8KHZ
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioTestToneR(uint32 base_addr, uint16 val);

/** Get the External HSYNC configuration values.
 *
 * This procedure retrieves the external HSYNC configuration values currently
 * set in the TLG1100. The TLG1100 supports one HSYNC assertion region and two
 * HSYNC de-assertion regions. 
 *
 * @param base_addr         I2c address for TLG1100 chip.
 * @param assert_start      The starting location to force assert of HSYNC.
 * @param assert_end        The location where to stop asserting HSYNC.
 * @param deassert1_start   The starting line to force de-assert of HSYNC.
 * @param deassert1_end     The line where to stop forced de-asserting HSYNC.
 * @param deassert2_start   The starting line to force de-assert of HSYNC.
 * @param deassert2_end     The line where to stop forced de-asserting HSYNC.
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetExtHSync(uint32 base_addr, 
                    uint16 *assert_start,        uint16 *assert_end,
                    uint16 *deassert1_start,     uint16 *deassert1_end,
                    uint16 *deassert2_start,     uint16 *deassert2_end);

/** Set the External HSYNC configuration values.
 *
 * This procedure sets the external HSYNC configuration values in the TLG1100. 
 * The TLG1100 supports one HSYNC assertion region. It also supports two 
 * vertical scan line regions where HSYNC is prevented from asserting. To stop
 * external HSYNCs from being generated altogether, set all values to 0.
 * The new settings will be used immediately by the TLG1100.
 *
 * @param base_addr         I2c address for TLG1100 chip.
 * @param assert_start      The starting location to force assert of HSYNC.
 * @param assert_end        The location where to stop asserting HSYNC.
 * @param deassert1_start   The starting line to force de-assert of HSYNC.
 * @param deassert1_end     The line where to stop forced de-asserting HSYNC.
 * @param deassert2_start   The starting line to force de-assert of HSYNC.
 * @param deassert2_end     The line where to stop forced de-asserting HSYNC.
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetExtHSync(uint32 base_addr, 
                    uint16 assert_start,        uint16 assert_end,
                    uint16 deassert1_start,     uint16 deassert1_end,
                    uint16 deassert2_start,     uint16 deassert2_end);

/** Get the External VSYNC configuration values.
 *
 * This procedure retrieves the external VSYNC configuration values currently
 * set in the TLG1100. The TLG1100 supports 3 VSYNC assertion regions.
 *
 * @param base_addr         I2c address for TLG1100 chip.
 * @param assert1_start     The starting line to force assert of VSYNC.
 * @param assert1_end       The line where to stop asserting VSYNC.
 * @param assert2_start     The starting line to force assert of VSYNC.
 * @param assert2_end       The line where to stop asserting VSYNC.
 * @param assert3_start     The starting line to force assert of VSYNC.
 * @param assert3_end       The line where to stop asserting VSYNC.
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetExtVSync(uint32 base_addr, 
                    uint16 *assert1_start,       uint16 *assert1_end,
                    uint16 *assert2_start,       uint16 *assert2_end,
                    uint16 *assert3_start,       uint16 *assert3_end);

/** Set the External VSYNC configuration values.
 *
 * This procedure sets the external VSYNC configuration values in the TLG1100. 
 * The TLG1100 supports 3 VSYNC assertion regions. To stop VSYNCs from being
 * generated at all, set all values to 0. The new settings will be used
 * immediately by the TLG1100.
 *
 * @param base_addr         I2c address for TLG1100 chip.
 * @param assert1_start     The starting line to force assert of VSYNC.
 * @param assert1_end       The line where to stop asserting VSYNC.
 * @param assert2_start     The starting line to force assert of VSYNC.
 * @param assert2_end       The line where to stop asserting VSYNC.
 * @param assert3_start     The starting line to force assert of VSYNC.
 * @param assert3_end       The line where to stop asserting VSYNC.
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetExtVSync(uint32 base_addr, 
                    uint16 assert1_start,       uint16 assert1_end,
                    uint16 assert2_start,       uint16 assert2_end,
                    uint16 assert3_start,       uint16 assert3_end);

/** Get the HSync Active polarity.
 *
 * This procedure returns the currently configured polarity of the "active
 * region" on the external Horizontal Sync (HSYNC) pin. Valid values are: 
 * TLG_ACTIVE_HIGH, TLG_ACTIVE_LOW. The "active" region is the region defined
 * by the assert_start/assert_end fields set by TLG_SetExtHSync().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param polarity      The polarity of the "active" region. Values are:
 *                      - TLG_ACTIVE_HIGH
 *                      - TLG_ACTIVE_LOW
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 *
 * @sa TLG_SetExtHSync, TLG_GetExtHSync
 */
TLGDLL_API int TLG_GetHSyncPolarity(uint32 base_addr, uint16 *polarity);

/** Set the HSync Active polarity.
 *
 * This procedure sets the polarity of the "active region" on the external
 * Horizontal Sync pin. Valid values are: TLG_ACTIVE_HIGH, TLG_ACTIVE_LOW.
 * The "active region" is the region defined by the assert_start and
 * assert_end fields set by TLG_SetExtHSync().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param polarity      The polarity of the "active" region. Values are:
 *                      - TLG_ACTIVE_HIGH
 *                      - TLG_ACTIVE_LOW
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 *
 * @sa TLG_SetExtHSync, TLG_GetExtHSync
 */
TLGDLL_API int TLG_SetHSyncPolarity(uint32 base_addr, uint16 polarity);

/** Get the VSync Active polarity.
 *
 * This procedure returns the currently configured polarity of "active region"
 * on the external Vertical Sync (VSYNC) pin. Valid values are: 
 * TLG_ACTIVE_HIGH, TLG_ACTIVE_LOW.  The "active region" is the region defined
 * by the assert1_start/assert1_end, assert2_start/assert2_end, and
 * assert3_start/assert3_end fields set by TLG_SetExtVSync().
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param polarity      The polarity of the "active" region. Values are:
 *                      - TLG_ACTIVE_HIGH
 *                      - TLG_ACTIVE_LOW
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.

⌨️ 快捷键说明

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