From b435edd5809983ff9f97ac0399e427d90eb29b78 Mon Sep 17 00:00:00 2001 From: Legend Date: Wed, 29 Jun 2022 00:59:17 +0800 Subject: [PATCH] fix:pwm ccr --- include/fw_pwm.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/fw_pwm.h b/include/fw_pwm.h index 449f8df..06bef95 100644 --- a/include/fw_pwm.h +++ b/include/fw_pwm.h @@ -454,26 +454,26 @@ typedef enum */ #define PWMB_PWM1_SetCaptureCompareValue(__16BIT_VAL__) do{ \ SFRX_ON(); \ - (PWMB_CCR1H = ((__16BIT_VAL__) >> 8)); \ - (PWMB_CCR1L = ((__16BIT_VAL__) & 0xFF)); \ + (PWMB_CCR5H = ((__16BIT_VAL__) >> 8)); \ + (PWMB_CCR5L = ((__16BIT_VAL__) & 0xFF)); \ SFRX_OFF(); \ }while(0) #define PWMB_PWM2_SetCaptureCompareValue(__16BIT_VAL__) do{ \ SFRX_ON(); \ - (PWMB_CCR2H = ((__16BIT_VAL__) >> 8)); \ - (PWMB_CCR2L = ((__16BIT_VAL__) & 0xFF)); \ + (PWMB_CCR6H = ((__16BIT_VAL__) >> 8)); \ + (PWMB_CCR6L = ((__16BIT_VAL__) & 0xFF)); \ SFRX_OFF(); \ }while(0) #define PWMB_PWM3_SetCaptureCompareValue(__16BIT_VAL__) do{ \ SFRX_ON(); \ - (PWMB_CCR3H = ((__16BIT_VAL__) >> 8)); \ - (PWMB_CCR3L = ((__16BIT_VAL__) & 0xFF)); \ + (PWMB_CCR7H = ((__16BIT_VAL__) >> 8)); \ + (PWMB_CCR7L = ((__16BIT_VAL__) & 0xFF)); \ SFRX_OFF(); \ }while(0) #define PWMB_PWM4_SetCaptureCompareValue(__16BIT_VAL__) do{ \ SFRX_ON(); \ - (PWMB_CCR4H = ((__16BIT_VAL__) >> 8)); \ - (PWMB_CCR4L = ((__16BIT_VAL__) & 0xFF)); \ + (PWMB_CCR8H = ((__16BIT_VAL__) >> 8)); \ + (PWMB_CCR8L = ((__16BIT_VAL__) & 0xFF)); \ SFRX_OFF(); \ }while(0)