/******************************************************************************
COPYRIGHT 2003 STMicroelectronics 
Source File Name : st72561_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 cosmic 
													and metrowerks compiler.

********************************Revision History*******************************
_______________________________________________________________________________
Date :23/09/2003    Release:2.0 
Date :12/03/2004    1.Updated SCI1 register names
                    2.Updated ITC register names  
Date :2/06/2004     Address information added for metrowerks registers                   	   		        	      
******************************************************************************/
#ifndef ST72F561_REG_H
#define ST72F561_REG_H

#include "st7lib_config.h"

#ifdef _HIWARE_      
/*---------------------------------------------------------------------------*/ 

/* IO Ports Hardware Registers                                               */
  extern volatile unsigned char PADR    @0x00;	  /* PORT A data Register    */
  extern volatile unsigned char PADDR   @0x01; /* Data direction register    */
  extern volatile unsigned char PAOR    @0x02;	       /* Option register    */  
                                                     
/* PORT B register                                                           */
 extern volatile unsigned char PBDR    @0x03;	  /* PORT B data Register    */
 extern volatile unsigned char PBDDR   @0x04; /* Data direction register     */
 extern volatile unsigned char PBOR    @0x05;         /* Option Register     */

    
/* PORT C register                                                           */
 extern volatile unsigned char PCDR    @0x06;     /* PORT C data Register    */
 extern volatile unsigned char PCDDR   @0x07; /* Data direction register     */
 extern volatile unsigned char PCOR    @0x08;	       /* Option register    */


/* PORT D register                                                           */
 extern volatile unsigned char PDDR    @0x09;	  /* PORT D data Register    */
 extern volatile unsigned char PDDDR   @0x0A; /* Data direction register     */
 extern volatile unsigned char PDOR    @0x0B;          /* Option register    */  
                                                     
/* PORT E register                                                           */
 extern volatile unsigned char PEDR    @0x0C;	  /* PORT E data Register    */
 extern volatile unsigned char PEDDR   @0x0D; /* Data direction register     */
 extern volatile unsigned char PEOR    @0x0E;	       /* Option register    */


/* PORT F register                                                           */
 extern volatile unsigned char PFDR    @0x0F;	  /* PORT F data Register    */
 extern volatile unsigned char PFDDR   @0x10; /* Data direction register     */
 extern volatile unsigned char PFOR    @0x11;         /* Option Register     */

/*---------------------------------------------------------------------------*/    
 
/* SPI Hardware Registers                                                    */

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

/* FLASH Hardware Registers                                                  */
 extern volatile unsigned char FCSR    @0x24; /* Control/Status Register     */
        
/* ITC Hardware Registers                                                    */
 extern volatile unsigned char FCSR    @0x24; /* Control/Status Register     */
        
/* ITC Hardware Registers                                                    */
 extern volatile unsigned char ITSPR0 @0x25;   
                                        /*Interrupt SoftwarePriority Reg0    */
 extern volatile unsigned char ITSPR1 @0x26;   
                                        /*Interrupt SoftwarePriority Reg1    */    
 extern volatile unsigned char ITSPR2 @0x27;   
                                        /*Interrupt SoftwarePriority Reg2    */
 extern volatile unsigned char ITSPR3 @0x28;   
                                        /*Interrupt SoftwarePriority Reg3    */    
 extern volatile unsigned char EICR0 @0x29;    
                                        /*external Interrupt ControlReg 0    */    
 extern volatile unsigned char EICR1 @0x2A;   
                                        /* External InterruptControl Reg1    */        
    
/* AWU Hardware Registers                                                    */
 extern volatile unsigned char AWUCSR @0x2B; /* AWU Control/Status Register  */
 extern volatile unsigned char AWUPR @0x2C;  
                                      /* Autowake up from halt Prescaler     */    

/* CKCTRL Hardware Registers                                                 */
 extern volatile unsigned char SICSR @0x2D; 
                                     /* System Integrity Ctrl/Status Reg     */
 extern volatile unsigned char MCCSR @0x2E; 
                                     /* Main Clock Cntrl/Status register     */    
    
/* WDG Hardware Registers                                                    */
 extern volatile unsigned char WDGCR @0x2F;          /* Control register     */
 extern volatile unsigned char WWDGR @0x30;  /* window watchdog Register     */

/* PWMART hardware Registers                                                 */    
 extern volatile unsigned char PWMDCR3 @0x31;    /* PWM Duty Cycle Reg 3     */
 extern volatile unsigned char PWMDCR2 @0x32;    /* PWM Duty Cycle Reg 2     */
 extern volatile unsigned char PWMDCR1 @0x33;    /* PWM Duty Cycle Reg 1     */    
 extern volatile unsigned char PWMDCR0 @0x34;    /* PWM Duty Cycle Reg 0     */    
 extern volatile unsigned char PWMCR @0x35;      /* PWM Duty Control Reg     */    
 extern volatile unsigned char ARTCSR @0x36;   /* ART Control/Status Reg     */
 extern volatile unsigned char ARTCAR @0x37;   /* ART Counter Access Reg     */
 extern volatile unsigned char ARTARR @0x38;      /* ART Auto Reload Reg     */
 extern volatile unsigned char ARTICCSR @0x39;
                                       /*ART Input Capture Ctrl/Stats reg    */
 extern volatile unsigned char ARTICR1 @0x3A;     /* Input Capture reg 1     */
 extern volatile unsigned char ARTICR2 @0x3B;     /* Input Capture reg 2     */

