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

📄 cache.h

📁 本程序完成在dsp 的平台下
💻 H
字号:
/******************************************************************************/
/*  CACHE.H - TMS320C6x Peripheral Support Library Program Cache Support      */
/*                                                                            */
/*     This file provides the header for program memory cache support.        */
/*                                                                            */
/*  MACRO FUNCTIONS:                                                          */
/*     CACHE_ENABLE()  - Enables program memory cache                         */
/*     CACHE_DISABLE() - Disables program memory cache (memory-mapped)        */
/*     CACHE_FREEZE()  - Freeze program memory cache                          */
/*     CACHE_BYPASS()  - Bypass program memory cache                          */
/*     CACHE_FLUSH()   - Flush program memory cache                           */
/*     IDLE()          - Put processor in IDLE state                          */
/*                                                                            */
/*  FUNCTIONS:                                                                */
/*    None.                                                                   */
/*                                                                            */
/*  REVISION HISTORY:                                                         */
/*                                                                            */
/*    DATE                              DESCRIPTION                           */
/*   -------   -------------------------------------------------------------  */
/*   11MAY98   Capitalized hexadecimal constants for consistency.             */
/*                                                                            */
/******************************************************************************/
#ifndef _CACHE_H_
#define _CACHE_H_

/*----------------------------------------------------------------------------*/
/* INCLUDES                                                                   */
/*----------------------------------------------------------------------------*/
#include "regs.h"

/*----------------------------------------------------------------------------*/
/* DEFINES AND MACROS                                                         */
/*----------------------------------------------------------------------------*/
#define CACHE_ENABLE() \
        {CSR &= 0xFFFFFF1F; CSR |= 0x40;}

#define CACHE_DISABLE() \
        {CSR &= 0xFFFFFF1F;}

#define CACHE_FREEZE() \
        {CSR &= 0xFFFFFF1F; CSR |= 0x60;}

#define CACHE_BYPASS() \
        {CSR &= 0xFFFFFF1F; CSR |= 0x80;}

#define CACHE_FLUSH() \
        {CACHE_DISABLE(); CACHE_ENABLE();}

#define IDLE() \
        { asm("\tidle");}

/*----------------------------------------------------------------------------*/
/* GLOBAL VARIABLES                                                           */
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
/* FUNCTIONS                                                                  */
/*----------------------------------------------------------------------------*/

#endif

⌨️ 快捷键说明

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