/*****************************************************************************\

  File Name: EZKitHWConfig.h
  
  Description: This is the header file contain BlackFin EZKit HW configuration
               related items.

\*****************************************************************************/
#ifndef __EZKITHWCONFIG_H__
#define __EZKITHWCONFIG_H__

#include <cplb.h> //Cache settings

//Make sure that this demo is used on a BF533, BF537 or BF561 only.  All else
//not supported.  Also do hardware specific defines
#if   defined (__ADSPBF533__)
#define IS_BRAEMAR  0
#define SZ_DSPNAME  "ADSP-BF533"
#elif defined (__ADSPBF537__)
#define IS_BRAEMAR  1 //This is a braemar class DSP
#define SZ_DSPNAME  "ADSP-BF537"
#elif defined (__ADSPBF561__)
#define IS_BRAEMAR  0
#define SZ_DSPNAME  "ADSP-BF561"
#else
#error This demo runs on the BF533 EZ-KIT, BF561 EZ-KIT or the BF537 EZ-KIT
#endif

#define LED_INIT_SUCCESS    (EZ_FIRST_LED + 0)
#define LED_IDLE            (EZ_FIRST_LED + 1)
#define LED_CALLBACK        (EZ_FIRST_LED + 2)
#define LED_CODEC_ENABLED   (EZ_FIRST_LED + 3)
#define BUTTON_QUIT         (EZ_FIRST_BUTTON + 0)
#define BUTTON_CODEC_TOGGLE (EZ_FIRST_BUTTON + 1)

#if defined(__ADSPBF533__)
#define BASE_BUTTON  4
#define BASE_LED     4
#endif

#if defined(__ADSPBF561__)
#define BASE_BUTTON  6
#define BASE_LED     5
#endif

//Turn on data cache
#ifdef OPT_CACHE
int __cplb_ctrl = CPLB_ENABLE_ICPLBS | CPLB_ENABLE_ICACHE | 
                  CPLB_ENABLE_DCPLBS | CPLB_ENABLE_DCACHE | 
                  CPLB_ENABLE_DCACHE2;
#endif



#endif  //__EZKITHWCONFIG_H__

