iekc64_init.h

来自「TI公司的算法标准 Framework5的源代码」· C头文件 代码 · 共 153 行

H
153
字号
/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) RF5_IEK 2.00.02 12-11-02 (swat-c19)" */
/*! \verbatim
==============================================================================
                                  Copyright (C) 2002 A.T.E.M.E.
                          All Rights Reserved
------------------------------------------------------------------------------
MODULE NAME... IEKC64_INIT
FLENAME......  iekc64_init.h
PROJECT....... IEK C64x
------------------------------------------------------------------------------
HISTORY:
 V1.0    09/01/2002             HCO  
         09/01/2002             HCO
------------------------------------------------------------------------------
\endverbatim <P> \file
 
        \brief Header file for the IEK C64 board initialization and configuration.

</P>*//*====================================================================*/
#ifndef _IEKC64_INIT_H_
#define _IEKC64_INIT_H_

#include <csl_stdinc.h>
#include "iekc64.h"

#ifdef __cplusplus
extern "C" {
#endif



/*=======================================================================*//*!
\defgroup INIT INIT - Board Initialization and configuration functions

   \brief This module provides the main board initialization function

</P>*//*==============================================================*//*@{*/

/*--------------------------------------------------------------------------*/
/*! Module error codes.<br>
         If status returned from a module call is negative (or 
         IEKC64_SUCCESS(return code) is false), the value represents en error
         from the list below
*/
enum IEKC64_INIT_STATUS
{
        //! An error has occured during SDRAM-A testing
        IEKC64_ERR_INIT_SDRAMA                                  = IEKC64_ERR_CODE( IEKC64_INIT,  1 ),
        //! An error has occured during SDRAM-B testing
        IEKC64_ERR_INIT_SDRAMB                                  = IEKC64_ERR_CODE( IEKC64_INIT,  2 ),
        //! An invalid dip-switch configuration has been detected
        IEKC64_ERR_BAD_DIPSWITCH_CONFIG                 = IEKC64_ERR_CODE( IEKC64_INIT,  3 ),
        //! An invalid dip-switch configuration has been detected
        IEKC64_EEPROM_TIMEOUT_WAITRDY                   = IEKC64_ERR_CODE( IEKC64_EEPROM,  4 ),
        //! Timout occurs on EEPROM configuration
        IEKC64_EEPROM_TIMEOUT_WAITCFG                   = IEKC64_ERR_CODE( IEKC64_EEPROM,  5 ),
        //! Error on reading clock on EEPROM
        IEKC64_EEPROM_CLK_ERROR                                 = IEKC64_ERR_CODE( IEKC64_EEPROM,  6 ),
        //! Error reading address for EEPROM
        IEKC64_EEPROM_BAD_ADDR                                  = IEKC64_ERR_CODE( IEKC64_EEPROM,  7 )
};

/*--------------------------------------------------------------------------*/
/*! Initialize the board

    This function setup EMIF on board registers. It also download
        the fpga data (this takes around 1 second if the FPGA has not been previously load)

        \return An IEKC64_STATUS. If the call succeed, the value will be IEKC64_OK.
                                Otherwise it holds an error code. The status code can be tested by
                                the IEKC64_SUCCESS(return code) macro that is true if the value
                                represents a successful call.

        \b Example: 
        \verbatim
        IEKC64_STATUS   status;

        // Initialize the board
        status = IEKC64_init();
        if ( !IEKC64_SUCCESS(status) )
        {
                printf( "IEKC64_init() returned error %08X\n", status );
                exit( 1 );
        }
        \endverbatim

  You can find usage of this function in <a href="../../example/loopback_audio">example/loopback_audio</a>
  /<a href="../../example/loopback_audio/loopback_audio.c">loopback_audio.c</a>.

*/
IEKC64_STATUS IEKC64_init(void);


/*--------------------------------------------------------------------------*/
/*! Return the version of IEKC64x library

    This function return the version of the IEKC64x library current used.

        \return  version of IEKC64x library

        \b Example: 
        \verbatim
        Uint32 version;
        
        version=IEKC64_getLibraryVersion();
        
        \endverbatim

*/
Uint32 IEKC64_getLibraryVersion();

/*--------------------------------------------------------------------------*/
/*! Return the DSP clock frquency in MHz

    This function return the DSP clock frquency in MHz.

        \param pDspBiosClock
                                This parameter return the DSP speed defined in the DSP/BIOS configuration file. If this parameter is not
                                equal to the DSP clock frequency you must change it in the DSP/BIOS configuration file.

        \return  DSP clock frequency in MHz

        \b Example: 
        \verbatim
        Uint32 boardCpuClock;
        Uint32 dspBiosCpuClock;
        
        boardCpuClock=IEKC64_getCpuClock(&dspBiosCpuClock);
        if(boardCpuClock != dspBiosCpuClock)
                printf("WARNING: Board clock is different from DSP/BIOS configuration file clock.\n");
        
        \endverbatim

  You can find usage of this function in <a href="../../example/loopback_audio">example/loopback_audio</a>
  /<a href="../../example/loopback_audio/loopback_audio.c">loopback_audio.c</a>.

*/
Uint32 IEKC64_getCpuClock(Uint32 *pDspBiosClock);
/*@}*//* end of group INIT */

#ifdef __cplusplus
}
#endif

#endif /* ifndef _IEKC64_INIT_H_ */

⌨️ 快捷键说明

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