/* 8 BIT TIMER REGISTERS                                                     */    
 extern volatile unsigned char T8CR2 @0x3C;        /* Control Register 2     */
 extern volatile unsigned char T8CR1 @0x3D;        /* Control Register 1     */
 extern volatile unsigned char T8CSR @0x3E;   /* Control/Status Register     */
 extern volatile unsigned char T8IC1R @0x3F; /* Input capture 1 register     */
 extern volatile unsigned char T8OC1R @0x40; /* Output Compare 1 Register    */
 extern volatile unsigned char T8CTR @0x41;     /*Timer Counter Register     */
 extern volatile unsigned char T8ACTR @0x42;    /* Alternate Counter Reg     */
 extern volatile unsigned char T8IC2R @0x43; /*Input Capture Register 2      */
 extern volatile unsigned char T8OC2R @0x44;     /* Output Compare 2 Reg     */
                                                                              
/* ADC port hardware registers                                               */   
 extern volatile unsigned char ADCCSR @0x45;  /* Control/Status Register     */
 extern volatile unsigned char ADCDRH @0x46;       /* Data Register High     */    
 extern volatile unsigned char ADCDRL @0x47;        /* Data Register Low     */

/* SCI Hardware Registers                                                    */
 extern volatile unsigned char SCISR @0x48;               /* Status Register */
 extern volatile unsigned char SCIDR @0x49;                 /* Data Register */
 extern volatile unsigned char SCIBRR @0x4A;           /* Baud Rate Register */
 extern volatile unsigned char SCICR1 @0x4B;           /* Control Register 1 */
 extern volatile unsigned char SCICR2 @0x4C;           /* Control Register 2 */
 extern volatile unsigned char SCICR3 @0x4D;           /* Control Register 3 */
 extern volatile unsigned char SCIERPR @0x4E;/*Extended Receive Prescaler Reg*/
 extern volatile unsigned char SCIETPR @0x4F; 
                                          /* Extended Transmit Prescaler Reg */

                                      
/* 16 Bit TIMER                                                              */
 extern volatile unsigned char TACR2 @0x51;            /* Control Register 2 */
 extern volatile unsigned char TACR1 @0x52;            /* Control Register 1 */
 extern volatile unsigned char TACSR @0x53;       /* Control/Status Register */
 extern volatile unsigned char TAIC1HR @0x54;        /* Input Capture 1 High */
 extern volatile unsigned char TAIC1LR @0x55;         /* Input Capture 1 Low */
 extern volatile unsigned char TAOC1HR @0x56;       /* Output Compare 1 High */
 extern volatile unsigned char TAOC1LR @0x57;        /* Output Compare 1 Low */
 extern volatile unsigned char TACHR @0x58;                  /* Counter High */
 extern volatile unsigned char TACLR @0x59;                   /* Counter Low */
 extern volatile unsigned char TAACHR @0x5A;       /* Alternate Counter High */
 extern volatile unsigned char TAACLR @0x5B;        /* Alternate Counter Low */
 extern volatile unsigned char TAIC2HR @0x5C;        /* Input Capture 2 High */
 extern volatile unsigned char TAIC2LR @0x5D;         /* Input Capture 2 Low */
 extern volatile unsigned char TAOC2HR @0x5E;       /* Output Compare 2 High */
 extern volatile unsigned char TAOC2LR @0x5F;        /* Output Compare 2 Low */
   
  
/* 16 bit regisgers TIMERA                                                   */
 extern volatile unsigned int  TAIC1R @0x54;     /* Input Capture 1 Register */
 extern volatile unsigned int  TAOC1R @0x56;    /* Output Compare 1 Register */
 extern volatile unsigned int  TACR   @0x58;             /* Counter Register */
 extern volatile unsigned int  TAACR  @0x5A;   /* Alternate Counter Register */
 extern volatile unsigned int  TAIC2R @0x5C;     /* Input Capture 2 Register */
 extern volatile unsigned int  TAOC2R @0x5E;    /* Output Compare 2 Register */ 



/* SCI Hardware Registers                                                    */
 extern volatile unsigned char SCI2SR @0x60;          /* Status Register     */
 extern volatile unsigned char SCI2DR @0x61;            /* Data Register     */
 extern volatile unsigned char SCI2BRR @0x62;      /* Baud Rate Register     */
 extern volatile unsigned char SCI2CR1 @0x63;      /* Control Register 1     */
 extern volatile unsigned char SCI2CR2 @0x64;      /* Control Register 2     */
 extern volatile unsigned char SCI2CR3 @0x65;      /* Control Register 3     */
 extern volatile unsigned char SCI2ERPR @0x66; 
                                        /*Extended Receive Prescaler Reg     */
 extern volatile unsigned char SCI2ETPR @0x67;
                                       /*Extended Transmit Prescaler Reg     */


