File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2727/* Each of the 4 channels uses 1 nibble of CCER */
2828#define CCER_MASK (TIM_CC1P | TIM_CC1E)
2929
30+ #ifdef TIM2_CTLR1_CEN
31+ /* ch32fun.h uses a different set of names for the CH32V00x series. Remap. */
32+ typedef GPTM_TypeDef TIM_TypeDef ;
33+ #define TIM_CEN TIM2_CTLR1_CEN
34+ #define TIM_OC1M TIM2_CHCTLR1_OC1M
35+ #define TIM_OC2M TIM2_CHCTLR1_OC2M
36+ #define TIM_OC3M TIM2_CHCTLR2_OC3M
37+ #define TIM_OC4M TIM2_CHCTLR2_OC4M
38+ #define TIM_CC1P TIM2_CCER_CC1P
39+ #define TIM_CC1E TIM2_CCER_CC1E
40+ #define TIM_CC1E TIM2_CCER_CC1E
41+ #define TIM_ARPE TIM2_CTLR1_ARPE
42+ #endif
43+
3044struct pwm_wch_gptm_config {
3145 TIM_TypeDef * regs ;
3246 const struct device * clock_dev ;
Original file line number Diff line number Diff line change 1313#endif
1414
1515#if defined(CONFIG_SOC_SERIES_CH32V00X )
16- #define CH32V003 1
16+ #define CH32V00x 1
1717#include <ch32fun.h>
1818#endif
1919
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ manifest:
265265 groups :
266266 - hal
267267 - name : hal_wch
268- revision : 941f5182b5577d168e0cbcc0c9dd26294c1806a5
268+ revision : 6dd313768b5f4cc69baeac4ce6e59f2038eb8ce5
269269 path : modules/hal/wch
270270 groups :
271271 - hal
You can’t perform that action at this time.
0 commit comments