/******************************************************************************
COPYRIGHT 2003 STMicroelectronics 
Source File Name : st72f264_reg.h
Group            : IPSW,CMG - IPDF
Author           : MCD Application Team
Date First Issued: 23/09/2003
********************************Documentation**********************************
General Purpose - This file declares all the hardware registers for 
														metrowerks and cosmic.

********************************Revision History*******************************
_______________________________________________________________________________
Date :23/09/2003             Release:2.0   
Date :2/06/2004              Release 2.1
                             Address information added for metrowerks registers    	   		        	      
******************************************************************************/
#ifndef ST72F264_REG_H
#define ST72F264_REG_H 

#include "ST7lib_config.h"

/******************************************************************************
 Peripherals Registers Definition
 *****************************************************************************/
#ifdef _HIWARE_ 

/* IO Ports Hardware Registers                                               */  

/* PORT C register                                                           */
 extern volatile unsigned char PCDR    @0x00;        /* PORT C data Register */
 extern volatile unsigned char PCDDR   @0x01;    /* Data direction register  */
 extern volatile unsigned char PCOR    @0x02;	          /* Option register */

/* PORT B register                                                           */
 extern volatile unsigned char PBDR    @0x04;	     /* PORT B data Register */
 extern volatile unsigned char PBDDR   @0x05;      /* Data direction register*/
 extern volatile unsigned char PBOR    @0x06;	          /* Option register */

/* PORT A register                                                           */
 extern volatile unsigned char PADR    @0x08;	     /* PORT A data Register */
 extern volatile unsigned char PADDR   @0x09;      /* Data direction register*/
 extern volatile unsigned char PAOR    @0x0A;	          /* Option register */

/*ITC Hardware registers                                                     */

 extern volatile unsigned char ITSPR0 @0x1C;  
                                      /*Interrupt Software Priority Register0*/
 extern volatile unsigned char ITSPR1 @0x1D;         
                                      /*Interrupt Software Priority Register1*/ 
 extern volatile unsigned char ITSPR2 @0x1E;        
                                      /*Interrupt Software Priority Register2*/ 
 extern volatile unsigned char ITSPR3 @0x1F;        
                                      /*Interrupt Software Priority Register3*/ 
/* Miscellanous register 1                                                   */
 extern volatile unsigned char MISCR1 @0x20;        
                                        /*External Interrupt Control Register*/ 

/* SPI Hardware Registers                                                    */
 extern volatile unsigned char SPIDR   @0x21;            /* SPI Data Register*/
 extern volatile unsigned char SPICR   @0x22;         /* SPI Control Register*/
 extern volatile unsigned char SPICSR  @0x23;          /* SPI Status Register*/ 

/* WDG Hardware registers                                                    */ 
 extern volatile unsigned char WDGCR   @0x24;	/* WDG Control Register      */   
 extern volatile unsigned char SICSR   @0x25;	/* System Control Register   */   

/* MCC register                                                              */
 extern volatile unsigned char MCC_WDG  @0x26;      

/* MCC Hardware Registers                                                    */
 extern volatile unsigned char MCCSR   @0x26;/* MCC Control/Status Register  */

/* I2C Hardware Registers                                                    */ 

 extern volatile unsigned char I2CCR     @0x28;       /* I2C control register*/
 extern volatile unsigned char I2CSR1    @0x29;       /* I2C status register1*/
 extern volatile unsigned char I2CSR2    @0x2A;       /* I2C status register2*/
 extern volatile unsigned char I2CCCR    @0x2B; /* I2C clock control register*/
 extern volatile unsigned char I2COAR1   @0x2C;  /* I2C own address register1*/
 extern volatile unsigned char I2COAR2   @0x2D;  /* I2C own address register2*/ 
 extern volatile unsigned char I2CDR     @0x2E;          /* I2C data register*/

