/* =========================================================================== */
/* Project:        Lite1 */
/* File:           ST7lib_config.h */
/* Organization:   STMICROELECTRONICS */
/* Author:         VQT  (initial version generated by RBuilder) */
/* Date:           8/10/2005 */
/* =========================================================================== */
#ifndef ST7LIB_CONFIG_H
#define ST7LIB_CONFIG_H
/* ---------------------------Select the Target device------------------------ */
#include "ST7LITE1_periph.h"   /* sfr definition of the ST7FLITE1 */
#endif

/* ------------------------------Define Fcpu, Fosc2--------------------------- */
#define Fcpu ((unsigned long) 8000000)
#define Fosc2 ((unsigned long) 8000000)

/* -----------------------Select the mode of communication-------------------- */
#define SCI_POLLING_TX   /* Polling mode transmission */
#define SCI_POLLING_RX   /* Polling mode reception */

/* -------------------------------Select the TIMER---------------------------- */
/* ---------------Selection of Slave mode transmission configuration --------- */
#define SPI_SLAVE_CONFIG
#define SPI_POLLING_RX   /* Polling mode transmission */
#define SPI_POLLING_TX

/* ---------------Selection of I2C mode transmission configuration --------- */
#define I2C_POLLING_TX   /* Polling mode transmission */
#define I2C_POLLING_RX



#define REM_I2C_SELECT_SPEED               /* disable I2C_Select_Speed function */
#define REM_SCI_COMPUTE_BAUDRATE           /* disable SCI_Compute_Baudrate function */
#define REM_WDG_COMPUTETIMEOUT             /* disable WDG_ComputeTimeout function */
#define REM_ITC_SETPRIORITY                /* disable ITC_SetPriority function */ 

/*****************************Non User Part***********************************/
/*-----------------------------Compiler Selection----------------------------*/     
#if(defined __HIWARE__ | defined __MWERKS__)
#define _HIWARE_ 
#else
#ifdef __CSMC__
#define _COSMIC_
#else
#ifdef __RCST7__
#define _RAISONANCE_
#else
#error "Unsupported Compiler!"                 /* Compiler defines not found */
#endif /* __CSMC__ */
#endif /* __HIWARE__ */
#endif /* __RCST7__ */

#if defined (ST72F521_periph_H)
 #include"st72f521_reg.h"
#else
 #if defined (ST72F62_periph_H)
  #include"st72f62_reg.h"  
 #else
  #if defined (ST7FLITE0_periph_H)
   #include"st7flite0_reg.h"  
  #else
   #if defined (ST72F63_periph_H)
    #include"st72f63_reg.h"    
   #else
    #if defined (ST72F65_periph_H)
     #include"st72f65_reg.h"
    #else
    #if defined (ST72F561_periph_H)
      #include"st72f561_reg.h"
     #else
      #if defined (ST72F264_periph_H)
       #include"st72f264_reg.h"
      #else 
       #if defined (ST7FLITE1_periph_H)
        #include"st7flite1_reg.h"
      #else 
       #if defined (ST7LITE1B_periph_H)
        #include"st7lite1b_reg.h"
       #else
        #if defined (ST7FLITE2_periph_H)
         #include"st7flite2_reg.h"
        #else 
         #if defined (ST7FLITE3_periph_H)
          #include"st7flite3_reg.h"
         #else         
          #if defined (ST7DALI_periph_H)
           #include"st7dali_reg.h"
          #else
           #if defined (ST7LITES0_periph_H)
            #include"st7lites0_reg.h"
           #else
            #if defined (ST7LITES2_5_periph_H)
             #include"st7lites2_5_reg.h"
            #else                 /* Cascade the #if defined for all devices */
             #error   "No Valid ST7 MCU Configuration"
            #endif   
           #endif
          #endif
         #endif
        #endif   
       #endif
      #endif
      #endif
     #endif
    #endif
   #endif
  #endif
 #endif
#endif
        
/*----------------------------Enumerated data type---------------------------*/
#ifndef enum_type
#define enum_type
typedef enum {
   FALSE   =(unsigned char) 0x00,         
   TRUE   = !(FALSE)                
        }BOOL; 
#endif /* enum_type */

/*---------------------Macros for Assembly instructions----------------------*/   
#ifdef _HIWARE_
#define EnableInterrupts {asm RIM;}
#define DisableInterrupts {asm SIM;}
#define Nop   {asm nop;}
#define WaitforInterrupt {asm wfi;}
#endif /* _HIWARE_ */

#ifdef _COSMIC_
#define EnableInterrupts {_asm ("RIM");}  
#define DisableInterrupts {_asm ("SIM");} 
#define Nop {_asm ("nop");} 
#define WaitforInterrupt {_asm ("wfi");} 
#endif /* _COSMIC_ */
     
#ifdef _RAISONANCE_
#define EnableInterrupts {_rim_();}  
#define DisableInterrupts {_sim_();} 
#define Nop {_nop_();} 
#define WaitforInterrupt {_wfi_();} 
#endif /* _RAISONANCE_ */
     
/******************************** End of Non-user Part ***********************/
   
/**** (c) 2003   STMicroelectronics *************************** END OF FILE **/
