2018-12-17 10:38:15 +08:00
|
|
|
/*
|
2021-03-08 22:40:39 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2018-12-17 10:38:15 +08:00
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
|
2019-01-09 10:10:39 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-04-23 19:17:21 +08:00
|
|
|
#ifdef BSP_USING_PWM1
|
|
|
|
#define PWM1_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM1, \
|
|
|
|
.name = "pwm1", \
|
2022-10-30 14:54:17 +08:00
|
|
|
.channel = RT_NULL \
|
2019-04-23 19:17:21 +08:00
|
|
|
}
|
|
|
|
#endif /* BSP_USING_PWM1 */
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#ifdef BSP_USING_PWM2
|
|
|
|
#define PWM2_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM2, \
|
|
|
|
.name = "pwm2", \
|
2022-10-30 14:54:17 +08:00
|
|
|
.channel = RT_NULL \
|
2018-12-17 10:38:15 +08:00
|
|
|
}
|
|
|
|
#endif /* BSP_USING_PWM2 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM3
|
|
|
|
#define PWM3_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM3, \
|
|
|
|
.name = "pwm3", \
|
2022-10-30 14:54:17 +08:00
|
|
|
.channel = RT_NULL \
|
2018-12-17 10:38:15 +08:00
|
|
|
}
|
|
|
|
#endif /* BSP_USING_PWM3 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM4
|
|
|
|
#define PWM4_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM4, \
|
|
|
|
.name = "pwm4", \
|
2022-10-30 14:54:17 +08:00
|
|
|
.channel = RT_NULL \
|
2018-12-17 10:38:15 +08:00
|
|
|
}
|
|
|
|
#endif /* BSP_USING_PWM4 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM5
|
|
|
|
#define PWM5_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM5, \
|
|
|
|
.name = "pwm5", \
|
2022-10-30 14:54:17 +08:00
|
|
|
.channel = RT_NULL \
|
2018-12-17 10:38:15 +08:00
|
|
|
}
|
|
|
|
#endif /* BSP_USING_PWM5 */
|
|
|
|
|
2022-12-05 09:28:15 +08:00
|
|
|
#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 */
|
|
|
|
|
2019-01-09 10:10:39 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#endif /* __PWM_CONFIG_H__ */
|