summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuqiang Wang <[email protected]>2023-04-08 13:03:22 +0800
committerGitHub <[email protected]>2023-04-08 01:03:22 -0400
commit7fbe8bbd494689cc0cc2be9c5a3eff1c916be38a (patch)
treed600afe56c9cf310dcec1b260827368b4eff87e0
parent25bcb84756f2699ef03286d3f74ebcff3de1fc87 (diff)
[bsp][stm32] 完善STM32系列 pwm_config.h文件 (#7196)
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h118
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h56
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h136
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h163
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h46
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h136
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h156
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h120
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h127
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h136
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h100
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h127
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h136
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h127
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h127
15 files changed, 1808 insertions, 3 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h
index c5c6a6385e..9bd8cbd559 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-24 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -17,6 +18,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -53,6 +63,96 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
#ifdef BSP_USING_PWM16
#define PWM16_CONFIG \
{ \
@@ -71,6 +171,24 @@ extern "C" {
}
#endif /* BSP_USING_PWM17 */
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h
index 460a4008e0..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -24,7 +25,6 @@ extern "C" {
.name = "pwm1", \
.channel = RT_NULL \
}
-
#endif /* BSP_USING_PWM1 */
#ifdef BSP_USING_PWM2
@@ -135,6 +135,60 @@ extern "C" {
}
#endif /* BSP_USING_PWM13 */
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h
index da378af134..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -17,6 +18,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -53,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h
index 70ea262fe3..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -26,6 +27,168 @@ extern "C" {
}
#endif /* BSP_USING_PWM1 */
+#ifdef BSP_USING_PWM2
+#define PWM2_CONFIG \
+ { \
+ .tim_handle.Instance = TIM2, \
+ .name = "pwm2", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM2 */
+
+#ifdef BSP_USING_PWM3
+#define PWM3_CONFIG \
+ { \
+ .tim_handle.Instance = TIM3, \
+ .name = "pwm3", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM3 */
+
+#ifdef BSP_USING_PWM4
+#define PWM4_CONFIG \
+ { \
+ .tim_handle.Instance = TIM4, \
+ .name = "pwm4", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM4 */
+
+#ifdef BSP_USING_PWM5
+#define PWM5_CONFIG \
+ { \
+ .tim_handle.Instance = TIM5, \
+ .name = "pwm5", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM5 */
+
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h
index 88729cc0b4..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -143,6 +144,51 @@ extern "C" {
}
#endif /* BSP_USING_PWM14 */
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h
index da378af134..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -17,6 +18,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -53,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h
index 73b7286ad1..15bcc2fa55 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h
@@ -7,6 +7,7 @@
* Date Author Notes
* 2018-01-05 zylx first version
* 2019-01-08 SummerGift clean up the code
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -18,6 +19,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -34,7 +44,151 @@ extern "C" {
.name = "pwm3", \
.channel = RT_NULL \
}
-#endif /* BSP_USING_PWM2 */
+#endif /* BSP_USING_PWM3 */
+
+#ifdef BSP_USING_PWM4
+#define PWM4_CONFIG \
+ { \
+ .tim_handle.Instance = TIM4, \
+ .name = "pwm4", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM4 */
+
+#ifdef BSP_USING_PWM5
+#define PWM5_CONFIG \
+ { \
+ .tim_handle.Instance = TIM5, \
+ .name = "pwm5", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM5 */
+
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
#ifdef __cplusplus
}
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h
index 9dbdc62582..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -17,6 +18,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -53,6 +63,24 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
#ifdef BSP_USING_PWM8
#define PWM8_CONFIG \
{ \
@@ -61,7 +89,34 @@ extern "C" {
.channel = RT_NULL \
}
#endif /* BSP_USING_PWM8 */
-
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
#ifdef BSP_USING_PWM12
#define PWM12_CONFIG \
{ \
@@ -71,6 +126,69 @@ extern "C" {
}
#endif /* BSP_USING_PWM12 */
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h
index a2837d3126..5c062739fd 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h
@@ -7,6 +7,7 @@
* Date Author Notes
* 2018-12-13 zylx first version
* 2022-04-14 Miaowulue add PWM1
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -63,6 +64,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h
index da378af134..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -17,6 +18,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -53,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h
index 84c8cf8df8..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -62,6 +63,87 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
#ifdef BSP_USING_PWM15
#define PWM15_CONFIG \
{ \
@@ -89,6 +171,24 @@ extern "C" {
}
#endif /* BSP_USING_PWM17 */
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h
index ffe090e08d..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -62,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h
index da378af134..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -17,6 +18,15 @@
extern "C" {
#endif
+#ifdef BSP_USING_PWM1
+#define PWM1_CONFIG \
+ { \
+ .tim_handle.Instance = TIM1, \
+ .name = "pwm1", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM1 */
+
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG \
{ \
@@ -53,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h
index ffe090e08d..9ad2c09b4d 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-12-13 zylx first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -62,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h
index 8d3a1ea442..6f52ca2044 100644
--- a/bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h
+++ b/bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2020-10-14 Dozingfiretruck first version
+ * 2023-04-08 Wangyuqiang complete PWM defination
*/
#ifndef __PWM_CONFIG_H__
@@ -62,6 +63,132 @@ extern "C" {
}
#endif /* BSP_USING_PWM5 */
+#ifdef BSP_USING_PWM6
+#define PWM6_CONFIG \
+ { \
+ .tim_handle.Instance = TIM6, \
+ .name = "pwm6", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM6 */
+
+#ifdef BSP_USING_PWM7
+#define PWM7_CONFIG \
+ { \
+ .tim_handle.Instance = TIM7, \
+ .name = "pwm7", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM7 */
+
+#ifdef BSP_USING_PWM8
+#define PWM8_CONFIG \
+ { \
+ .tim_handle.Instance = TIM8, \
+ .name = "pwm8", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM8 */
+
+#ifdef BSP_USING_PWM9
+#define PWM9_CONFIG \
+ { \
+ .tim_handle.Instance = TIM9, \
+ .name = "pwm9", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM9 */
+
+#ifdef BSP_USING_PWM10
+#define PWM10_CONFIG \
+ { \
+ .tim_handle.Instance = TIM10, \
+ .name = "pwm10", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM10 */
+
+#ifdef BSP_USING_PWM11
+#define PWM11_CONFIG \
+ { \
+ .tim_handle.Instance = TIM11, \
+ .name = "pwm11", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM11 */
+
+#ifdef BSP_USING_PWM12
+#define PWM12_CONFIG \
+ { \
+ .tim_handle.Instance = TIM12, \
+ .name = "pwm12", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM12 */
+
+#ifdef BSP_USING_PWM13
+#define PWM13_CONFIG \
+ { \
+ .tim_handle.Instance = TIM13, \
+ .name = "pwm13", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM13 */
+
+#ifdef BSP_USING_PWM14
+#define PWM14_CONFIG \
+ { \
+ .tim_handle.Instance = TIM14, \
+ .name = "pwm14", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM14 */
+
+#ifdef BSP_USING_PWM15
+#define PWM15_CONFIG \
+ { \
+ .tim_handle.Instance = TIM15, \
+ .name = "pwm15", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM15 */
+
+#ifdef BSP_USING_PWM16
+#define PWM16_CONFIG \
+ { \
+ .tim_handle.Instance = TIM16, \
+ .name = "pwm16", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM16 */
+
+#ifdef BSP_USING_PWM17
+#define PWM17_CONFIG \
+ { \
+ .tim_handle.Instance = TIM17, \
+ .name = "pwm17", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM17 */
+
+#ifdef BSP_USING_PWM18
+#define PWM18_CONFIG \
+ { \
+ .tim_handle.Instance = TIM18, \
+ .name = "pwm18", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM18 */
+
+#ifdef BSP_USING_PWM19
+#define PWM19_CONFIG \
+ { \
+ .tim_handle.Instance = TIM19, \
+ .name = "pwm19", \
+ .channel = RT_NULL \
+ }
+#endif /* BSP_USING_PWM19 */
+
#ifdef __cplusplus
}
#endif