/* CAN Hardware Registers */   
    extern volatile unsigned char CAN_CMCR @0x68; /* CAN Master Control Register*/
    extern volatile unsigned char CAN_CMSR @0x69; /* Master status Register     */
    extern volatile unsigned char CAN_CTSR @0x6A; /* Transmit Status Register   */
    extern volatile unsigned char CAN_CTPR @0x6B; /* Transmit Priority register */
    extern volatile unsigned char CAN_CRFR @0x6C; /* Receive FIFO Register      */
    extern volatile unsigned char CAN_CIER @0x6D; /* Interrupt Enable Register  */
    extern volatile unsigned char CAN_CDGR @0x6E; /* Diagnosis Register         */
    extern volatile unsigned char CAN_CPSR @0x6F; /* Page selection register    */

/*  Tx MailBox/Receive FIFO Registers */
    extern volatile unsigned char CAN_MCSR  	@0x70;   /* For Tx */
    extern volatile unsigned char CAN_MFMI  	@0x70;   /* For Receive FIFO */
    extern volatile unsigned char CAN_MDLC  	@0x71;
    extern volatile unsigned char CAN_MIDR0 	@0x72;
    extern volatile unsigned char CAN_MIDR1 	@0x73;
    extern volatile unsigned char CAN_MIDR2	@0x74;
    extern volatile unsigned char CAN_MIDR3 	@0x75;
    extern volatile unsigned char CAN_MDAR[8]    @0x76;
//    extern volatile unsigned int  CAN_MDAW[4]	@0x76;
     
	
    extern volatile unsigned char CAN_MTSLR 	@0x7e;
    extern volatile unsigned char CAN_MTSHR 	@0x7f;
    
    extern volatile unsigned int  CAN_MIDR01 	@0x72;
    extern volatile unsigned int  CAN_MIDR23 	@0x74;

/*  Configuaration/Diagnosis Registers */    
                                    
    extern volatile unsigned char CAN_CESR  	@0x70;
    extern volatile unsigned char CAN_CEIER 	@0x71;
    extern volatile unsigned char CAN_TECR  	@0x72;
    extern volatile unsigned char CAN_RECR  	@0x73;
    extern volatile unsigned char CAN_CBTR0 	@0x74;
    extern volatile unsigned char CAN_CBTR1 	@0x75;
    extern volatile unsigned char CAN_unknown1 	@0x76;
    extern volatile unsigned char CAN_unknown2 	@0x77;
    extern volatile unsigned char CAN_CFMR0 	@0x78;
    extern volatile unsigned char CAN_CFMR1 	@0x79;
    extern volatile unsigned char CAN_CFCR0 	@0x7a;
    extern volatile unsigned char CAN_CFCR1 	@0x7b;
    extern volatile unsigned char CAN_CFCR2 	@0x7c;
    extern volatile unsigned char CAN_unknown3 	@0x7d;
    extern volatile unsigned char CAN_unknown4 	@0x7e;
    extern volatile unsigned char CAN_unknown5 	@0x7f;

/*  Acceptance Filter Registers*/

    extern volatile unsigned char CAN_CFxR0 @0x70;
    extern volatile unsigned char CAN_CFxR1 @0x71;
    extern volatile unsigned char CAN_CFxR2 @0x72;
    extern volatile unsigned char CAN_CFxR3 @0x73;
    extern volatile unsigned char CAN_CFxR4 @0x74;
    extern volatile unsigned char CAN_CFxR5 @0x75;
    extern volatile unsigned char CAN_CFxR6 @0x76;
    extern volatile unsigned char CAN_CFxR7 @0x77;

    extern volatile unsigned char CAN_CFyR0 @0x78;
    extern volatile unsigned char CAN_CFyR1 @0x79;
    extern volatile unsigned char CAN_CFyR2 @0x7a;
    extern volatile unsigned char CAN_CFyR3 @0x7b;
    extern volatile unsigned char CAN_CFyR4 @0x7c;
    extern volatile unsigned char CAN_CFyR5 @0x7d;
    extern volatile unsigned char CAN_CFyR6 @0x7e;
    extern volatile unsigned char CAN_CFyR7 @0x7f;

    extern volatile unsigned int CAN_CFxR01 @0x70;
    extern volatile unsigned int CAN_CFxR23 @0x72;
    extern volatile unsigned int CAN_CFxR45 @0x74;
    extern volatile unsigned int CAN_CFxR67 @0x76;

    extern volatile unsigned int CAN_CFyR01 @0x78;
    extern volatile unsigned int CAN_CFyR23 @0x7a;
    extern volatile unsigned int CAN_CFyR45 @0x7c;
    extern volatile unsigned int CAN_CFyR67 @0x7e;
  
#endif /*_HIWARE_*/
/*****************************************************************************/
/* Only for COSMIC compiler                                                  */
#ifdef _COSMIC_                                                                
/*---------------------------------------------------------------------------*/ 
/* IO Ports Hardware Registers                                               */  
/* PORT A register                                                           */
@tiny volatile unsigned char PADR    @0x00;          /* PORT A data Register */
@tiny volatile unsigned char PADDR   @0x01;       /* Data direction register */
@tiny volatile unsigned char PAOR    @0x02;               /* Option register */

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

/* PORT C register                                                           */
@tiny volatile unsigned char PCDR    @0x06;          /* PORT C data Register */
@tiny volatile unsigned char PCDDR   @0x07;       /* Data direction register */
@tiny volatile unsigned char PCOR    @0x08;               /* Option register */

