|
|
@@ -100,7 +100,7 @@ static uint32_t pwm_cap_get_freq(PWMCAP_CH id)
|
|
|
return PWMCAP->pwmcap[id].FRQCAP;
|
|
|
}
|
|
|
|
|
|
-void PWM_IRQHandler(void *para)
|
|
|
+void MCU_PWM_IRQHandler(void *para)
|
|
|
{
|
|
|
uint32_t val;
|
|
|
PWMCAP_CH id;
|
|
|
@@ -110,7 +110,7 @@ void PWM_IRQHandler(void *para)
|
|
|
for (id = PWMCAP_CH0; id < PWMCAP_CH_NUM; id++) {
|
|
|
if (val & (1 << id)) {
|
|
|
PWMCAP->INT_CLR = 1 << id;
|
|
|
- pwmCapVal[id] = pwm_cap_get_freq(id);
|
|
|
+ pwmCapVal[id] = pwm_cap_get_freq(id)/16;
|
|
|
//printf("pwmCapVal[%d]=0x%x.\n", id, pwmCapVal[id]);
|
|
|
PWMCAP->INT_CLR = 0;
|
|
|
pwm_cap_en(id, 1);
|
|
|
@@ -146,7 +146,7 @@ void PWMCAP_Init(void)
|
|
|
{
|
|
|
PWMCAP_CH id;
|
|
|
|
|
|
- NVIC_RegisterIrq(PWM_IRQChannel, PWMCAP_INT_PRIORITY, 0);
|
|
|
+ NVIC_RegisterIrq(MCU_PWM_IRQChannel, PWMCAP_INT_PRIORITY, 0);
|
|
|
for (id = PWMCAP_CH0; id < PWMCAP_CH_NUM; id++)
|
|
|
pwm_cap_initial(id);
|
|
|
}
|