/*******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name : st7DALI_reg.h
Group            : IPSW,CMG - IPDF
Author           : MCD Application Team
Date First Issued: 23/09/2003
********************************Documentation***********************************
General Purpose - This file contains all the hardware registers for peripherals 
of st7DALI.

********************************Revision History********************************
_______________________________________________________________________________
Date :23/09/2003           Release:2.0 
      14/05/2004           Release:2.1
                           1.Declare all 16 bit register as extern and moved declaration
                             to st7dali_reg.c
                           2.Removed #pragma segment information from Metrowerks section
Date :2/06/2004            Address information added for metrowerks registers
____________________________________________________________________________  */
#ifndef ST7DALI_REG_H
#define ST7DALI_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;/* PORT A 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;/* PORT B data direction register */
extern volatile unsigned char PBOR    @0x05;        /* PORT B option register */

/* LITE TIMER 2 HARDWARE REGISTERS */
extern volatile unsigned char LTCSR2  @0x08;   /* Control and stats register 2*/
extern volatile unsigned char LTARR   @0x09;          /* Auto-Reload Register */
extern volatile unsigned char LTCNTR  @0x0A;              /* Counter Register */
extern volatile unsigned char LTCSR1  @0x0B;   /* Control and stats register 1*/
extern volatile unsigned char LTICR   @0x0C;        /* Input capture register */
    
/* LART HARDWARE REGISTERS */
extern volatile unsigned char ATCSR   @0x0D;      /* Control/Status Register  */
extern volatile unsigned char CNTRH   @0x0E;        /* Counter Register High  */
extern volatile unsigned char CNTRL   @0x0F;          /* Counter Register Low */
extern volatile unsigned char ATRH    @0x10;     /* Autoreload Register   High*/
extern volatile unsigned char ATRL    @0x11;      /* Autoreload Register  Low */
extern volatile unsigned char PWMCR   @0x12;     /* PWM Output control Reg    */
extern volatile unsigned char PWM0CSR @0x13;   /* PWM 0 Output control/Status */ 
extern volatile unsigned char PWM1CSR @0x14;   /* PWM 1 Output control/Status */
extern volatile unsigned char PWM2CSR @0x15;   /* PWM 2 Output control/Status */
extern volatile unsigned char PWM3CSR @0x16;   /* PWM 3 Output control/Status */
extern volatile unsigned char DCR0H   @0x17;   /* PWM 0 Duty Cycle HRegister  */
extern volatile unsigned char DCR0L   @0x18;     /* PWM Duty Cycle LRegister  */
extern volatile unsigned char DCR1H   @0x19;   /* PWM 1 Duty Cycle HRegister  */
extern volatile unsigned char DCR1L   @0x1A;   /* PWM 1 Duty Cycle LRegister  */
extern volatile unsigned char DCR2H   @0x1B;   /* PWM 2 Duty Cycle HRegister  */ 
extern volatile unsigned char DCR2L   @0x1C;   /* PWM 2 Duty Cycle LRegister  */
extern volatile unsigned char DCR3H   @0x1D;   /* PWM 3 Duty Cycle HRegister  */ 
extern volatile unsigned char DCR3L   @0x1E;   /* PWM 3 Duty Cycle LRegister  */ 
extern volatile unsigned char ATICRH  @0x1F;    /* Input Capture Register High*/
extern volatile unsigned char ATICRL  @0x20;     /* Input Capture Register Low*/
extern volatile unsigned char TRANCR  @0x21;      /*Transfer Control Register */
extern volatile unsigned char BREAKCR @0x22;        /* Break Control Register */   
      
/* LART 12 bit registers*/
extern volatile unsigned int CNTR     @0x0E;             /* Counter Register  */
extern volatile unsigned int ATR      @0x10;          /* Auto-Reload Register */
extern volatile unsigned int DCR0     @0x17;    /* PWM 0 Duty Cycle Register  */
extern volatile unsigned int DCR1     @0x19;    /* PWM 1 Duty Cycle Register  */
extern volatile unsigned int DCR2     @0x1B;     /* PWM 2 Duty Cycle Register */ 
extern volatile unsigned int DCR3     @0x1D;     /* PWM 3 Duty Cycle Register */
extern volatile unsigned int ATICR    @0x1F;        /*Input Capture Register  */
     
    
/* Watchdog Hardware registers */
extern volatile unsigned char WDGCR   @0x2E;     /* Watchdog Control Register */

/* FLASH Hardware Registers */
extern volatile unsigned char FCSR    @0x2F;  /* Flash Control/Status Register*/
    
/* EEPROM Hardware Registers */  
extern volatile unsigned char EECSR   @0x30;   
                                        /* Data EEPROM Control/Status Register*/