/* PORT D register                                                           */
@tiny volatile unsigned char PDDR    @0x09;          /* PORT D data Register */
@tiny volatile unsigned char PDDDR   @0x0A;       /* Data direction register */
@tiny volatile unsigned char PDOR    @0x0B;               /* Option register */

/* PORT E register                                                           */
@tiny volatile unsigned char PEDR    @0x0C;          /* PORT E data Register */
@tiny volatile unsigned char PEDDR   @0x0D;       /* Data direction register */
@tiny volatile unsigned char PEOR    @0x0E;               /* Option register */

/* PORT F register                                                           */
@tiny volatile unsigned char PFDR    @0x0F;          /* PORT F data Register */
@tiny volatile unsigned char PFDDR   @0x10;       /* Data direction register */
@tiny volatile unsigned char PFOR    @0x11;               /* Option Register */

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

/*---------------------------------------------------------------------------*/    
/* FLASH Hardware Registers                                                  */
@tiny volatile unsigned char FCSR    @0x24;       /* Control/Status Register */
        
/* ITC Hardware Registers                                                    */
@tiny volatile unsigned char ITSPR0 @0x25;  /*Interrupt SoftwarePriority Reg0*/
@tiny volatile unsigned char ITSPR1 @0x26;  /*Interrupt SoftwarePriority Reg1*/    
@tiny volatile unsigned char ITSPR2 @0x27;  /*Interrupt SoftwarePriority Reg2*/
@tiny volatile unsigned char ITSPR3 @0x28;  /*Interrupt SoftwarePriority Reg3*/    
@tiny volatile unsigned char EICR0 @0x29;   /*external Interrupt ControlReg 0*/    
@tiny volatile unsigned char EICR1 @0x2A;   /* External InterruptControl Reg1*/        
    
/* AWU Hardware Registers                                                    */
@tiny volatile unsigned char AWUCSR @0x2B;    /* AWU Control/Status Register */
@tiny volatile unsigned char AWUPR @0x2C; /* Autowake up from halt Prescaler */    

/* CKCTRL Hardware Registers                                                 */
@tiny volatile unsigned char SICSR @0x2D;/* System Integrity Ctrl/Status Reg */
@tiny volatile unsigned char MCCSR @0x2E;/* Main Clock Cntrl/Status register */    
    
/* WDG Hardware Registers                                                    */
@tiny volatile unsigned char WDGCR @0x2F;                /* Control register */
@tiny volatile unsigned char WWDGR @0x30;        /* window watchdog Register */

/* PWMART hardware Registers                                                 */    
@tiny volatile unsigned char PWMDCR3 @0x31;          /* PWM Duty Cycle Reg 3 */
@tiny volatile unsigned char PWMDCR2 @0x32;          /* PWM Duty Cycle Reg 2 */
@tiny volatile unsigned char PWMDCR1 @0x33;          /* PWM Duty Cycle Reg 1 */    
@tiny volatile unsigned char PWMDCR0 @0x34;          /* PWM Duty Cycle Reg 0 */    
@tiny volatile unsigned char PWMCR @0x35;            /* PWM Duty Control Reg */    
@tiny volatile unsigned char ARTCSR @0x36;         /* ART Control/Status Reg */
@tiny volatile unsigned char ARTCAR @0x37;         /* ART Counter Access Reg */
@tiny volatile unsigned char ARTARR @0x38;            /* ART Auto Reload Reg */
@tiny volatile unsigned char ARTICCSR @0x39;
                                        /* ART Input Capture Ctrl/Stats reg  */
@tiny volatile unsigned char ARTICR1 @0x3A;           /* Input Capture reg 1 */
@tiny volatile unsigned char ARTICR2 @0x3B;           /* Input Capture reg 2 */

/* 8 BIT TIMER REGISTERS                                                     */    
@tiny volatile unsigned char T8CR2 @0x3C;              /* Control Register 2 */
@tiny volatile unsigned char T8CR1 @0x3D;              /* Control Register 1 */
@tiny volatile unsigned char T8CSR @0x3E;         /* Control/Status Register */
@tiny volatile unsigned char T8IC1R @0x3F;       /* Input capture 1 register */
@tiny volatile unsigned char T8OC1R @0x40;       /* Output Compare 1 Register*/
@tiny volatile unsigned char T8CTR @0x41;           /*Timer Counter Register */
@tiny volatile unsigned char T8ACTR @0x42;          /* Alternate Counter Reg */
@tiny volatile unsigned char T8IC2R @0x43;       /*Input Capture Register 2  */
@tiny volatile unsigned char T8OC2R @0x44;           /* Output Compare 2 Reg */
    
/* ADC port hardware registers                                               */   
@tiny volatile unsigned char ADCCSR @0x45;        /* Control/Status Register */
@tiny volatile unsigned char ADCDRH @0x46;             /* Data Register High */    
@tiny volatile unsigned char ADCDRL @0x47;              /* Data Register Low */

