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

📄 example_simple.c

📁 用于DRX3973或DRX39系列的芯片的控制
💻 C
字号:
#include "example_aux.c.inc"     /* for logging text output */
#include "drx3973d.h"
#include "drx3973d_mc.h"         /* file containing firmware (microcode) */
#define  TUNER_THOMSON_DTT_759X  /* pre-configured tuner selection */
#include "bsp_tuner_tables.h"    /* file containing pre-configured tuners */

static I2CDeviceAddr_t     demodAddr;
static DRXCommonAttr_t     demodCommAttr;
static DRXDemodInstance_t  demod;
static pDRXDemodInstance_t demodulators[] = { NULL, NULL };

int main ( void )
{
   DRXChannel_t    channel = { 578000, /* kHz */
                               DRX_BANDWIDTH_8MHZ, DRX_AUTO, DRX_AUTO, DRX_AUTO,
                               DRX_PRIORITY_HIGH,  DRX_AUTO, DRX_AUTO, DRX_AUTO, DRX_AUTO };

   demodAddr       = DRX3973DDefaultAddr_g;
   demodCommAttr   = DRX3973DDefaultCommAttr_g;
   demod           = DRX3973DDefaultDemod_g;
   demodulators[0] = &demod;

   demod.myI2CDevAddr                = &demodAddr;
   demod.myCommonAttr                = &demodCommAttr;
   demod.myCommonAttr->microcode     = MC_IMAGE_ADDR;
   demod.myCommonAttr->microcodeSize = MC_IMAGE_SIZE;
   demod.myTuner                     = &PRE_CONF_TUNER;

   DRXBSP_I2C_Init();
      DRXBSP_HST_Init();
         DRX_Init( demodulators );
            DRX_Open( &demod );
               DRX_Ctrl( &demod, DRX_CTRL_SET_CHANNEL, &channel );
               XPRINTF("MPEG output follows soon.\n\n");
               XWAITKEYPRESSED( "Press enter to quit.\n" );
            DRX_Close( &demod );
         DRX_Term();
      DRXBSP_HST_Term();
   DRXBSP_I2C_Term();
   
   return 0;
}

/* $Id: example_simple.c,v 1.12 2005/11/29 16:24:03 jasper Exp $ */
/*
* $(c) 2005 Micronas GmbH. All rights reserved.
*
* This software and related documentation (the 'Software') are intellectual
* property owned by Micronas and are copyright of Micronas, unless specifically
* noted otherwise.
*
* Any use of the Software is permitted only pursuant to the terms of the
* license agreement, if any, which accompanies, is included with or applicable
* to the Software ('License Agreement') or upon express written consent of
* Micronas. Any copying, reproduction or redistribution of the Software in
* whole or in part by any means not in accordance with the License Agreement
* or as agreed in writing by Micronas is expressly prohibited.
*
* THE SOFTWARE IS WARRANTED, IF AT ALL, ONLY ACCORDING TO THE TERMS OF THE
* LICENSE AGREEMENT. EXCEPT AS WARRANTED IN THE LICENSE AGREEMENT THE SOFTWARE
* IS DELIVERED 'AS IS' AND MICRONAS HEREBY DISCLAIMS ALL WARRANTIES AND
* CONDITIONS WITH REGARD TO THE SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIT
* ENJOYMENT, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL
* PROPERTY OR OTHER RIGHTS WHICH MAY RESULT FROM THE USE OR THE INABILITY
* TO USE THE SOFTWARE.
*
* IN NO EVENT SHALL MICRONAS BE LIABLE FOR INDIRECT, INCIDENTAL, CONSEQUENTIAL,
* PUNITIVE, SPECIAL OR OTHER DAMAGES WHATSOEVER INCLUDING WITHOUT LIMITATION,
* DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
* INFORMATION, AND THE LIKE, ARISING OUT OF OR RELATING TO THE USE OF OR THE
* INABILITY TO USE THE SOFTWARE, EVEN IF MICRONAS HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES, EXCEPT PERSONAL INJURY OR DEATH RESULTING FROM
* MICRONAS' NEGLIGENCE.                                                        $
*
*/

⌨️ 快捷键说明

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