/* SPI HARDWARE REGISTERS */
extern volatile unsigned char SPIDR   @0x31;            /* SPI Data register  */
extern volatile unsigned char SPICR   @0x32;         /* SPI Control register  */
extern volatile unsigned char SPICSR  @0x33;          /* SPI Status register  */
     
/* ADC HARDWARE REGISTERS */
extern volatile unsigned char ADCCSR  @0x34; /* ADC control & status register */
extern volatile unsigned char ADCDRH  @0x35;        /* ADC Data high register */
extern volatile unsigned char ADCDRL  @0x36;/* ADC Data low/Amplifier register*/
    
/* ITC HARDWARE RREGISTERS */
extern volatile unsigned char EICR    @0x37;    /*External Interrupt Register */ 

/* MCC HARDWARE REGISTERS */
extern volatile unsigned char MCCSR   @0x38;    /* MCC Control/Status Register*/
    
/* CLK HARDWARE REGISTERS */
extern volatile unsigned char RCCR    @0x39; /* RC Oscillator Control Register*/
extern volatile unsigned char SICSR   @0x3A;  
                                       /* System Integrity Control/Status reg */
    
/* ITC HARDWARE REGISTERS */
extern volatile unsigned char EISR    @0x3C;  
                                       /*External Interrupt Selection Register*/
        
/* DALI Hardware Registers */
extern volatile unsigned char DCMCLK  @0x40;                /* Clock Register */
extern volatile unsigned char DCMFA   @0x41;      /* Forward Address Register */
extern volatile unsigned char DCMFD   @0x42;        /* Foraward Data Register */
extern volatile unsigned char DCMBD   @0x43;        /* Backward Data Register */
extern volatile unsigned char DCMCR   @0x44;              /* Control Register */
extern volatile unsigned char DCMCSR  @0x45;       /* Control/Status Register */
      
/* AWU HARDWARE REGISTERS */
extern volatile unsigned char AWUPR   @0x49;         /* AWU Prscaler Register */
extern volatile unsigned char AWUCSR  @0x4A;   /* AWU Control/Status Register */

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


#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 */

/* LITE TIMER 2 HARDWARE REGISTERS */
@tiny volatile	unsigned char LTCSR2 @0x08;    /*Control and stats register2*/
@tiny volatile unsigned char LTARR @0x09;           /* Auto-Reload Register */
@tiny volatile unsigned char LTCNTR @0x0A;              /* Counter Register */
@tiny volatile unsigned char LTCSR1 @0x0B;    /*Control and stats register 1*/
@tiny volatile	unsigned char LTICR @0x0C;        /* Input capture register */
    
    
/* LART HARDWARE REGISTERS */
@tiny volatile	unsigned char ATCSR @0x0D;     /* Control/Status Register   */
@tiny volatile	unsigned int  CNTR @0x0E;     /* Counter Register           */
@tiny volatile	unsigned char CNTRH @0x0E;     /* Counter Register High     */
@tiny volatile	unsigned char CNTRL @0x0F;     /* Counter Register   Low    */
@tiny volatile	unsigned int  ATR  @0x10;      /* Autoreload Register       */
@tiny volatile	unsigned char ATRH @0x10;      /* Autoreload Register   High*/
@tiny volatile	unsigned char ATRL @0x11;       /* Autoreload Register  Low */
@tiny volatile	unsigned char PWMCR @0x12;     /* PWM Output control Reg    */
@tiny volatile	unsigned char PWM0CSR @0x13;    /*PWM0 Output control/Status*/ 
@tiny volatile	unsigned char PWM1CSR @0x14;    /*PWM1 Output control/Status*/
@tiny volatile	unsigned char PWM2CSR @0x15;    /*PWM2 Output control/Status*/
@tiny volatile	unsigned char PWM3CSR @0x16;    /*PWM3 Output control/Status*/
@tiny volatile	unsigned int  DCR0  @0x17;     /*PWM0 Duty Cycle  Register  */
@tiny volatile	unsigned char DCR0H @0x17;     /*PWM0 Duty Cycle HRegister  */
@tiny volatile	unsigned char DCR0L @0x18;     /* PWM Duty Cycle LRegister  */
@tiny volatile	unsigned int  DCR1  @0x19;    /*PWM 1 Duty Cycle  Register  */
@tiny volatile	unsigned char DCR1H @0x19;    /*PWM 1 Duty Cycle HRegister  */
@tiny volatile	unsigned char DCR1L @0x1A;    /*PWM 1 Duty Cycle LRegister  */
@tiny volatile	unsigned int  DCR2  @0x1B;    /*PWM 2 Duty Cycle  Register  */
@tiny volatile	unsigned char DCR2H @0x1B;    /*PWM 2 Duty Cycle HRegister  */ 
@tiny volatile	unsigned char DCR2L @0x1C;    /*PWM 2 Duty Cycle LRegister  */
@tiny volatile	unsigned int  DCR3  @0x1D;    /*PWM 3 Duty Cycle  Register  */ 
@tiny volatile	unsigned char DCR3H @0x1D;    /*PWM 3 Duty Cycle HRegister  */ 
@tiny volatile	unsigned char DCR3L @0x1E;    /*PWM 3 Duty Cycle LRegister  */ 
@tiny volatile	unsigned int  ATICR @0x1F;    /* Input Capture Register     */
@tiny volatile	unsigned char ATICRH @0x1F;    /*Input Capture Register High*/
@tiny volatile	unsigned char ATICRL @0x20;     /*Input Capture Register Low*/
@tiny volatile	unsigned char TRANCR @0x21;    /* Transfer Control Register */
@tiny volatile	unsigned char BREAKCR @0x22;      /* Break Control Register */
         
