/*******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name : st7LITE49M_reg.h
Group            : IPSW,CMG - IPDF
Author           : MCD Application Team
Date First Issued: 20/04/2007
********************************Documentation***********************************
General Purpose - This file contains all the hardware c files for peripherals of
 st7LITE49M.

********************************Revision History********************************
_______________________________________________________________________________
Date :20/04/2007           1st Release
____________________________________________________________________________  */

#ifndef ST7LITE49M_REG_H
#define ST7LITE49M_REG_H

#include "ST7lib_config.h"

#ifdef _HIWARE_

/* IO Ports Hardware Registers */

/* Port A 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;          /* PORT A option register */

/* Port B Registers */
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;          /* PORT B option register */

/* Port C Registers */
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;          /* PORT C option register */

/* LITE TIMER 2 HARDWARE REGISTERS */
EXTERN volatile	unsigned char LTCSR2 @0x0C;    /*Control and stats register2*/ 
EXTERN volatile unsigned char LTARR @0x0D;           /* Auto-Reload Register */
EXTERN volatile unsigned char LTCNTR @0x0E;              /* Counter Register */
EXTERN volatile unsigned char LTCSR1 @0x0F;    /*Control and stats register 1*/
EXTERN volatile	unsigned char LTICR @0x10;        /* Input capture register */
        
/* LART HARDWARE REGISTERS */
EXTERN volatile	unsigned char ATCSR @0x11;     /* Control/Status Register   */
EXTERN volatile	unsigned int CNTR   @0x12;     /* Counter Register 1        */
EXTERN volatile	unsigned char CNTR1H @0x12;     /* Counter Register 1 High  */
EXTERN volatile	unsigned char CNTR1L @0x13;     /* Counter Register 1 Low   */
EXTERN volatile	unsigned int ATR1    @0x14;     /* Autoreload Register 1    */
EXTERN volatile	unsigned char ATR1H @0x14;     /* Autoreload Register 1 High*/
EXTERN volatile	unsigned char ATR1L @0x15;      /* Autoreload Register1 Low */
EXTERN volatile	unsigned char PWMCR @0x16;     /* PWM Output control Reg    */
EXTERN volatile	unsigned char PWM0CSR @0x17;    /*PWM0 Output control/Status*/ 
EXTERN volatile	unsigned char PWM1CSR @0x18;    /*PWM1 Output control/Status*/
EXTERN volatile	unsigned char PWM2CSR @0x19;    /*PWM2 Output control/Status*/
EXTERN volatile	unsigned char PWM3CSR @0x1A;    /*PWM3 Output control/Status*/
EXTERN volatile	unsigned int DCR0   @0x1B;     /*PWM0 Duty Cycle Register   */
EXTERN volatile	unsigned char DCR0H @0x1B;     /*PWM0 Duty Cycle HRegister  */
EXTERN volatile	unsigned char DCR0L @0x1C;     /* PWM Duty Cycle LRegister  */
EXTERN volatile	unsigned int DCR1   @0x1D;     /*PWM1 Duty Cycle Register   */    
EXTERN volatile	unsigned char DCR1H @0x1D;    /*PWM 1 Duty Cycle HRegister  */
EXTERN volatile	unsigned char DCR1L @0x1E;    /*PWM 1 Duty Cycle LRegister  */
EXTERN volatile	unsigned int DCR2   @0x1F;     /*PWM2 Duty Cycle Register   */
EXTERN volatile	unsigned char DCR2H @0x1F;    /*PWM 2 Duty Cycle HRegister  */ 
EXTERN volatile	unsigned char DCR2L @0x20;    /*PWM 2 Duty Cycle LRegister  */
EXTERN volatile	unsigned int DCR3   @0x21;     /*PWM3 Duty Cycle Register   */
EXTERN volatile	unsigned char DCR3H @0x21;    /*PWM 3 Duty Cycle HRegister  */ 
EXTERN volatile	unsigned char DCR3L @0x22;    /*PWM 3 Duty Cycle LRegister  */ 
EXTERN volatile	unsigned int ATICR @0x23;      /*Input Capture Register     */
EXTERN volatile	unsigned char ATICRH @0x23;    /*Input Capture Register High*/
EXTERN volatile	unsigned char ATICRL @0x24;     /*Input Capture Register Low*/
EXTERN volatile	unsigned char ATCSR2 @0x25;    /* Timer Control Register 2  */
EXTERN volatile	unsigned char BREAKCR @0x26;      /* Break Control Register */
EXTERN volatile	unsigned int ATR2   @0x27;     /*Autoreload Register        */
EXTERN volatile  unsigned char ATR2H @0x27;    /* Auto-Reload Register 2 High*/
EXTERN volatile  unsigned char ATR2L @0x28;    /* Auto-Reload Register 2 Low */
EXTERN volatile  unsigned char DTGR @0x29;     /*Dead Time Generator Register*/
EXTERN volatile  unsigned char BREAKEN @0x2A;     /*Break Enable Register*/

