pwm_config.h 1.9 KB
Newer Older
whj123999's avatar
whj123999 已提交
1
/*
2
 * Copyright (c) 2006-2022, RT-Thread Development Team
whj123999's avatar
whj123999 已提交
3 4 5 6 7 8
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-12-13     zylx         first version
9
 * 2022-04-14     Miaowulue    add PWM1
whj123999's avatar
whj123999 已提交
10 11 12 13 14 15 16 17 18 19 20
 */

#ifndef __PWM_CONFIG_H__
#define __PWM_CONFIG_H__

#include <rtthread.h>

#ifdef __cplusplus
extern "C" {
#endif

21 22 23 24 25
#ifdef BSP_USING_PWM1
#define PWM1_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM1,         \
       .name                    = "pwm1",       \
26
       .channel                 = RT_NULL       \
27 28 29
    }
#endif /* BSP_USING_PWM1 */

whj123999's avatar
whj123999 已提交
30 31 32 33 34
#ifdef BSP_USING_PWM2
#define PWM2_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM2,         \
       .name                    = "pwm2",       \
35
       .channel                 = RT_NULL       \
whj123999's avatar
whj123999 已提交
36 37 38 39 40 41 42 43
    }
#endif /* BSP_USING_PWM2 */

#ifdef BSP_USING_PWM3
#define PWM3_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM3,         \
       .name                    = "pwm3",       \
44
       .channel                 = RT_NULL       \
whj123999's avatar
whj123999 已提交
45 46 47 48 49 50 51 52
    }
#endif /* BSP_USING_PWM3 */

#ifdef BSP_USING_PWM4
#define PWM4_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM4,         \
       .name                    = "pwm4",       \
53
       .channel                 = RT_NULL       \
whj123999's avatar
whj123999 已提交
54 55 56 57 58 59 60 61
    }
#endif /* BSP_USING_PWM4 */

#ifdef BSP_USING_PWM5
#define PWM5_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM5,         \
       .name                    = "pwm5",       \
62
       .channel                 = RT_NULL       \
whj123999's avatar
whj123999 已提交
63 64 65 66 67 68 69 70
    }
#endif /* BSP_USING_PWM5 */

#ifdef __cplusplus
}
#endif

#endif /* __PWM_CONFIG_H__ */