/************************************************************************/  
#ifndef _A2D2A_HPP_  
#define _A2D2A_HPP_
/************************************************************************/   
//  DSP 1 <=> TMS320C6711 
/*  Include Header File  */
/* Chip definition, change this accordingly */
#define CHIP_6711 1
#include "global_var.h" 
#include <std.h>


//#include <c6x.h>
#include <csl.h>         /* CSL library   */
#include <csl_dma.h>     /* DMA_SUPPORT   */
#include <csl_edma.h>    /* EDMA_SUPPORT  */
#include <csl_irq.h>     /* IRQ_SUPPORT   */
#include <csl_mcbsp.h>   /* MCBSP_SUPPORT */

/*******/

/* EMIF Interface parameters */

/*
#define    RDSETUP       (1)    
#define    RDSTRB        (4)
#define    RDHLD         (6)
#define    WRSETUP       (4) 
#define    WRSTRB        (3)    
#define    WRHLD         (6)
*/
 // For CS2 <-> A2D2A port (D/A and A/D)
#define    RDSETUP       (2)    // max =15 w: 2
#define    RDSTRB        (12)  //max =63  w: 12
#define    RDHLD         (3)  //max = 7  w:3
#define    WRSETUP       (1)// max =15   w:1
#define    WRSTRB        (12)    //max =63  w:12
#define    WRHLD         (3) //max =3  w:3


 // For CS1 <-> IO port (LED + switches)
#define    RDSETUP1       (1)    // max =15 w: 2
#define    RDSTRB1        (2)  //max =63  w: 12
#define    RDHLD1         (3)  //max = 7  w:3
#define    WRSETUP1       (2)// max =15   w:1
#define    WRSTRB1        (1)    //max =63  w:12
#define    WRHLD1         (3) //max =3  w:3


/* Setup: The time between the beginning of a memory cycle (CE low, address
valid) and the activation of the read or write strobe */


/* Strobe: The time between the activation and deactivation of the read
(ARE) or write strobe (AWE) */



/* Hold: The time between the deactivation of the read or write strobe and the
end of the cycle (which can be either an address change or the deactivation
of the CE signal) */

/* Pick which EDMA transfer completion interrupt we want to use */
#define TCCINTNUM   6


/******/

/* include files for DSP/BIOS               */
#include <std.h>  
#include <swi.h>
#include <log.h>                          

/* include files for chip support library   */
#include <csl.h>
#include <csl_legacy.h>
#include <csl_irq.h> /* IRQ_SUPPORT */
#include <csl_timer.h>

#include <csl_edma.h> /* EDMA_SUPPORT */
#include <csl_mcbsp.h> /* MCBSP_SUPPORT */

#include <csl_legacy.h>




/******/



/* function prototypes */
void far init_memory(void);
void far init_A2D2A(void);



/************************************************************************/  
#endif  /* Commom definitions follows : */
/************************************************************************/ 