/* SCI Hardware Registers                                                    */
@tiny volatile unsigned char SCISR @0x48;                 /* Status Register */
@tiny volatile unsigned char SCIDR @0x49;                   /* Data Register */
@tiny volatile unsigned char SCIBRR @0x4A;             /* Baud Rate Register */
@tiny volatile unsigned char SCICR1 @0x4B;             /* Control Register 1 */
@tiny volatile unsigned char SCICR2 @0x4C;             /* Control Register 2 */
@tiny volatile unsigned char SCICR3 @0x4D;             /* Control Register 3 */
@tiny volatile unsigned char SCIERPR @0x4E; /*Extended Receive Prescaler Reg */
@tiny volatile unsigned char SCIETPR @0x4F; /*Extended Transmit Prescaler Reg*/

                                      
/* 16 Bit TIMER                                                              */
@tiny volatile unsigned char TACR2 @0x51;              /* Control Register 2 */
@tiny volatile unsigned char TACR1 @0x52;              /* Control Register 1 */
@tiny volatile unsigned char TACSR @0x53;         /* Control/Status Register */
@tiny volatile unsigned char TAIC1HR @0x54;          /* Input Capture 1 High */
@tiny volatile unsigned char TAIC1LR @0x55;           /* Input Capture 1 Low */
@tiny volatile unsigned char TAOC1HR @0x56;         /* Output Compare 1 High */
@tiny volatile unsigned char TAOC1LR @0x57;          /* Output Compare 1 Low */
@tiny volatile unsigned char TACHR @0x58;                    /* Counter High */
@tiny volatile unsigned char TACLR @0x59;                     /* Counter Low */
@tiny volatile unsigned char TAACHR @0x5A;         /* Alternate Counter High */
@tiny volatile unsigned char TAACLR @0x5B;          /* Alternate Counter Low */
@tiny volatile unsigned char TAIC2HR @0x5C;          /* Input Capture 2 High */
@tiny volatile unsigned char TAIC2LR @0x5D;           /* Input Capture 2 Low */
@tiny volatile unsigned char TAOC2HR @0x5E;         /* Output Compare 2 High */
@tiny volatile unsigned char TAOC2LR @0x5F;          /* Output Compare 2 Low */
   

/* 16 bit regisgers TIMERA                                                   */
volatile unsigned int  TAIC1R @0x54;            /* Input Capture 1 Register*/
volatile unsigned int  TAOC1R @0x56;           /* Output Compare 1 Register*/
volatile unsigned int  TACR   @0x58;                   /* Counter Register */
volatile unsigned int  TAACR  @0x5A;         /* Alternate Counter Register */
volatile unsigned int  TAIC2R @0x5C;            /* Input Capture 2 Register*/
volatile unsigned int  TAOC2R @0x5E;           /* Output Compare 2 Register*/ 


/* SCI Hardware Registers                                                    */
@tiny volatile unsigned char SCI2SR @0x60;                /* Status Register */
@tiny volatile unsigned char SCI2DR @0x61;                  /* Data Register */
@tiny volatile unsigned char SCI2BRR @0x62;            /* Baud Rate Register */
@tiny volatile unsigned char SCI2CR1 @0x63;            /* Control Register 1 */
@tiny volatile unsigned char SCI2CR2 @0x64;            /* Control Register 2 */
@tiny volatile unsigned char SCI2CR3 @0x65;            /* Control Register 3 */
@tiny volatile unsigned char SCI2ERPR @0x66;/*Extended Receive Prescaler Reg */
@tiny volatile unsigned char SCI2ETPR @0x67;/*Extended Transmit Prescaler Reg*/


/* CAN Hardware Registers */   
    @tiny volatile unsigned char CAN_CMCR @0x68; /* CAN Master Control Register*/
    @tiny volatile unsigned char CAN_CMSR @0x69; /* Master status Register     */
    @tiny volatile unsigned char CAN_CTSR @0x6A; /* Transmit Status Register   */
    @tiny volatile unsigned char CAN_CTPR @0x6B; /* Transmit Priority register */
    @tiny volatile unsigned char CAN_CRFR @0x6C; /* Receive FIFO Register      */
    @tiny volatile unsigned char CAN_CIER @0x6D; /* Interrupt Enable Register  */
    @tiny volatile unsigned char CAN_CDGR @0x6E; /* Diagnosis Register         */
    @tiny volatile unsigned char CAN_CPSR @0x6F; /* Page selection register    */

/*  Tx MailBox/Receive FIFO Registers */
    @tiny volatile unsigned char CAN_MCSR  	@0x70;   /* For Tx */
    @tiny volatile unsigned char CAN_MFMI  	@0x70;   /* For Receive FIFO */
    @tiny volatile unsigned char CAN_MDLC  	@0x71;
    @tiny volatile unsigned char CAN_MIDR0 	@0x72;
    @tiny volatile unsigned char CAN_MIDR1 	@0x73;
    @tiny volatile unsigned char CAN_MIDR2	@0x74;
    @tiny volatile unsigned char CAN_MIDR3 	@0x75;
    @tiny volatile unsigned char CAN_MDAR[8]    @0x76;
    @tiny volatile unsigned int  CAN_MDAW[4]	@0x76;
     
	
    @tiny volatile unsigned char CAN_MTSLR 	@0x7e;
    @tiny volatile unsigned char CAN_MTSHR 	@0x7f;
    
    @tiny volatile unsigned int  CAN_MIDR01 	@0x72;
    @tiny volatile unsigned int  CAN_MIDR23 	@0x74;

