/*
*******************************************************************************
COPYRIGHT 2002 STMicroelectronics
Source File Name : pwmart_hr.h
Group            : IPSW,CMG-IPDF.
Author           : MCD Application Team
Date First Issued: 5/03/2002   
********************************Documentation**********************************
General Purpose - Bit definitions of registers
********************************RevisionHistory********************************
_______________________________________________________________________________
Date: 5/03/2002    Release : 1.0   
Date: 23/09/2003   Release : 2.0
                   1. Removed register declarations\definitions to device_reg.h 
                   2. Added Bit definitions to improve readabelity and 
                      portabelity
      01/06/2004   Release : 2.1
                   1.Changed for MISRA compliance                    	
*******************************************************************************/   
#ifndef PWMART_HR_H
#define PWMART_HR_H    

/* ARTCSR register                                                            */
                                                    /* prescalar bits setting */
#define PRES_MASK            0x8F                      /* prescalar bits mask */
#define PRES_DIV2            0x10                     /* fCOUNTER = fINPUT /2 */
#define PRES_DIV4            0x20                     /* fCOUNTER = fINPUT /4 */
#define PRES_DIV8            0x30                     /* fCOUNTER = fINPUT /8 */
#define PRES_DIV16           0x40                    /* fCOUNTER = fINPUT /16 */
#define PRES_DIV32           0x50                    /* fCOUNTER = fINPUT /32 */
#define PRES_DIV64           0x60                    /* fCOUNTER = fINPUT /64 */
#define PRES_DIV128          0x70                   /* fCOUNTER = fINPUT /128 */  

#define COUNTER_ENABLE       0x08                     /* Timer counter enable */

#define FORCE_RELOAD         0x04                     /* Force reload counter */ 

#define OVERFLOW_INTERRUPT   0x02            /* Enable overflow interrupt bit */ 

#define OVF_FLAG             0x01                            /* Overflow flag */

/* PWMCR register                                                             */
#define ENABLE_OE0           0x10                     /* Enable PWM channel 0 */
#define ENABLE_OE1           0x20                     /* Enable PWM channel 1 */
#define ENABLE_OE2           0x40                     /* Enable PWM channel 2 */
#define ENABLE_OE3           0x80                     /* Enable PWM channel 3 */  

#define POLARITY_PWM0        0x01                /* Polarity of PWM channel 0 */
#define POLARITY_PWM1        0x02                /* Polarity of PWM channel 1 */
#define POLARITY_PWM2        0x04                /* Polarity of PWM channel 2 */
#define POLARITY_PWM3        0x08                /* Polarity of PWM channel 3 */ 

/* ARTICCSR register                                                          */
#define SENS_ICAP1           0x10              /* Input capture 1 sensitivity */
#define SENS_ICAP2           0x20              /* Input capture 2 sensitivity */ 

#define ICAP1_FLAG           0x01         /* Input capture flag for channel 1 */
#define ICAP2_FLAG           0x02         /* Input capture flag for channel 2 */ 

#define ICAP1_INTERRUPT      0x04         /* Input capture 1 interrupt enable */
#define ICAP2_INTERRUPT      0x08         /* Input capture 2 interrupt enable */ 

#endif /* PWMART_HR_H */

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