/******************************************************************************/ /* 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