/* Interrupt Software Priority */
EXTERN volatile unsigned char ITSPR0 @0x2D;      /* Interrupt Software Priority Register 0*/
EXTERN volatile unsigned char ITSPR1 @0x2E;      /* Interrupt Software Priority Register 1*/
EXTERN volatile unsigned char ITSPR2 @0x2F;      /* Interrupt Software Priority Register 2*/
EXTERN volatile unsigned char ITSPR3 @0x30;      /* Interrupt Software Priority Register 3*/
EXTERN volatile unsigned char EICR @0x31;      /* External Interrupt Control Register */

          
/* Watchdog Hardware registers */
EXTERN volatile unsigned char WDGCR @0x33;      /* Watchdog Control Register */

/* FLASH Hardware Register */
EXTERN volatile unsigned char FCSR @0x34;    /* Flash Control/Status Register*/
    
/* EEPROM Hardware Registers */  
EXTERN volatile unsigned char EECSR @0x35;    /*EEPROM Control/Stats Register*/
    
/* ADC HARDWARE REGISTERS */
EXTERN volatile unsigned char ADCCSR @0x36;    /*ADC control & stats register*/
EXTERN volatile unsigned char ADCDRH @0x37;     /* Data Register High        */
EXTERN volatile unsigned char ADCDRL @0x38;     /* Data Register Low         */
    
/* MCC HARDWARE REGISTERS */
EXTERN volatile unsigned char MCCSR @0x3A;    /* MCC Control/Status Register */
    
/* CLK HARDWARE REGISTERS */
EXTERN volatile unsigned char RCCR @0x3B;    /*RC Oscillator Control Register*/
EXTERN volatile unsigned char SICSR @0x3C;   /*System Integrity Control/Status register*/

/* AVD */
EXTERN volatile unsigned char AVDTHCR @0x3D;    /*AVD Threshold Selection Register / RC prescaler*/
           
/* AWU HARDWARE REGISTERS */    
EXTERN volatile unsigned char AWUCSR @0x48;    /*AWU Control/Status Register */
EXTERN volatile unsigned char AWUPR @0x49;          /* AWU Prscaler Register */

/* DM HARDWARE REGISTERS */
EXTERN volatile unsigned char DMCR @0x4A;             /* DM Control Register */
EXTERN volatile unsigned char DMSR @0x4B;              /* DM Status Register */
EXTERN volatile unsigned char DMBK1H @0x4C;    /*DM Breakpoint register1 High*/
EXTERN volatile unsigned char DMBK1L @0x4D;     /*DM Breakpoint register1 Low*/
EXTERN volatile unsigned char DMBK2H @0x4E;    /*DM Breakpoint register2 High*/          
EXTERN volatile unsigned char DMBK2L @0x4F;    /*DM Breakpoint register 2 Low*/
EXTERN volatile unsigned char DMCR2 @0x50;             /* DM Control Register 2 */

/* Clock Controller */
EXTERN volatile unsigned char CKCNTCSR @0x51;        /* Clock Controller Status Register */