/* Timer Hardware Registers                                                  */
/* TIMER A section                                                           */ 
 extern volatile unsigned char TACR2   @0x31;	/* Control Register 2        */
 extern volatile unsigned char TACR1   @0x32;	/* Control Register 1        */
 extern volatile unsigned char TACSR   @0x33;	/* Status Register           */
 extern volatile unsigned char TAIC1HR @0x34;	/* Input Capture 1 High      */
 extern volatile unsigned char TAIC1LR @0x35;	/* Input Capture 1 Low       */
 extern volatile unsigned char TAOC1HR @0x36;	/* Output Compare 1 High     */
 extern volatile unsigned char TAOC1LR @0x37;	/* Output Compare 1 Low      */
 extern volatile unsigned char TACHR   @0x38;	/* Counter High              */
 extern volatile unsigned char TACLR   @0x39;	/* Counter Low               */
 extern volatile unsigned char TAACHR  @0x3a;	/* Alternate Counter High    */
 extern volatile unsigned char TAACLR  @0x3b;	/* Alternate Counter Low     */
 extern volatile unsigned char TAIC2HR @0x3c;	/* Input Capture 2 High      */
 extern volatile unsigned char TAIC2LR @0x3d;	/* Input Capture 2 Low       */
 extern volatile unsigned char TAOC2HR @0x3e;	/* Output Compare 2 High     */
 extern volatile unsigned char TAOC2LR @0x3f;	/* Output Compare 2 Low      */

/* 16 bit register                                                           */
 extern volatile unsigned int  TAIC1R  @0x34;	/* Input Capture 1 Register  */
 extern volatile unsigned int  TAOC1R  @0x36;	/* Output Compare 1 Register */
 extern volatile unsigned int  TACR    @0x38;	/* Counter Register          */
 extern volatile unsigned int  TAACR   @0x3a;	/* Alternate Counter Register*/
 extern volatile unsigned int  TAIC2R  @0x3c;	/* Input Capture 2 Register  */
 extern volatile unsigned int  TAOC2R  @0x3e;	/* Output Compare 2 Register */

/* Miscellanous register 2                                                   */
 extern volatile unsigned char MISCR2 @0x40;        

/*    TIMER B section                                                        */
 extern volatile unsigned char TBCR2   @0x41;	/* Control Register 2        */
 extern volatile unsigned char TBCR1   @0x42;	/* Control Register 1        */
 extern volatile unsigned char TBCSR   @0x43;	/* Status Register           */
 extern volatile unsigned char TBIC1HR @0x44;	/* Input Capture 1 High      */
 extern volatile unsigned char TBIC1LR @0x45;	/* Input Capture 1 Low       */
 extern volatile unsigned char TBOC1HR @0x46;	/* Output Compare 1 High     */
 extern volatile unsigned char TBOC1LR @0x47;	/* Output Compare 1 Low      */
 extern volatile unsigned char TBCHR   @0x48;	/* Counter High              */
 extern volatile unsigned char TBCLR   @0x49;	/* Counter Low               */
 extern volatile unsigned char TBACHR  @0x4a;	/* Alternate Counter High    */
 extern volatile unsigned char TBACLR  @0x4b;	/* Alternate Counter Low     */
 extern volatile unsigned char TBIC2HR @0x4c;	/* Input Capture 2 High      */
 extern volatile unsigned char TBIC2LR @0x4d;	/* Input Capture 2 Low       */
 extern volatile unsigned char TBOC2HR @0x4e;	/* Output Compare 2 High     */
 extern volatile unsigned char TBOC2LR @0x4f;	/* Output Compare 2 Low      */

/* 16 bit register                                                           */
 extern volatile unsigned int  TBIC1R  @0x44;	/* Input Capture 1 Register  */
 extern volatile unsigned int  TBOC1R  @0x46;	/* Output Compare 1 Register */
 extern volatile unsigned int  TBCR    @0x48;	/* Counter Register          */
 extern volatile unsigned int  TBACR   @0x4a;	/* Alternate Counter Register*/
 extern volatile unsigned int  TBIC2R  @0x4c;	/* Input Capture 2 Register  */
 extern volatile unsigned int  TBOC2R  @0x4e;	/* Output Compare 2 Register */

/*SCI Hardware registers                                                     */
 extern volatile unsigned char SCISR @0x50;
 extern volatile unsigned char SCIDR @0x51; 
 extern volatile unsigned char SCIBRR @0x52;
 extern volatile unsigned char SCICR1 @0x53;
 extern volatile unsigned char SCICR2 @0x54; 
 extern volatile unsigned char SCIERPR @0x55;
 extern volatile unsigned char SCIETPR @0x56; 

