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

📄 fmtuner_gpio.c

📁 这是一款聚电视和收音为一体的微处理器 C++ 源代码,成果奉献,供广大的底层软件开发者学习和参考
💻 C
字号:
//-----------------------------------------------------------------------------
// (C) Copyright 2003 Philips Semiconductors, All rights reserved
//
// This source code and any compilation or derivative thereof is the sole
// property of Philips Corporation and is provided pursuant to a Software
// License Agreement.  This code is the proprietary information of Philips
// Corporation and is confidential in nature.  Its use and dissemination by
// any party other than Philips Corporation is strictly limited by the
// confidential information provisions of the Agreement referenced above.
//-----------------------------------------------------------------------------
// FILE NAME:    fmTuner_GPIO.c
//
// VERSION:      <1.00.00.0000>
//

// DOCUMENT REF:SZLAB/PRS0003 

//-----------------------------------------------------------------------------
// Standard include files:
//-----------------------------------------------------------------------------
//
#include "common.h"
#include "cmd_glb.h"
#include "keyb_glb.h"
#include "global.h"
#include "PSA_API.h"
//-----------------------------------------------------------------------------
// Project include files:
//-----------------------------------------------------------------------------
//
#include"fmTuner_GPIO.h"
//-----------------------------------------------------------------------------
// Types and defines:
//-----------------------------------------------------------------------------
//

//-----------------------------------------------------------------------------
// Global data:
//-----------------------------------------------------------------------------
//

//-----------------------------------------------------------------------------
// Internal Prototypes:
//-----------------------------------------------------------------------------
//

//-----------------------------------------------------------------------------
// Exported functions:
//-----------------------------------------------------------------------------
//
//
//-----------------------------------------------------------------------------
// FUNCTION:    fmTuner_InitializeGPIO
//
// DESCRIPTION: This function is used for module initialization
//
// RETURN:       U32,for description,please refer to global.h
//
// NOTES:       <Function notes - pre/post state, side effects, reentrancy>
//-----------------------------------------------------------------------------
void fmTuner_InitializeGPIO(void)
{
    //Set BUS-Enable into output mode
    GPIOCTRL->GpioOutput|=TUNER_BUS_ENABLE;
    GPIOCTRL->GpioDirection|=TUNER_BUS_ENABLE;
    //Set search ready pin into input mode
    GPIOCTRL->GpioDirection&=(~TUNER_SEARCH_READY_FLAG);
    GPIOCTRL->GpioDirection&=(~TUNER_SDA);
    GPIOCTRL->GpioDirection&=(~TUNER_SCL);
	  
}
#if 0
void fmTuner_ToggleBusEnable(void)
{
    static U8 Flag=TRUE;
    Flag=(U8)(!Flag);
    if(Flag)
        GPIOCTRL->GpioOutput|=TUNER_BUS_ENABLE;
    else
        GPIOCTRL->GpioOutput&=(~TUNER_BUS_ENABLE);
     
}
#endif
//-----------------------------------------------------------------------------
// FUNCTION:    fmTuner_BusEnable
//
// DESCRIPTION: This function is used for module initialization
//
// RETURN:       U32,for description,please refer to global.h
//
// NOTES:       <Function notes - pre/post state, side effects, reentrancy>
//-----------------------------------------------------------------------------
void fmTuner_BusEnable(U32 kTrueFalse)
{
    if(kTrueFalse==TRUE)
   {
       GPIOCTRL->GpioOutput|=TUNER_BUS_ENABLE;
   }
   else
   {
       GPIOCTRL->GpioOutput&=(~TUNER_BUS_ENABLE);
   }
	  
}


⌨️ 快捷键说明

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