12 #ifndef __PWM_SFRS_H__
13 #define __PWM_SFRS_H__
43 #define PWM1_SFRS ((__IO PWM1_SFRS_t *) (ASIC_7B_BASE + 0x48))
45 #define E_PWM1_PRESCALE_DIV1 0
46 #define E_PWM1_PRESCALE_DIV2 1
47 #define E_PWM1_PRESCALE_DIV4 2
48 #define E_PWM1_PRESCALE_DIV8 3
49 #define E_PWM1_PRESCALE_DIV32 4
50 #define E_PWM1_PRESCALE_DIV256 5
51 #define E_PWM1_PRESCALE_DIV8192 6
52 #define E_PWM1_PRESCALE_DIV262144 7
62 PWM1_SFRS->EXT.WIDTHHIGH = (period >> 8) & 0x0F;
73 PWM1_SFRS->EXT.PERIODHIGH = (width >> 8) & 0x0F;
136 uint8_t PERIODHIGH:4;
146 #define PWM2_SFRS ((__IO PWM2_SFRS_t *) (ASIC_7B_BASE + 0x4C))
148 #define E_PWM2_PRESCALE_DIV1 0
149 #define E_PWM2_PRESCALE_DIV2 1
150 #define E_PWM2_PRESCALE_DIV4 2
151 #define E_PWM2_PRESCALE_DIV8 3
152 #define E_PWM2_PRESCALE_DIV32 4
153 #define E_PWM2_PRESCALE_DIV256 5
154 #define E_PWM2_PRESCALE_DIV8192 6
155 #define E_PWM2_PRESCALE_DIV262144 7
165 PWM2_SFRS->EXT.WIDTHHIGH = (period >> 8) & 0x0F;
176 PWM2_SFRS->EXT.PERIODHIGH = (width >> 8) & 0x0F;
static __INLINE void f_PWM1_InvertOff(void)
Disable on inverter for PWM1.
Definition: pwm_sfrs.h:97
#define PWM1_SFRS
The starting address of PWM1 SFRS.
Definition: pwm_sfrs.h:43
uint8_t WIDTHLOW
Definition: pwm_sfrs.h:30
static __INLINE void f_PWM1_SetPreScaler(uint8_t div)
Set clock pre-scaler for PWM1.
Definition: pwm_sfrs.h:81
static __INLINE void f_PWM1_Disable(void)
Disable PWM1.
Definition: pwm_sfrs.h:113
static __INLINE void f_PWM1_InvertOn(void)
Enable on inverter for PWM1.
Definition: pwm_sfrs.h:89
static __INLINE void f_PWM1_SetWidth(uint32_t width)
Set width for PWM1.
Definition: pwm_sfrs.h:70
uint8_t BYTE
Definition: pwm_sfrs.h:36
uint8_t BYTE
Definition: pwm_sfrs.h:139
static __INLINE void f_PWM2_SetPeriod(uint32_t period)
Set period for PWM2.
Definition: pwm_sfrs.h:162
A structure to represent Special Function Registers for PWM2.
Definition: pwm_sfrs.h:121
static __INLINE void f_PWM2_InvertOff(void)
Disable on inverter for PWM2.
Definition: pwm_sfrs.h:200
static __INLINE void f_PWM2_Enable(void)
Enable PWM2.
Definition: pwm_sfrs.h:208
static __INLINE void f_PWM2_SetWidth(uint32_t width)
Set width for PWM2.
Definition: pwm_sfrs.h:173
uint8_t WIDTHLOW
Definition: pwm_sfrs.h:133
uint8_t CTRL
Definition: pwm_sfrs.h:130
static __INLINE void f_PWM1_Enable(void)
Enable PWM1.
Definition: pwm_sfrs.h:105
uint8_t PERIODLOW
Definition: pwm_sfrs.h:132
A structure to represent Special Function Registers for PWM1.
Definition: pwm_sfrs.h:18
static __INLINE void f_PWM2_InvertOn(void)
Enable on inverter for PWM2.
Definition: pwm_sfrs.h:192
uint8_t CTRL
Definition: pwm_sfrs.h:27
static __INLINE void f_PWM2_Disable(void)
Disable PWM2.
Definition: pwm_sfrs.h:216
static __INLINE void f_PWM1_SetPeriod(uint32_t period)
Set period for PWM1.
Definition: pwm_sfrs.h:59
uint8_t PERIODLOW
Definition: pwm_sfrs.h:29
#define PWM2_SFRS
The starting address of PWM2 SFRS.
Definition: pwm_sfrs.h:146
static __INLINE void f_PWM2_SetPreScaler(uint8_t div)
Set clock pre-scaler for PWM2.
Definition: pwm_sfrs.h:184