/* ADC Hardware Registers                                                    */
 extern volatile unsigned char ADCDRL  @0x6F;       /* ADC data register     */
 extern volatile unsigned char ADCDRH  @0x70;       /* ADC data register     */
 extern volatile unsigned char ADCCSR  @0x71; /* ADC control & staus register*/
   
/* Flash control register                                                    */
 extern volatile unsigned char FCSR  @0x72;

#endif  /* _HIWARE_                                                          */

#ifdef _COSMIC_
           
/* IO Ports Hardware Registers                                               */  

/* PORT C register                                                           */
@tiny volatile	unsigned char PCDR    @0x00;	     /* PORT C data Register */
@tiny volatile	unsigned char PCDDR   @0x01;      /* Data direction register */
@tiny volatile	unsigned char PCOR    @0x02;	          /* Option register */

/* PORT B register                                                           */
@tiny volatile	unsigned char PBDR    @0x04;	     /* PORT B data Register */
@tiny volatile	unsigned char PBDDR   @0x05;      /* Data direction register */
@tiny volatile	unsigned char PBOR    @0x06;	          /* Option register */

/* PORT A register                                                           */
@tiny volatile	unsigned char PADR    @0x08;	     /* PORT A data Register */
@tiny volatile	unsigned char PADDR   @0x09;      /* Data direction register */
@tiny volatile	unsigned char PAOR    @0x0A;	          /* Option register */

/*ITC Hardware registers                                                     */

@tiny volatile unsigned char ITSPR0 @0x1C;  
                                      /*Interrupt Software Priority Register0*/
@tiny volatile unsigned char ITSPR1 @0x1D;         
                                      /*Interrupt Software Priority Register1*/ 
@tiny volatile unsigned char ITSPR2 @0x1E;        
                                      /*Interrupt Software Priority Register2*/ 
@tiny volatile unsigned char ITSPR3 @0x1F;        
                                      /*Interrupt Software Priority Register3*/ 
/* Miscellanous register 1                                                   */
@tiny volatile unsigned char MISCR1 @0x20;        
                                        /*External Interrupt Control Register*/ 

/* SPI Hardware Registers                                                    */
@tiny volatile	unsigned char SPIDR   @0x21;            /* SPI Data Register */
@tiny volatile	unsigned char SPICR   @0x22;         /* SPI Control Register */
@tiny volatile	unsigned char SPICSR  @0x23;          /* SPI Status Register */ 

/* WDG Hardware registers                                                    */ 
@tiny volatile	unsigned char WDGCR   @0x24;	/* WDG Control Register      */   
@tiny volatile	unsigned char SICSR   @0x25;	/* WDG Control Register      */   

/* MCC register                                                              */
@tiny volatile unsigned char MCC_WDG  @0x26;      

/* MCC Hardware Registers                                                    */
@tiny volatile	unsigned char MCCSR   @0x26;/* MCC Control/Status Register */

/* I2C Hardware Registers                                                    */ 

@tiny volatile	unsigned char I2CCR     @0x28;       /* I2C control register */
@tiny volatile	unsigned char I2CSR1    @0x29;       /* I2C status register1 */
@tiny volatile	unsigned char I2CSR2    @0x2A;       /* I2C status register2 */
@tiny volatile	unsigned char I2CCCR    @0x2B; /* I2C clock control register */
@tiny volatile	unsigned char I2COAR1   @0x2C;  /* I2C own address register1 */
@tiny volatile	unsigned char I2COAR2   @0x2D;  /* I2C own address register2 */ 
@tiny volatile	unsigned char I2CDR     @0x2E;          /* I2C data register */

