#ifndef MILLET_PWM_H
#define MILLET_PWM_H

extern void timer1_init();
extern void do_timer1(void);
extern void stop_timer1(void);

#define PWM_BASE 0x139D0000

#define CFG0  (*(volatile unsigned int *)(PWM_BASE + 0x0000)) 
#define CFG1  (*(volatile unsigned int *)(PWM_BASE + 0x0004)) 
#define CON   (*(volatile unsigned int *)(PWM_BASE + 0x0008)) 
#define CNTB0 (*(volatile unsigned int *)(PWM_BASE + 0x000C))
#define CMPB0 (*(volatile unsigned int *)(PWM_BASE + 0x0010))
#define CNTO0 (*(volatile unsigned int *)(PWM_BASE + 0x0014))
#define CNTB1 (*(volatile unsigned int *)(PWM_BASE + 0x0018))
#define CMPB1 (*(volatile unsigned int *)(PWM_BASE + 0x001C))
#define CNTO1 (*(volatile unsigned int *)(PWM_BASE + 0x0020))
#define CNTB2 (*(volatile unsigned int *)(PWM_BASE + 0x0024))
#define CMPB2 (*(volatile unsigned int *)(PWM_BASE + 0x0028))
#define CNTO2 (*(volatile unsigned int *)(PWM_BASE + 0x002C))
#define CNTB3 (*(volatile unsigned int *)(PWM_BASE + 0x0030))
#define CMPB3 (*(volatile unsigned int *)(PWM_BASE + 0x0034))
#define CNTO3 (*(volatile unsigned int *)(PWM_BASE + 0x0038))
#define CNTB4 (*(volatile unsigned int *)(PWM_BASE + 0x003C))
#define CNTO4 (*(volatile unsigned int *)(PWM_BASE + 0x0040))
#define INT_CSTAT (*(volatile unsigned int *)(PWM_BASE + 0x0044))


#endif