/*  Configuaration/Diagnosis Registers */    
    
    @tiny volatile unsigned char CAN_CESR  	@0x70;
    @tiny volatile unsigned char CAN_CEIER 	@0x71;
    @tiny volatile unsigned char CAN_TECR  	@0x72;
    @tiny volatile unsigned char CAN_RECR  	@0x73;
    @tiny volatile unsigned char CAN_CBTR0 	@0x74;
    @tiny volatile unsigned char CAN_CBTR1 	@0x75;
    @tiny volatile unsigned char CAN_unknown1 	@0x76;
    @tiny volatile unsigned char CAN_unknown2 	@0x77;
    @tiny volatile unsigned char CAN_CFMR0 	@0x78;
    @tiny volatile unsigned char CAN_CFMR1 	@0x79;
    @tiny volatile unsigned char CAN_CFCR0 	@0x7a;
    @tiny volatile unsigned char CAN_CFCR1 	@0x7b;
    @tiny volatile unsigned char CAN_CFCR2 	@0x7c;
    @tiny volatile unsigned char CAN_unknown3 	@0x7d;
    @tiny volatile unsigned char CAN_unknown4 	@0x7e;
    @tiny volatile unsigned char CAN_unknown5 	@0x7f;

/*  Acceptance Filter Registers*/

    @tiny volatile unsigned char CAN_CFxR0 @0x70;
    @tiny volatile unsigned char CAN_CFxR1 @0x71;
    @tiny volatile unsigned char CAN_CFxR2 @0x72;
    @tiny volatile unsigned char CAN_CFxR3 @0x73;
    @tiny volatile unsigned char CAN_CFxR4 @0x74;
    @tiny volatile unsigned char CAN_CFxR5 @0x75;
    @tiny volatile unsigned char CAN_CFxR6 @0x76;
    @tiny volatile unsigned char CAN_CFxR7 @0x77;

    @tiny volatile unsigned char CAN_CFyR0 @0x78;
    @tiny volatile unsigned char CAN_CFyR1 @0x79;
    @tiny volatile unsigned char CAN_CFyR2 @0x7a;
    @tiny volatile unsigned char CAN_CFyR3 @0x7b;
    @tiny volatile unsigned char CAN_CFyR4 @0x7c;
    @tiny volatile unsigned char CAN_CFyR5 @0x7d;
    @tiny volatile unsigned char CAN_CFyR6 @0x7e;
    @tiny volatile unsigned char CAN_CFyR7 @0x7f;

    @tiny volatile unsigned int CAN_CFxR01 @0x70;
    @tiny volatile unsigned int CAN_CFxR23 @0x72;
    @tiny volatile unsigned int CAN_CFxR45 @0x74;
    @tiny volatile unsigned int CAN_CFxR67 @0x76;

    @tiny volatile unsigned int CAN_CFyR01 @0x78;
    @tiny volatile unsigned int CAN_CFyR23 @0x7a;
    @tiny volatile unsigned int CAN_CFyR45 @0x7c;
    @tiny volatile unsigned int CAN_CFyR67 @0x7e;
/*****************************************************************************/
 
#endif /*_COSMIC_ */

#ifdef _RAISONANCE_      
/*---------------------------------------------------------------------------*/ 

/* IO Ports Hardware Registers                                               */
  at 0x00 hreg PADR    ;	  /* PORT A data Register    */
  at 0x01 hreg PADDR   ; /* Data direction register    */
  at 0x02 hreg PAOR    ;	       /* Option register    */  
                                                     
/* PORT B register                                                           */
 at 0x03 hreg PBDR    ;	  /* PORT B data Register    */
 at 0x04 hreg PBDDR   ; /* Data direction register     */
 at 0x05 hreg PBOR    ;         /* Option Register     */

    
/* PORT C register                                                           */
 at 0x06 hreg PCDR    ;     /* PORT C data Register    */
 at 0x07 hreg PCDDR   ; /* Data direction register     */
 at 0x08 hreg PCOR    ;	       /* Option register    */


/* PORT D register                                                           */
 at 0x09 hreg PDDR    ;	  /* PORT D data Register    */
 at 0x0A hreg PDDDR   ; /* Data direction register     */
 at 0x0B hreg PDOR    ;          /* Option register    */  
                                                     
/* PORT E register                                                           */
 at 0x0C hreg PEDR    ;	  /* PORT E data Register    */
 at 0x0D hreg PEDDR   ; /* Data direction register     */
 at 0x0E hreg PEOR    ;	       /* Option register    */


/* PORT F register                                                           */
 at 0x0F hreg PFDR    ;	  /* PORT F data Register    */
 at 0x10 hreg PFDDR   ; /* Data direction register     */
 at 0x11 hreg PFOR    ;         /* Option Register     */

/*---------------------------------------------------------------------------*/    
 
/* SPI Hardware Registers                                                    */

 at 0x21 hreg SPIDR   ;   /* SPI Data I/O Register     */
 at 0x22 hreg SPICR   ;    /* SPI Control register     */
 at 0x23 hreg SPICSR  ; /* SPI Control/Status register */

/* FLASH Hardware Registers                                                  */
 at 0x24 hreg FCSR    ; /* Control/Status Register     */
        
/* ITC Hardware Registers                                                    */
 at 0x24 hreg FCSR    ; /* Control/Status Register     */
        