/* Timer Hardware Registers                                                  */
/* TIMER A section                                                           */ 
@tiny volatile	unsigned char TACR2   @0x31;	/* Control Register 2        */
@tiny volatile	unsigned char TACR1   @0x32;	/* Control Register 1        */
@tiny volatile	unsigned char TACSR   @0x33;	/* Status Register           */
@tiny volatile	unsigned char TAIC1HR @0x34;	/* Input Capture 1 High      */
@tiny volatile	unsigned char TAIC1LR @0x35;	/* Input Capture 1 Low       */
@tiny volatile	unsigned char TAOC1HR @0x36;	/* Output Compare 1 High     */
@tiny volatile	unsigned char TAOC1LR @0x37;	/* Output Compare 1 Low      */
@tiny volatile	unsigned char TACHR   @0x38;	/* Counter High              */
@tiny volatile	unsigned char TACLR   @0x39;	/* Counter Low               */
@tiny volatile	unsigned char TAACHR  @0x3a;	/* Alternate Counter High    */
@tiny volatile	unsigned char TAACLR  @0x3b;	/* Alternate Counter Low     */
@tiny volatile	unsigned char TAIC2HR @0x3c;	/* Input Capture 2 High      */
@tiny volatile	unsigned char TAIC2LR @0x3d;	/* Input Capture 2 Low       */
@tiny volatile	unsigned char TAOC2HR @0x3e;	/* Output Compare 2 High     */
@tiny volatile	unsigned char TAOC2LR @0x3f;	/* Output Compare 2 Low      */

/* 16 bit register                                                           */
@tiny volatile	unsigned int  TAIC1R  @0x34;	/* Input Capture 1 Register  */
@tiny volatile	unsigned int  TAOC1R  @0x36;	/* Output Compare 1 Register */
@tiny volatile	unsigned int  TACR    @0x38;	/* Counter Register          */
@tiny volatile	unsigned int  TAACR   @0x3a;	/* Alternate Counter Register*/
@tiny volatile	unsigned int  TAIC2R  @0x3c;	/* Input Capture 2 Register  */
@tiny volatile	unsigned int  TAOC2R  @0x3e;	/* Output Compare 2 Register */

/* Miscellanous register 2                                                   */
@tiny volatile unsigned char MISCR2 @0x40;        

/*    TIMER B section                                                        */
@tiny volatile	unsigned char TBCR2   @0x41;	/* Control Register 2        */
@tiny volatile	unsigned char TBCR1   @0x42;	/* Control Register 1        */
@tiny volatile	unsigned char TBCSR   @0x43;	/* Status Register           */
@tiny volatile	unsigned char TBIC1HR @0x44;	/* Input Capture 1 High      */
@tiny volatile	unsigned char TBIC1LR @0x45;	/* Input Capture 1 Low       */
@tiny volatile	unsigned char TBOC1HR @0x46;	/* Output Compare 1 High     */
@tiny volatile	unsigned char TBOC1LR @0x47;	/* Output Compare 1 Low      */
@tiny volatile	unsigned char TBCHR   @0x48;	/* Counter High              */
@tiny volatile	unsigned char TBCLR   @0x49;	/* Counter Low               */
@tiny volatile	unsigned char TBACHR  @0x4a;	/* Alternate Counter High    */
@tiny volatile	unsigned char TBACLR  @0x4b;	/* Alternate Counter Low     */
@tiny volatile	unsigned char TBIC2HR @0x4c;	/* Input Capture 2 High      */
@tiny volatile	unsigned char TBIC2LR @0x4d;	/* Input Capture 2 Low       */
@tiny volatile	unsigned char TBOC2HR @0x4e;	/* Output Compare 2 High     */
@tiny volatile	unsigned char TBOC2LR @0x4f;	/* Output Compare 2 Low      */

/* 16 bit register                                                           */
@tiny volatile	unsigned int  TBIC1R  @0x44;	/* Input Capture 1 Register  */
@tiny volatile	unsigned int  TBOC1R  @0x46;	/* Output Compare 1 Register */
@tiny volatile	unsigned int  TBCR    @0x48;	/* Counter Register          */
@tiny volatile	unsigned int  TBACR   @0x4a;	/* Alternate Counter Register*/
@tiny volatile	unsigned int  TBIC2R  @0x4c;	/* Input Capture 2 Register  */
@tiny volatile	unsigned int  TBOC2R  @0x4e;	/* Output Compare 2 Register */

