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
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#ifdef BSP_USING_PWM2
|
|
|
|
#ifndef PWM2_CONFIG
|
|
|
|
#define PWM2_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM2, \
|
|
|
|
.name = "pwm2", \
|
|
|
|
.channel = 0 \
|
|
|
|
}
|
|
|
|
#endif /* PWM2_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM2 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM3
|
|
|
|
#ifndef PWM3_CONFIG
|
|
|
|
#define PWM3_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM3, \
|
|
|
|
.name = "pwm3", \
|
|
|
|
.channel = 0 \
|
|
|
|
}
|
|
|
|
#endif /* PWM3_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM3 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM4
|
|
|
|
#ifndef PWM4_CONFIG
|
|
|
|
#define PWM4_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM4, \
|
|
|
|
.name = "pwm4", \
|
|
|
|
.channel = 0 \
|
|
|
|
}
|
|
|
|
#endif /* PWM4_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM4 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM5
|
|
|
|
#ifndef PWM5_CONFIG
|
|
|
|
#define PWM5_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM5, \
|
|
|
|
.name = "pwm5", \
|
|
|
|
.channel = 0 \
|
|
|
|
}
|
|
|
|
#endif /* PWM5_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM5 */
|
|
|
|
|
2020-01-15 21:05:12 +08:00
|
|
|
#ifdef BSP_USING_PWM9
|
|
|
|
#ifndef PWM9_CONFIG
|
|
|
|
#define PWM9_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM9, \
|
|
|
|
.name = "pwm9", \
|
|
|
|
.channel = 0 \
|
|
|
|
}
|
|
|
|
#endif /* PWM9_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM9 */
|
|
|
|
|
2019-09-10 19:17:38 +08:00
|
|
|
#ifdef BSP_USING_PWM12
|
|
|
|
#ifndef PWM12_CONFIG
|
|
|
|
#define PWM12_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM12, \
|
|
|
|
.name = "pwm12", \
|
|
|
|
.channel = 0 \
|
|
|
|
}
|
|
|
|
#endif /* PWM12_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM12 */
|
|
|
|
|
2019-01-09 10:10:39 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#endif /* __PWM_CONFIG_H__ */
|