/* ITC Hardware Registers                                                    */
 at 0x25 hreg ITSPR0 ;   
                                        /*Interrupt SoftwarePriority Reg0    */
 at 0x26 hreg ITSPR1 ;   
                                        /*Interrupt SoftwarePriority Reg1    */    
 at 0x27 hreg ITSPR2 ;   
                                        /*Interrupt SoftwarePriority Reg2    */
 at 0x28 hreg ITSPR3 ;   
                                        /*Interrupt SoftwarePriority Reg3    */    
 at 0x29 hreg EICR0 ;    
                                        /*hreg16errupt ControlReg 0    */    
 at 0x2A hreg EICR1 ;   
                                        /* hreg16erruptControl Reg1    */        
    
/* AWU Hardware Registers                                                    */
 at 0x2B hreg AWUCSR ; /* AWU Control/Status Register  */
 at 0x2C hreg AWUPR ;  
                                      /* Autowake up from halt Prescaler     */    

/* CKCTRL Hardware Registers                                                 */
 at 0x2D hreg SICSR ; 
                                     /* System Integrity Ctrl/Status Reg     */
 at 0x2E hreg MCCSR ; 
                                     /* Main Clock Cntrl/Status register     */    
    
/* WDG Hardware Registers                                                    */
 at 0x2F hreg WDGCR ;          /* Control register     */
 at 0x30 hreg WWDGR ;  /* window watchdog Register     */

/* PWMART hardware Registers                                                 */    
 at 0x31 hreg PWMDCR3 ;    /* PWM Duty Cycle Reg 3     */
 at 0x32 hreg PWMDCR2 ;    /* PWM Duty Cycle Reg 2     */
 at 0x33 hreg PWMDCR1 ;    /* PWM Duty Cycle Reg 1     */    
 at 0x34 hreg PWMDCR0 ;    /* PWM Duty Cycle Reg 0     */    
 at 0x35 hreg PWMCR ;      /* PWM Duty Control Reg     */    
 at 0x36 hreg ARTCSR ;   /* ART Control/Status Reg     */
 at 0x37 hreg ARTCAR ;   /* ART Counter Access Reg     */
 at 0x38 hreg ARTARR ;      /* ART Auto Reload Reg     */
 at 0x39 hreg ARTICCSR ;
                                       /*ART Input Capture Ctrl/Stats reg    */
 at 0x3A hreg ARTICR1 ;     /* Input Capture reg 1     */
 at 0x3B hreg ARTICR2 ;     /* Input Capture reg 2     */

/* 8 BIT TIMER REGISTERS                                                     */    
 at 0x3C hreg T8CR2 ;        /* Control Register 2     */
 at 0x3D hreg T8CR1 ;        /* Control Register 1     */
 at 0x3E hreg T8CSR ;   /* Control/Status Register     */
 at 0x3F hreg T8IC1R ; /* Input capture 1 register     */
 at 0x40 hreg T8OC1R ; /* Output Compare 1 Register    */
 at 0x41 hreg T8CTR ;     /*Timer Counter Register     */
 at 0x42 hreg T8ACTR ;    /* Alternate Counter Reg     */
 at 0x43 hreg T8IC2R ; /*Input Capture Register 2      */
 at 0x44 hreg T8OC2R ;     /* Output Compare 2 Reg     */
                                                                              
/* ADC port hardware registers                                               */   
 at 0x45 hreg ADCCSR ;  /* Control/Status Register     */
 at 0x46 hreg ADCDRH ;       /* Data Register High     */    
 at 0x47 hreg ADCDRL ;        /* Data Register Low     */

/* SCI Hardware Registers                                                    */
 at 0x48 hreg SCISR ;               /* Status Register */
 at 0x49 hreg SCIDR ;                 /* Data Register */
 at 0x4A hreg SCIBRR ;           /* Baud Rate Register */
 at 0x4B hreg SCICR1 ;           /* Control Register 1 */
 at 0x4C hreg SCICR2 ;           /* Control Register 2 */
 at 0x4D hreg SCICR3 ;           /* Control Register 3 */
 at 0x4E hreg SCIERPR ;/*Extended Receive Prescaler Reg*/
 at 0x4F hreg SCIETPR ; 
                                          /* Extended Transmit Prescaler Reg */

                                      
/* 16 Bit TIMER                                                              */
 at 0x51 hreg TACR2 ;            /* Control Register 2 */
 at 0x52 hreg TACR1 ;            /* Control Register 1 */
 at 0x53 hreg TACSR ;       /* Control/Status Register */
 at 0x54 hreg TAIC1HR ;        /* Input Capture 1 High */
 at 0x55 hreg TAIC1LR ;         /* Input Capture 1 Low */
 at 0x56 hreg TAOC1HR ;       /* Output Compare 1 High */
 at 0x57 hreg TAOC1LR ;        /* Output Compare 1 Low */
 at 0x58 hreg TACHR ;                  /* Counter High */
 at 0x59 hreg TACLR ;                   /* Counter Low */
 at 0x5A hreg TAACHR ;       /* Alternate Counter High */
 at 0x5B hreg TAACLR ;        /* Alternate Counter Low */
 at 0x5C hreg TAIC2HR ;        /* Input Capture 2 High */
 at 0x5D hreg TAIC2LR ;         /* Input Capture 2 Low */
 at 0x5E hreg TAOC2HR ;       /* Output Compare 2 High */
 at 0x5F hreg TAOC2LR ;        /* Output Compare 2 Low */
   
  
