From 6618293dc5e84c47f563840104e49b3cd7e5449c Mon Sep 17 00:00:00 2001 From: Yaochenger <75192526+Yaochenger@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:10:46 +0800 Subject: [PATCH] =?UTF-8?q?[bsp][ch32]pwm=E9=81=BF=E5=85=8D=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=20(#6818)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.c | 2 ++ bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.h | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.c b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.c index 66306e81dd..2f8274785c 100644 --- a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.c +++ b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.c @@ -17,6 +17,8 @@ #define LOG_TAG "drv.pwm" #include +#define ITEM_NUM(items) sizeof(items) / sizeof(items[0]) + void ch32_tim_clock_init(TIM_TypeDef* timx) { #ifdef BSP_USING_TIM1_PWM diff --git a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.h b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.h index d9c5ef4d4a..3b7f7c1c11 100644 --- a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.h +++ b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_pwm.h @@ -18,10 +18,6 @@ #include #include -#ifndef ITEM_NUM -#define ITEM_NUM(items) sizeof(items) / sizeof(items[0]) -#endif - #define MAX_COUNTER 65535 #define MIN_COUNTER 2 #define MIN_PULSE 2