123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- /*
- * Copyright (c) 2006-2023, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2018-12-13 zylx first version
- */
- #ifndef __PWM_CONFIG_H__
- #define __PWM_CONFIG_H__
- #include <rtthread.h>
- #ifdef __cplusplus
- 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 \
- { \
- .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 __cplusplus
- }
- #endif
- #endif /* __PWM_CONFIG_H__ */
|