/*SCI Hardware registers                                                     */
@tiny volatile unsigned char SCISR @0x50;
@tiny volatile unsigned char SCIDR @0x51; 
@tiny volatile unsigned char SCIBRR @0x52;
@tiny volatile unsigned char SCICR1 @0x53;
@tiny volatile unsigned char SCICR2 @0x54; 
@tiny volatile unsigned char SCIERPR @0x55;
@tiny volatile unsigned char SCIETPR @0x56; 

/* ADC Hardware Registers                                                    */
@tiny volatile unsigned char ADCDRL  @0x6F;              /* ADC data register*/
@tiny volatile unsigned char ADCDRH  @0x70;              /* ADC data register*/
@tiny volatile unsigned char ADCCSR  @0x71;   /* ADC control & staus register*/

/* Flash control register                                                    */
@tiny volatile unsigned char FCSR  @0x72;

#endif /* _COSMIC_                                                           */
 

#ifdef _RAISONANCE_ 

/* IO Ports Hardware Registers                                               */  

/* PORT C register                                                           */
 at 0x00 hreg PCDR    ;        /* PORT C data Register */
 at 0x01 hreg PCDDR   ;    /* Data direction register  */
 at 0x02 hreg PCOR    ;	          /* Option register */

/* PORT B register                                                           */
 at 0x04 hreg PBDR    ;	     /* PORT B data Register */
 at 0x05 hreg PBDDR   ;      /* Data direction register*/
 at 0x06 hreg PBOR    ;	          /* Option register */

/* PORT A register                                                           */
 at 0x08 hreg PADR    ;	     /* PORT A data Register */
 at 0x09 hreg PADDR   ;      /* Data direction register*/
 at 0x0A hreg PAOR    ;	          /* Option register */

/*ITC Hardware registers                                                     */

 at 0x1C hreg ITSPR0 ;  
                                      /*Interrupt Software Priority Register0*/
 at 0x1D hreg ITSPR1 ;         
                                      /*Interrupt Software Priority Register1*/ 
 at 0x1E hreg ITSPR2 ;        
                                      /*Interrupt Software Priority Register2*/ 
 at 0x1F hreg ITSPR3 ;        
                                      /*Interrupt Software Priority Register3*/ 
/* Miscellanous register 1                                                   */
 at 0x20 hreg MISCR1 ;        
                                        /*hreg16errupt Control Register*/ 

/* SPI Hardware Registers                                                    */
 at 0x21 hreg SPIDR   ;            /* SPI Data Register*/
 at 0x22 hreg SPICR   ;         /* SPI Control Register*/
 at 0x23 hreg SPICSR  ;          /* SPI Status Register*/ 

/* WDG Hardware registers                                                    */ 
 at 0x24 hreg WDGCR   ;	/* WDG Control Register      */   
 at 0x25 hreg SICSR   ;	/* System Control Register   */   

/* MCC register                                                              */
 at 0x26 hreg MCC_WDG  ;      

/* MCC Hardware Registers                                                    */
 at 0x26 hreg MCCSR   ;/* MCC Control/Status Register  */

/* I2C Hardware Registers                                                    */ 

 at 0x28 hreg I2CCR     ;       /* I2C control register*/
 at 0x29 hreg I2CSR1    ;       /* I2C status register1*/
 at 0x2A hreg I2CSR2    ;       /* I2C status register2*/
 at 0x2B hreg I2CCCR    ; /* I2C clock control register*/
 at 0x2C hreg I2COAR1   ;  /* I2C own address register1*/
 at 0x2D hreg I2COAR2   ;  /* I2C own address register2*/ 
 at 0x2E hreg I2CDR     ;          /* I2C data register*/