/* I2C */
EXTERN volatile unsigned char I2CCR   @0x64;             /* I2C Control Register*/
EXTERN volatile unsigned char I2CSR1  @0x65;             /* I2C Status Register 1*/
EXTERN volatile unsigned char I2CSR2  @0x66;             /* I2C Status Register 2*/
EXTERN volatile unsigned char I2CCCR  @0x67;             /* I2C Clock Control Register*/
EXTERN volatile unsigned char I2COAR1 @0x68;             /* I2C Own Address Register 1*/
EXTERN volatile unsigned char I2COAR2 @0x69;             /* I2C Own Address Register 2*/
EXTERN volatile unsigned char I2CDR   @0x6A;             /* I2C Data Register*/
        

#endif /* _HIWARE_ */

/******************************************************************************/
/******************************************************************************/

#ifdef _COSMIC_

/* IO Ports Hardware Registers */

/* Port A Registers */
@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;          /* PORT A option register */

/* Port B Registers */
@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;          /* PORT B option register */

/* Port C Registers */
@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;          /* PORT C option register */

/* LITE TIMER 2 HARDWARE REGISTERS */
@tiny volatile	unsigned char LTCSR2 @0x0C;    /*Control and stats register2*/ 
@tiny volatile unsigned char LTARR @0x0D;           /* Auto-Reload Register */
@tiny volatile unsigned char LTCNTR @0x0E;              /* Counter Register */
@tiny volatile unsigned char LTCSR1 @0x0F;    /*Control and stats register 1*/
@tiny volatile	unsigned char LTICR @0x10;        /* Input capture register */
        
/* LART HARDWARE REGISTERS */
@tiny volatile	unsigned char ATCSR @0x11;     /* Control/Status Register   */
@tiny volatile	unsigned int CNTR   @0x12;     /* Counter Register 1        */
@tiny volatile	unsigned char CNTR1H @0x12;     /* Counter Register 1 High  */
@tiny volatile	unsigned char CNTR1L @0x13;     /* Counter Register 1 Low   */
@tiny volatile	unsigned int ATR1    @0x14;     /* Autoreload Register 1    */
@tiny volatile	unsigned char ATR1H @0x14;     /* Autoreload Register 1 High*/
@tiny volatile	unsigned char ATR1L @0x15;      /* Autoreload Register1 Low */
@tiny volatile	unsigned char PWMCR @0x16;     /* PWM Output control Reg    */
@tiny volatile	unsigned char PWM0CSR @0x17;    /*PWM0 Output control/Status*/ 
@tiny volatile	unsigned char PWM1CSR @0x18;    /*PWM1 Output control/Status*/
@tiny volatile	unsigned char PWM2CSR @0x19;    /*PWM2 Output control/Status*/
@tiny volatile	unsigned char PWM3CSR @0x1A;    /*PWM3 Output control/Status*/
@tiny volatile	unsigned int DCR0   @0x1B;     /*PWM0 Duty Cycle Register   */
@tiny volatile	unsigned char DCR0H @0x1B;     /*PWM0 Duty Cycle HRegister  */
@tiny volatile	unsigned char DCR0L @0x1C;     /* PWM Duty Cycle LRegister  */
@tiny volatile	unsigned int DCR1   @0x1D;     /*PWM1 Duty Cycle Register   */    
@tiny volatile	unsigned char DCR1H @0x1D;    /*PWM 1 Duty Cycle HRegister  */
@tiny volatile	unsigned char DCR1L @0x1E;    /*PWM 1 Duty Cycle LRegister  */
@tiny volatile	unsigned int DCR2   @0x1F;     /*PWM2 Duty Cycle Register   */
@tiny volatile	unsigned char DCR2H @0x1F;    /*PWM 2 Duty Cycle HRegister  */ 
@tiny volatile	unsigned char DCR2L @0x20;    /*PWM 2 Duty Cycle LRegister  */
@tiny volatile	unsigned int DCR3   @0x21;     /*PWM3 Duty Cycle Register   */
@tiny volatile	unsigned char DCR3H @0x21;    /*PWM 3 Duty Cycle HRegister  */ 
@tiny volatile	unsigned char DCR3L @0x22;    /*PWM 3 Duty Cycle LRegister  */ 
@tiny volatile	unsigned int ATICR @0x23;      /*Input Capture Register     */
@tiny volatile	unsigned char ATICRH @0x23;    /*Input Capture Register High*/
@tiny volatile	unsigned char ATICRL @0x24;     /*Input Capture Register Low*/
@tiny volatile	unsigned char ATCSR2 @0x25;    /* Timer Control Register 2  */
@tiny volatile	unsigned char BREAKCR @0x26;      /* Break Control Register */
@tiny volatile	unsigned int ATR2   @0x27;     /*Autoreload Register        */
@tiny volatile  unsigned char ATR2H @0x27;    /* Auto-Reload Register 2 High*/
@tiny volatile  unsigned char ATR2L @0x28;    /* Auto-Reload Register 2 Low */
@tiny volatile  unsigned char DTGR @0x29;     /*Dead Time Generator Register*/
@tiny volatile  unsigned char BREAKEN @0x2A;     /*Break Enable Register*/

