bspipu.c

来自「IMX31开发板」· C语言 代码 · 共 88 行

C
88
字号
//------------------------------------------------------------------------------
//
//  Copyright (C) 2004-2007, Freescale Semiconductor, Inc. All Rights Reserved.
//  THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
//  AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
//
//------------------------------------------------------------------------------
//
//  File:  bspipu.c
//
//  Provides BSP-specific routines for use by the IPU.
//
//------------------------------------------------------------------------------
#include <windows.h>
#include "bsp.h"


//------------------------------------------------------------------------------
// External Functions


//------------------------------------------------------------------------------
// External Variables


//------------------------------------------------------------------------------
// Defines 


//------------------------------------------------------------------------------
// Types


//------------------------------------------------------------------------------
// Global Variables
 


//------------------------------------------------------------------------------
// Local Variables
 

//------------------------------------------------------------------------------
// Local Functions


//------------------------------------------------------------------------------
//
// Function: BSPIPUSetClockGatingMode
//
// This function calls to the CRM module to
// set the clock gating mode, turning on or off
// clocks to the IPU.
//
// Parameters:
//      startClocks
//          [in] If TRUE, turn clocks to GPT on.
//                If FALSE, turn clocks to GPT off
//
// Returns:
//      TRUE if success.
//      FALSE if failure.
//
//------------------------------------------------------------------------------
BOOL BSPIPUSetClockGatingMode(BOOL startClocks)
{
    if (startClocks)
    {
        // Turn IPU clocks on
        if (!DDKClockSetGatingMode(DDK_CLOCK_GATE_INDEX_IPU,
            DDK_CLOCK_GATE_MODE_ENABLED_ALL))
        {
            return FALSE;
        }
    }
    else
    {
        // Turn IPU clocks off
        if (!DDKClockSetGatingMode(DDK_CLOCK_GATE_INDEX_IPU,
            DDK_CLOCK_GATE_MODE_DISABLED))
        {
            return FALSE;
        }
    }
    return TRUE;
}

⌨️ 快捷键说明

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