/* Timer Hardware Registers                                                  */
/* TIMER A section                                                           */ 
 at 0x31 hreg TACR2   ;	/* Control Register 2        */
 at 0x32 hreg TACR1   ;	/* Control Register 1        */
 at 0x33 hreg TACSR   ;	/* Status Register           */
 at 0x34 hreg TAIC1HR ;	/* Input Capture 1 High      */
 at 0x35 hreg TAIC1LR ;	/* Input Capture 1 Low       */
 at 0x36 hreg TAOC1HR ;	/* Output Compare 1 High     */
 at 0x37 hreg TAOC1LR ;	/* Output Compare 1 Low      */
 at 0x38 hreg TACHR   ;	/* Counter High              */
 at 0x39 hreg TACLR   ;	/* Counter Low               */
 at 0x3a hreg TAACHR  ;	/* Alternate Counter High    */
 at 0x3b hreg TAACLR  ;	/* Alternate Counter Low     */
 at 0x3c hreg TAIC2HR ;	/* Input Capture 2 High      */
 at 0x3d hreg TAIC2LR ;	/* Input Capture 2 Low       */
 at 0x3e hreg TAOC2HR ;	/* Output Compare 2 High     */
 at 0x3f hreg TAOC2LR ;	/* Output Compare 2 Low      */

/* 16 bit register                                                           */
 at 0x34 hreg16  TAIC1R  ;	/* Input Capture 1 Register  */
 at 0x36 hreg16  TAOC1R  ;	/* Output Compare 1 Register */
 at 0x38 hreg16  TACR    ;	/* Counter Register          */
 at 0x3a hreg16  TAACR   ;	/* Alternate Counter Register*/
 at 0x3c hreg16  TAIC2R  ;	/* Input Capture 2 Register  */
 at 0x3e hreg16  TAOC2R  ;	/* Output Compare 2 Register */

/* Miscellanous register 2                                                   */
 at 0x40 hreg MISCR2 ;        

/*    TIMER B section                                                        */
 at 0x41 hreg TBCR2   ;	/* Control Register 2        */
 at 0x42 hreg TBCR1   ;	/* Control Register 1        */
 at 0x43 hreg TBCSR   ;	/* Status Register           */
 at 0x44 hreg TBIC1HR ;	/* Input Capture 1 High      */
 at 0x45 hreg TBIC1LR ;	/* Input Capture 1 Low       */
 at 0x46 hreg TBOC1HR ;	/* Output Compare 1 High     */
 at 0x47 hreg TBOC1LR ;	/* Output Compare 1 Low      */
 at 0x48 hreg TBCHR   ;	/* Counter High              */
 at 0x49 hreg TBCLR   ;	/* Counter Low               */
 at 0x4a hreg TBACHR  ;	/* Alternate Counter High    */
 at 0x4b hreg TBACLR  ;	/* Alternate Counter Low     */
 at 0x4c hreg TBIC2HR ;	/* Input Capture 2 High      */
 at 0x4d hreg TBIC2LR ;	/* Input Capture 2 Low       */
 at 0x4e hreg TBOC2HR ;	/* Output Compare 2 High     */
 at 0x4f hreg TBOC2LR ;	/* Output Compare 2 Low      */

/* 16 bit register                                                           */
 at 0x44 hreg16  TBIC1R  ;	/* Input Capture 1 Register  */
 at 0x46 hreg16  TBOC1R  ;	/* Output Compare 1 Register */
 at 0x48 hreg16  TBCR    ;	/* Counter Register          */
 at 0x4a hreg16  TBACR   ;	/* Alternate Counter Register*/
 at 0x4c hreg16  TBIC2R  ;	/* Input Capture 2 Register  */
 at 0x4e hreg16  TBOC2R  ;	/* Output Compare 2 Register */

/*SCI Hardware registers                                                     */
 at 0x50 hreg SCISR ;
 at 0x51 hreg SCIDR ; 
 at 0x52 hreg SCIBRR ;
 at 0x53 hreg SCICR1 ;
 at 0x54 hreg SCICR2 ; 
 at 0x55 hreg SCIERPR ;
 at 0x56 hreg SCIETPR ; 

/* ADC Hardware Registers                                                    */
 at 0x6F hreg ADCDRL  ;       /* ADC data register     */
 at 0x70 hreg ADCDRH  ;       /* ADC data register     */
 at 0x71 hreg ADCCSR  ; /* ADC control & staus register*/
   
/* Flash control register                                                    */
 at 0x72 hreg FCSR  ;

#endif  /* _RAISONANCE_                                                      */

#endif /* ST72F264_REG_H                                                     */

/*** (c) 2003   STMicroelectronics ****************** END OF FILE ************/