/* Interrupt Software Priority */
@tiny volatile unsigned char ITSPR0 @0x2D;      /* Interrupt Software Priority Register 0*/
@tiny volatile unsigned char ITSPR1 @0x2E;      /* Interrupt Software Priority Register 1*/
@tiny volatile unsigned char ITSPR2 @0x2F;      /* Interrupt Software Priority Register 2*/
@tiny volatile unsigned char ITSPR3 @0x30;      /* Interrupt Software Priority Register 3*/
@tiny volatile unsigned char EICR @0x31;      /* External Interrupt Control Register */

          
/* Watchdog Hardware registers */
@tiny volatile unsigned char WDGCR @0x33;      /* Watchdog Control Register */

/* FLASH Hardware Register */
@tiny volatile unsigned char FCSR @0x34;    /* Flash Control/Status Register*/
    
/* EEPROM Hardware Registers */  
@tiny volatile unsigned char EECSR @0x35;    /*EEPROM Control/Stats Register*/
    
/* ADC HARDWARE REGISTERS */
@tiny volatile unsigned char ADCCSR @0x36;    /*ADC control & stats register*/
@tiny volatile unsigned char ADCDRH @0x37;     /* Data Register High        */
@tiny volatile unsigned char ADCDRL @0x38;     /* Data Register Low         */
    
/* MCC HARDWARE REGISTERS */
@tiny volatile unsigned char MCCSR @0x3A;    /* MCC Control/Status Register */
    
/* CLK HARDWARE REGISTERS */
@tiny volatile unsigned char RCCR @0x3B;    /*RC Oscillator Control Register*/
@tiny volatile unsigned char SICSR @0x3C;   /*System Integrity Control/Status register*/

/* AVD */
@tiny volatile unsigned char AVDTHCR @0x3D;    /*AVD Threshold Selection Register / RC prescaler*/
           
/* AWU HARDWARE REGISTERS */    
@tiny volatile unsigned char AWUCSR @0x48;    /*AWU Control/Status Register */
@tiny volatile unsigned char AWUPR @0x49;          /* AWU Prscaler Register */

/* DM HARDWARE REGISTERS */
@tiny volatile unsigned char DMCR @0x4A;             /* DM Control Register */
@tiny volatile unsigned char DMSR @0x4B;              /* DM Status Register */
@tiny volatile unsigned char DMBK1H @0x4C;    /*DM Breakpoint register1 High*/
@tiny volatile unsigned char DMBK1L @0x4D;     /*DM Breakpoint register1 Low*/
@tiny volatile unsigned char DMBK2H @0x4E;    /*DM Breakpoint register2 High*/          
@tiny volatile unsigned char DMBK2L @0x4F;    /*DM Breakpoint register 2 Low*/
@tiny volatile unsigned char DMCR2 @0x50;             /* DM Control Register 2 */

/* Clock Controller */
@tiny volatile unsigned char CKCNTCSR @0x51;        /* Clock Controller Status Register */

