2020-07-01 23:44:57 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2019, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#ifndef __PWM_CONFIG_H__
|
|
|
|
#define __PWM_CONFIG_H__
|
2020-06-24 19:54:42 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2020-07-02 14:43:10 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef BSP_USING_PWM0
|
|
|
|
#ifndef PWM0_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM0_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm0", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM0_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM0 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM1
|
|
|
|
#ifndef PWM1_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM1_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm1", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM1_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_PWM1 */
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef BSP_USING_PWM2
|
|
|
|
#ifndef PWM2_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM2_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm2", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM2_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM2 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM3
|
|
|
|
#ifndef PWM3_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM3_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm3", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM3_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM3 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM4
|
|
|
|
#ifndef PWM4_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM4_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm4", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM4_CONFIG */
|
|
|
|
#endif /* BSP_USING_PWM4 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_PWM5
|
|
|
|
#ifndef PWM5_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM5_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm5", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM5_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_PWM5 */
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef BSP_USING_PWM6
|
|
|
|
#ifndef PWM6_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM6_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm6", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM6_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_PWM6 */
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef BSP_USING_PWM7
|
|
|
|
#ifndef PWM7_CONFIG
|
2020-07-02 14:43:10 +08:00
|
|
|
#define PWM7_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "pwm7", \
|
|
|
|
.channel = 0 , \
|
|
|
|
.counterMode = PWM_GEN_MODE_UP_DOWN , \
|
|
|
|
.syncMode = PWM_GEN_MODE_NO_SYNC \
|
2020-06-24 19:54:42 +08:00
|
|
|
}
|
|
|
|
#endif /* PWM7_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_PWM7 */
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#endif /*__PWM_CONFIG_H__*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
/************************** end of file ******************/
|