/* Watchdog Hardware registers */
@tiny volatile unsigned char WDGCR @0x2E;      /* Watchdog Control Register */

/* FLASH Hardware Register */
@tiny volatile unsigned char FCSR @0x2F;    /* Flash Control/Status Register*/
    
/* EEPROM Hardware Registers */  
@tiny volatile unsigned char EECSR @0x30;    /*EEPROM Control/Stats Register*/

/* SPI HARDWARE REGISTERS */
@tiny volatile unsigned char SPIDR @0x31;             /* SPI Data register  */
@tiny volatile unsigned char SPICR @0x32;          /* SPI Control register  */
@tiny volatile unsigned char SPICSR @0x33;          /* SPI Status register  */
     
/* ADC HARDWARE REGISTERS */
@tiny volatile unsigned char ADCCSR @0x34;    /*ADC control & stats register*/
@tiny volatile unsigned char ADCDRH @0x35;        /* ADC Data high register */
@tiny volatile unsigned char ADCDRL @0x36;/* ADC Data low/Amplifier register*/
    
/* ITC HARDWARE RREGISTERS */
@tiny volatile unsigned char EICR @0x37;      /*External Interrupt Register */ 

/* MCC HARDWARE REGISTERS */
@tiny volatile unsigned char MCCSR @0x38;    /* MCC Control/Status Register */
    
/* CLK HARDWARE REGISTERS */
@tiny volatile unsigned char RCCR  @0x39;   /*RC Oscillator Control Register*/
@tiny volatile unsigned char SICSR @0x3A;
                                    /*System Integrity Control/Status register*/
    
/* ITC HARDWARE REGISTERS */
@tiny volatile unsigned char EISR @0x3C;
                                      /*External Interrupt Selection Register */

/* DALI Hardware Registers */
@tiny volatile unsigned char DCMCLK @0x40;                /* Clock Register */
@tiny volatile unsigned char DCMFA  @0x41;      /* Forward Address Register */
@tiny volatile unsigned char DCMFD  @0x42;        /* Foraward Data Register */
@tiny volatile unsigned char DCMBD  @0x43;        /* Backward Data Register */
@tiny volatile unsigned char DCMCR  @0x44;              /* Control Register */
@tiny volatile unsigned char DCMCSR @0x45;       /* Control/Status Register */
       
/* AWU HARDWARE REGISTERS */    
@tiny volatile unsigned char AWUPR @0x49;          /* AWU Prscaler Register */
@tiny volatile unsigned char AWUCSR @0x4A;    /*AWU Control/Status Register */

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

#ifdef _RAISONANCE_

/* IO Ports Hardware Registers */
/* Port A Registers */    
at 0x00 hreg PADR    ;          /* PORT A data register */
at 0x01 hreg PADDR   ;/* PORT A 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   ;/* PORT B data direction register */
at 0x05 hreg PBOR    ;        /* PORT B option register */

/* LITE TIMER 2 HARDWARE REGISTERS */
at 0x08 hreg LTCSR2  ;   /* Control and stats register 2*/
at 0x09 hreg LTARR   ;          /* Auto-Reload Register */
at 0x0A hreg LTCNTR  ;              /* Counter Register */
at 0x0B hreg LTCSR1  ;   /* Control and stats register 1*/
at 0x0C hreg LTICR   ;        /* Input capture register */
    