/* I2C */
@tiny volatile unsigned char I2CCR   @0x64;             /* I2C Control Register*/
@tiny volatile unsigned char I2CSR1  @0x65;             /* I2C Status Register 1*/
@tiny volatile unsigned char I2CSR2  @0x66;             /* I2C Status Register 2*/
@tiny volatile unsigned char I2CCCR  @0x67;             /* I2C Clock Control Register*/
@tiny volatile unsigned char I2COAR1 @0x68;             /* I2C Own Address Register 1*/
@tiny volatile unsigned char I2COAR2 @0x69;             /* I2C Own Address Register 2*/
@tiny volatile unsigned char I2CDR   @0x6A;             /* I2C Data Register*/

    
#endif /* _COSMIC_ */    

#ifdef _RAISONANCE_

/* IO Ports Hardware Registers */
/* Port A Registers */
at 0x00 hreg PADR ;             /* PORT A data register */ 
at 0x01 hreg PADDR ;           /*Data direction register*/
at 0x02 hreg PAOR ;           /* PORT A option register */
/* Port B Registers */
at 0x03 hreg PBDR ;             /* PORT B data register */          
at 0x04 hreg PBDDR ;          /*Data direction register */
at 0x05 hreg PBOR ;           /* PORT B option register */
/* Port C Registers */
at 0x06 hreg PCDR ;             /* PORT C data register */          
at 0x07 hreg PCDDR ;          /*Data direction register */
at 0x08 hreg PCOR ;           /* PORT C option register */

/* LITE TIMER 2 HARDWARE REGISTERS */
at 0x0C hreg LTCSR2 ;      /*Control and stats register2*/ 
at 0x0D hreg LTARR ;            /* Auto-Reload Register */
at 0x0E hreg LTCNTR ;               /* Counter Register */
at 0x0F hreg LTCSR1 ;     /*Control and stats register 1*/
at 0x10 hreg LTICR ;          /* Input capture register */
    
    
/* LART HARDWARE REGISTERS */
at 0x11 hreg ATCSR ;       /* Control/Status Register   */
at 0x12 hreg16 CNTR   ;       /* Counter Register 1        */
at 0x12 hreg CNTR1H ;       /* Counter Register 1 High  */
at 0x13 hreg CNTR1L ;       /* Counter Register 1 Low   */
at 0x14 hreg16 ATR1    ;       /* Autoreload Register 1    */
at 0x14 hreg ATR1H ;       /* Autoreload Register 1 High*/
at 0x15 hreg ATR1L ;        /* Autoreload Register1 Low */
at 0x16 hreg PWMCR ;       /* PWM Output control Reg    */
at 0x17 hreg PWM0CSR ;      /*PWM0 Output control/Status*/ 
at 0x18 hreg PWM1CSR ;      /*PWM1 Output control/Status*/
at 0x19 hreg PWM2CSR ;      /*PWM2 Output control/Status*/
at 0x1A hreg PWM3CSR ;      /*PWM3 Output control/Status*/
at 0x1B hreg16 DCR0   ;       /*PWM0 Duty Cycle Register   */
at 0x1B hreg DCR0H ;       /*PWM0 Duty Cycle HRegister  */
at 0x1C hreg DCR0L ;       /* PWM Duty Cycle LRegister  */
at 0x1D hreg16 DCR1   ;       /*PWM1 Duty Cycle Register   */    
at 0x1D hreg DCR1H ;      /*PWM 1 Duty Cycle HRegister  */
at 0x1E hreg DCR1L ;      /*PWM 1 Duty Cycle LRegister  */
at 0x1F hreg16 DCR2   ;       /*PWM2 Duty Cycle Register   */
at 0x1F hreg DCR2H ;      /*PWM 2 Duty Cycle HRegister  */ 
at 0x20 hreg DCR2L ;      /*PWM 2 Duty Cycle LRegister  */
at 0x21 hreg16 DCR3   ;       /*PWM3 Duty Cycle Register   */
at 0x21 hreg DCR3H ;      /*PWM 3 Duty Cycle HRegister  */ 
at 0x22 hreg DCR3L ;      /*PWM 3 Duty Cycle LRegister  */ 
at 0x23 hreg16 ATICR ;        /*Input Capture Register     */
at 0x23 hreg ATICRH ;      /*Input Capture Register High*/
at 0x24 hreg ATICRL ;       /*Input Capture Register Low*/
at 0x25 hreg ATCSR2 ;      /* Timer Control Register 2  */
at 0x26 hreg BREAKCR ;        /* Break Control Register */
at 0x27 hreg16 ATR2   ;       /*Autoreload Register        */
at 0x27 hreg ATR2H ;      /* Auto-Reload Register 2 High*/
at 0x28 hreg ATR2L ;      /* Auto-Reload Register 2 Low */
at 0x29 hreg DTGR ;       /*Dead Time Generator Register*/
at 0x2A hreg BREAKEN;     /*Break Enable Register*/

