//----------------------------------------------
// Register Declarations for the  ST72521
// Copyright (c) Raisonance SA, 1987-2006
//----------------------------------------------

/* IO Ports Hardware Registers                                               */  
/* PORT A register                                                           */
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 */

/* PORT G register                                                           */
at 0x12 hreg PGDR    ;	     /* PORT G data Register */
at 0x13 hreg PGDDR   ;      /* Data direction register */
at 0x14 hreg PGOR    ;	          /* Option register */

/* PORT H register                                                           */
at 0x15 hreg PHDR    ;	     /* PORT H data Register */
at 0x16 hreg PHDDR   ;      /* Data direction register */
at 0x17 hreg PHOR    ;	          /* Option register */

/* I2C Hardware Registers                                                    */ 
at 0x18 hreg I2CCR     ;       /* I2C control register */
at 0x19 hreg I2CSR1    ;       /* I2C status register1 */
at 0x1A hreg I2CSR2    ;       /* I2C status register2 */
at 0x1B hreg I2CCCR    ; /* I2C clock control register */
at 0x1C hreg I2COAR1   ;  /* I2C own address register1 */
at 0x1D hreg I2COAR2   ;  /* I2C own address register2 */ 
at 0x1E hreg I2CDR     ;          /* I2C data 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 */

/*ITC Hardware registers                                                     */
at 0x24 hreg ITSPR0 ; /*Interrupt Software Priority Reg0*/
at 0x25 hreg ITSPR1 ; /*Interrupt Software Priority Reg1*/ 
at 0x26 hreg ITSPR2 ; /*Interrupt Software Priority Reg2*/ 
at 0x27 hreg ITSPR3 ; /*Interrupt Software Priority Reg3*/ 
at 0x28 hreg EICR   ; /*hreg16errupt Control Reg */ 

/*FLASH Memory                                                               */
at 0x29 hreg FLASH_REG ;     /*FLASH register          */

/* WDG Hardware registers                                                    */ 
at 0x2a hreg WDGCR   ;	/* WDG Control Register      */  

/*SICSR  register                                                            */
at 0x2b hreg SICSR_REG ;

/* MCC Hardware Registers                                                    */
at 0x2C hreg MCCSR   ;   /* MCC Control/Status Register*/
at 0x2D hreg MCCBCR  ;     /* MCC beep control 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 timer A 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 */

/*    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 timer B 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 Res ;
at 0x57 hreg SCIETPR ; 

/* CAN Hardware registers */
at 0x5A hreg CANISR ;  /* CAN Interrupt Status Register*/
at 0x5B hreg CANICR ; /* CAN Interrupt Control Register*/
at 0x5C hreg CANCSR ;  /* CAN Control/Status Register  */
at 0x5D hreg CANBRPR ;  /* Baudrate Prescaler Register */
at 0x5E hreg CANBTR ;       /* CAN Bit Timing Register */
at 0x5F hreg CANPSR ;   /* CAN Page Selection Register */

/* Actve CAN register                                                        */
at 0x60 hreg PAGE0 ;   
at 0x61 hreg PAGE1 ;
at 0x62 hreg PAGE2 ;
at 0x63 hreg PAGE3 ;
at 0x64 hreg PAGE4 ;   
at 0x65 hreg PAGE5 ;
at 0x66 hreg PAGE6 ;
at 0x67 hreg PAGE7 ;
at 0x68 hreg PAGE8 ;   
at 0x69 hreg PAGE9 ;
at 0x6A hreg PAGEA ;
at 0x6B hreg PAGEB ;
at 0x6C hreg PAGEC ;   
at 0x6D hreg PAGED ;
at 0x6E hreg PAGEE ;
at 0x6F hreg PAGEF ;

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

/* PWMART Hardware Registers                                                 */
at 0x73 hreg PWMDCR3  ;	/* PWM Duty Cycle Register 3 */
at 0x74 hreg PWMDCR2  ;	/* PWM Duty Cycle Register 2 */
at 0x75 hreg PWMDCR1  ;	/* PWM Duty Cycle Register 1 */
at 0x76 hreg PWMDCR0  ;	/* PWM Duty Cycle Register 0 */
at 0x77 hreg PWMCR    ;	/* PWM Control Register      */
at 0x78 hreg ARTCSR   ;	/* ART Control/Status Reg.   */
at 0x79 hreg ARTCAR   ;	/* ART Counter Access Reg.   */
at 0x7a hreg ARTARR   ;	/* ART Auto Reload Register  */
at 0x7b hreg ARTICCSR ;	/* ART ICAP Control/Status   */
at 0x7c hreg ARTICR1  ;	/* ART Input Capture Reg.1   */
at 0x7d hreg ARTICR2  ;	/* ART Input Capture Reg.2   */