/* LART HARDWARE REGISTERS */
at 0x0D hreg ATCSR   ;      /* Control/Status Register  */
at 0x0E hreg CNTRH   ;        /* Counter Register High  */
at 0x0F hreg CNTRL   ;          /* Counter Register Low */
at 0x10 hreg ATRH    ;     /* Autoreload Register   High*/
at 0x11 hreg ATRL    ;      /* Autoreload Register  Low */
at 0x12 hreg PWMCR   ;     /* PWM Output control Reg    */
at 0x13 hreg PWM0CSR ;   /* PWM 0 Output control/Status */ 
at 0x14 hreg PWM1CSR ;   /* PWM 1 Output control/Status */
at 0x15 hreg PWM2CSR ;   /* PWM 2 Output control/Status */
at 0x16 hreg PWM3CSR ;   /* PWM 3 Output control/Status */
at 0x17 hreg DCR0H   ;   /* PWM 0 Duty Cycle HRegister  */
at 0x18 hreg DCR0L   ;     /* PWM Duty Cycle LRegister  */
at 0x19 hreg DCR1H   ;   /* PWM 1 Duty Cycle HRegister  */
at 0x1A hreg DCR1L   ;   /* PWM 1 Duty Cycle LRegister  */
at 0x1B hreg DCR2H   ;   /* PWM 2 Duty Cycle HRegister  */ 
at 0x1C hreg DCR2L   ;   /* PWM 2 Duty Cycle LRegister  */
at 0x1D hreg DCR3H   ;   /* PWM 3 Duty Cycle HRegister  */ 
at 0x1E hreg DCR3L   ;   /* PWM 3 Duty Cycle LRegister  */ 
at 0x1F hreg ATICRH  ;    /* Input Capture Register High*/
at 0x20 hreg ATICRL  ;     /* Input Capture Register Low*/
at 0x21 hreg TRANCR  ;      /*Transfer Control Register */
at 0x22 hreg BREAKCR ;        /* Break Control Register */   
      
/* LART 12 bit registers*/
at 0x0E hreg16 CNTR     ;             /* Counter Register  */
at 0x10 hreg16 ATR      ;          /* Auto-Reload Register */
at 0x17 hreg16 DCR0     ;    /* PWM 0 Duty Cycle Register  */
at 0x19 hreg16 DCR1     ;    /* PWM 1 Duty Cycle Register  */
at 0x1B hreg16 DCR2     ;     /* PWM 2 Duty Cycle Register */ 
at 0x1D hreg16 DCR3     ;     /* PWM 3 Duty Cycle Register */
at 0x1F hreg16 ATICR    ;        /*Input Capture Register  */
     
    
/* Watchdog Hardware registers */
at 0x2E hreg WDGCR   ;     /* Watchdog Control Register */

/* FLASH Hardware Registers */
at 0x2F hreg FCSR    ;  /* Flash Control/Status Register*/
    
/* EEPROM Hardware Registers */  
at 0x30 hreg EECSR   ;   
                                        /* Data EEPROM Control/Status Register*/

/* SPI HARDWARE REGISTERS */
at 0x31 hreg SPIDR   ;            /* SPI Data register  */
at 0x32 hreg SPICR   ;         /* SPI Control register  */
at 0x33 hreg SPICSR  ;          /* SPI Status register  */
     
/* ADC HARDWARE REGISTERS */
at 0x34 hreg ADCCSR  ; /* ADC control & status register */
at 0x35 hreg ADCDRH  ;        /* ADC Data high register */
at 0x36 hreg ADCDRL  ;/* ADC Data low/Amplifier register*/
    
/* ITC HARDWARE RREGISTERS */
at 0x37 hreg EICR    ;    /*External Interrupt Register */ 

/* MCC HARDWARE REGISTERS */
at 0x38 hreg MCCSR   ;    /* MCC Control/Status Register*/
    
/* CLK HARDWARE REGISTERS */
at 0x39 hreg RCCR    ; /* RC Oscillator Control Register*/
at 0x3A hreg SICSR   ;  
                                       /* System Integrity Control/Status reg */
    
/* ITC HARDWARE REGISTERS */
at 0x3C hreg EISR    ;  
                                       /*External Interrupt Selection Register*/
        
/* DALI Hardware Registers */
at 0x40 hreg DCMCLK  ;                /* Clock Register */
at 0x41 hreg DCMFA   ;      /* Forward Address Register */
at 0x42 hreg DCMFD   ;        /* Foraward Data Register */
at 0x43 hreg DCMBD   ;        /* Backward Data Register */
at 0x44 hreg DCMCR   ;              /* Control Register */
at 0x45 hreg DCMCSR  ;       /* Control/Status Register */
      
/* AWU HARDWARE REGISTERS */
at 0x49 hreg AWUPR   ;         /* AWU Prscaler Register */
at 0x4A hreg AWUCSR  ;   /* AWU Control/Status Register */

/* DM HARDWARE REGISTERS */
at 0x4B hreg DMCR    ;           /* DM Control Register */
at 0x4C hreg DMSR    ;            /* DM Status Register */
at 0x4D hreg DMBK1H  ; /* DM Breakpoint register 1 High */
at 0x4E hreg DMBK1L  ;  /* DM Breakpoint register 1 Low */
at 0x4F hreg DMBK2H  ; /* DM Breakpoint register 2 High */          
at 0x50 hreg DMBK2L  ;  /* DM Breakpoint register 2 Low */          


#endif /* _RAISONANCE_ */



#endif /* st7DALI_reg_H*/
       
            
    

 