/* Interrupt Software Priority */
at 0x2D hreg ITSPR0;      /* Interrupt Software Priority Register 0*/
at 0x2E hreg ITSPR1;      /* Interrupt Software Priority Register 1*/
at 0x2F hreg ITSPR2;      /* Interrupt Software Priority Register 2*/
at 0x30 hreg ITSPR3;      /* Interrupt Software Priority Register 3*/
at 0x31 hreg EICR;      /* External Interrupt Control Register */
        
/* Watchdog Hardware registers */
at 0x33 hreg WDGCR ;       /* Watchdog Control Register */

/* FLASH Hardware Register */
at 0x34 hreg FCSR ;     /* Flash Control/Status Register*/
    
/* EEPROM Hardware Registers */  
at 0x35 hreg EECSR ;     /*EEPROM Control/Stats Register*/

/* ADC HARDWARE REGISTERS */
at 0x36 hreg ADCCSR ;    /*ADC control & stats register*/
at 0x37 hreg ADCDRH ;     /* Data Register High        */
at 0x38 hreg ADCDRL ;     /* Data Register Low         */

/* MCC HARDWARE REGISTERS */
at 0x3A hreg MCCSR ;     /* MCC Control/Status Register */
    
/* CLK HARDWARE REGISTERS */
at 0x3B hreg RCCR ;     /*RC Oscillator Control Register*/
at 0x3C hreg SICSR ;   /*System Integrity Control/Status register*/    

/* AVD */
at 0x3D hreg AVDTHCR;    /*AVD Threshold Selection Register / RC prescaler*/
           
/* AWU HARDWARE REGISTERS */    
at 0x48 hreg AWUCSR ;     /*AWU Control/Status Register */
at 0x49 hreg AWUPR ;           /* AWU Prscaler Register */

/* DM HARDWARE REGISTERS */
at 0x4A hreg DMCR ;              /* DM Control Register */
at 0x4B hreg DMSR ;               /* DM Status Register */
at 0x4C hreg DMBK1H ;     /*DM Breakpoint register1 High*/
at 0x4D hreg DMBK1L ;      /*DM Breakpoint register1 Low*/
at 0x4E hreg DMBK2H ;     /*DM Breakpoint register2 High*/          
at 0x4F hreg DMBK2L ;     /*DM Breakpoint register 2 Low*/
at 0x50 hreg DMCR2 ;              /* DM Control Register 2 */
        
/* Clock Controller */
at 0x51 hreg CKCNTCSR;        /* Clock Controller Status Register */

/* I2C */
at 0x64 hreg I2CCR;             /* I2C Control Register*/
at 0x65 hreg I2CSR1;             /* I2C Status Register 1*/
at 0x66 hreg I2CSR2;             /* I2C Status Register 2*/
at 0x67 hreg I2CCCR;             /* I2C Clock Control Register*/
at 0x68 hreg I2COAR1;             /* I2C Own Address Register 1*/
at 0x69 hreg I2COAR2;             /* I2C Own Address Register 2*/
at 0x6A hreg I2CDR;             /* I2C Data Register*/


#endif /* _RAISONANCE_ */

#endif /* ST7LITE49M */
       
            
    

 

