2011-02-26 20:08:36 +08:00
/*
* PKUnity Operating System Timer ( OST ) Registers
*/
/*
* Match Reg 0 OST_OSMR0
*/
2011-03-04 18:07:48 +08:00
# define OST_OSMR0 (PKUNITY_OST_BASE + 0x0000)
2011-02-26 20:08:36 +08:00
/*
* Match Reg 1 OST_OSMR1
*/
2011-03-04 18:07:48 +08:00
# define OST_OSMR1 (PKUNITY_OST_BASE + 0x0004)
2011-02-26 20:08:36 +08:00
/*
* Match Reg 2 OST_OSMR2
*/
2011-03-04 18:07:48 +08:00
# define OST_OSMR2 (PKUNITY_OST_BASE + 0x0008)
2011-02-26 20:08:36 +08:00
/*
* Match Reg 3 OST_OSMR3
*/
2011-03-04 18:07:48 +08:00
# define OST_OSMR3 (PKUNITY_OST_BASE + 0x000C)
2011-02-26 20:08:36 +08:00
/*
* Counter Reg OST_OSCR
*/
2011-03-04 18:07:48 +08:00
# define OST_OSCR (PKUNITY_OST_BASE + 0x0010)
2011-02-26 20:08:36 +08:00
/*
* Status Reg OST_OSSR
*/
2011-03-04 18:07:48 +08:00
# define OST_OSSR (PKUNITY_OST_BASE + 0x0014)
2011-02-26 20:08:36 +08:00
/*
* Watchdog Enable Reg OST_OWER
*/
2011-03-04 18:07:48 +08:00
# define OST_OWER (PKUNITY_OST_BASE + 0x0018)
2011-02-26 20:08:36 +08:00
/*
* Interrupt Enable Reg OST_OIER
*/
2011-03-04 18:07:48 +08:00
# define OST_OIER (PKUNITY_OST_BASE + 0x001C)
2012-09-14 16:14:25 +08:00
2011-02-26 20:08:36 +08:00
/*
2012-09-14 16:14:25 +08:00
* PWM Registers : IO base address : PKUNITY_OST_BASE + 0x80
* PWCR : Pulse Width Control Reg
* DCCR : Duty Cycle Control Reg
* PCR : Period Control Reg
2011-02-26 20:08:36 +08:00
*/
2012-09-14 16:14:25 +08:00
# define OST_PWM_PWCR (0x00)
# define OST_PWM_DCCR (0x04)
# define OST_PWM_PCR (0x08)
2011-02-26 20:08:36 +08:00
/*
* Match detected 0 OST_OSSR_M0
*/
# define OST_OSSR_M0 FIELD(1, 1, 0)
/*
* Match detected 1 OST_OSSR_M1
*/
# define OST_OSSR_M1 FIELD(1, 1, 1)
/*
* Match detected 2 OST_OSSR_M2
*/
# define OST_OSSR_M2 FIELD(1, 1, 2)
/*
* Match detected 3 OST_OSSR_M3
*/
# define OST_OSSR_M3 FIELD(1, 1, 3)
/*
* Interrupt enable 0 OST_OIER_E0
*/
# define OST_OIER_E0 FIELD(1, 1, 0)
/*
* Interrupt enable 1 OST_OIER_E1
*/
# define OST_OIER_E1 FIELD(1, 1, 1)
/*
* Interrupt enable 2 OST_OIER_E2
*/
# define OST_OIER_E2 FIELD(1, 1, 2)
/*
* Interrupt enable 3 OST_OIER_E3
*/
# define OST_OIER_E3 FIELD(1, 1, 3)
/*
* Watchdog Match Enable OST_OWER_WME
*/
# define OST_OWER_WME FIELD(1, 1, 0)
/*
* PWM Full Duty Cycle OST_PWMDCCR_FDCYCLE
*/
# define OST_PWMDCCR_FDCYCLE FIELD(1, 1, 10)