/* 16 bit regisgers TIMERA                                                   */
 at 0x54 hreg16  TAIC1R ;     /* Input Capture 1 Register */
 at 0x56 hreg16  TAOC1R ;    /* Output Compare 1 Register */
 at 0x58 hreg16  TACR   ;             /* Counter Register */
 at 0x5A hreg16  TAACR  ;   /* Alternate Counter Register */
 at 0x5C hreg16  TAIC2R ;     /* Input Capture 2 Register */
 at 0x5E hreg16  TAOC2R ;    /* Output Compare 2 Register */ 



/* SCI Hardware Registers                                                    */
 at 0x60 hreg SCI2SR ;          /* Status Register     */
 at 0x61 hreg SCI2DR ;            /* Data Register     */
 at 0x62 hreg SCI2BRR ;      /* Baud Rate Register     */
 at 0x63 hreg SCI2CR1 ;      /* Control Register 1     */
 at 0x64 hreg SCI2CR2 ;      /* Control Register 2     */
 at 0x65 hreg SCI2CR3 ;      /* Control Register 3     */
 at 0x66 hreg SCI2ERPR ; 
                                        /*Extended Receive Prescaler Reg     */
 at 0x67 hreg SCI2ETPR ;
                                       /*Extended Transmit Prescaler Reg     */


/* CAN Hardware Registers */   
    at 0x68 hreg CAN_CMCR ; /* CAN Master Control Register*/
    at 0x69 hreg CAN_CMSR ; /* Master status Register     */
    at 0x6A hreg CAN_CTSR ; /* Transmit Status Register   */
    at 0x6B hreg CAN_CTPR ; /* Transmit Priority register */
    at 0x6C hreg CAN_CRFR ; /* Receive FIFO Register      */
    at 0x6D hreg CAN_CIER ; /* Interrupt Enable Register  */
    at 0x6E hreg CAN_CDGR ; /* Diagnosis Register         */
    at 0x6F hreg CAN_CPSR ; /* Page selection register    */

/*  Tx MailBox/Receive FIFO Registers */
    at 0x70 hreg CAN_MCSR  	;   /* For Tx */
    at 0x70 hreg CAN_MFMI  	;   /* For Receive FIFO */
    at 0x71 hreg CAN_MDLC  	;
    at 0x72 hreg CAN_MIDR0 	;
    at 0x73 hreg CAN_MIDR1 	;
    at 0x74 hreg CAN_MIDR2	;
    at 0x75 hreg CAN_MIDR3 	;
    at 0x76 hreg CAN_MDAR[8]    ;
//    at 0x76 hreg16  CAN_MDAW[4]	;
     
	
    at 0x7e hreg CAN_MTSLR 	;
    at 0x7f hreg CAN_MTSHR 	;
    
    at 0x72 hreg16  CAN_MIDR01 	;
    at 0x74 hreg16  CAN_MIDR23 	;

/*  Configuaration/Diagnosis Registers */    
                                    
    at 0x70 hreg CAN_CESR  	;
    at 0x71 hreg CAN_CEIER 	;
    at 0x72 hreg CAN_TECR  	;
    at 0x73 hreg CAN_RECR  	;
    at 0x74 hreg CAN_CBTR0 	;
    at 0x75 hreg CAN_CBTR1 	;
    at 0x76 hreg CAN_unknown1 	;
    at 0x77 hreg CAN_unknown2 	;
    at 0x78 hreg CAN_CFMR0 	;
    at 0x79 hreg CAN_CFMR1 	;
    at 0x7a hreg CAN_CFCR0 	;
    at 0x7b hreg CAN_CFCR1 	;
    at 0x7c hreg CAN_CFCR2 	;
    at 0x7d hreg CAN_unknown3 	;
    at 0x7e hreg CAN_unknown4 	;
    at 0x7f hreg CAN_unknown5 	;

/*  Acceptance Filter Registers*/

    at 0x70 hreg CAN_CFxR0 ;
    at 0x71 hreg CAN_CFxR1 ;
    at 0x72 hreg CAN_CFxR2 ;
    at 0x73 hreg CAN_CFxR3 ;
    at 0x74 hreg CAN_CFxR4 ;
    at 0x75 hreg CAN_CFxR5 ;
    at 0x76 hreg CAN_CFxR6 ;
    at 0x77 hreg CAN_CFxR7 ;

    at 0x78 hreg CAN_CFyR0 ;
    at 0x79 hreg CAN_CFyR1 ;
    at 0x7a hreg CAN_CFyR2 ;
    at 0x7b hreg CAN_CFyR3 ;
    at 0x7c hreg CAN_CFyR4 ;
    at 0x7d hreg CAN_CFyR5 ;
    at 0x7e hreg CAN_CFyR6 ;
    at 0x7f hreg CAN_CFyR7 ;

    at 0x70 hreg16 CAN_CFxR01 ;
    at 0x72 hreg16 CAN_CFxR23 ;
    at 0x74 hreg16 CAN_CFxR45 ;
    at 0x76 hreg16 CAN_CFxR67 ;

    at 0x78 hreg16 CAN_CFyR01 ;
    at 0x7a hreg16 CAN_CFyR23 ;
    at 0x7c hreg16 CAN_CFyR45 ;
    at 0x7e hreg16 CAN_CFyR67 ;
  
#endif /*_RAISONANCE_*/

#endif /* st72561 */
