rt-thread/bsp/Infineon/libraries/HAL_Drivers/drv_pwm.h

103 lines
2.5 KiB
C
Raw Normal View History

2022-07-18 11:43:07 +08:00
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
2022-07-18 11:43:07 +08:00
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
2022-07-28 15:16:35 +08:00
* 2022-07-13 Rbb666 first version
2022-07-18 11:43:07 +08:00
*/
#ifndef __PWM_CONFIG_H__
#define __PWM_CONFIG_H__
#include <rtthread.h>
#include <board.h>
#ifdef __cplusplus
2022-07-28 15:16:35 +08:00
extern "C"
{
2022-07-18 11:43:07 +08:00
#endif
2022-07-28 15:16:35 +08:00
#define MAX_PERIOD 65535
2022-07-18 11:43:07 +08:00
#ifdef BSP_USING_PWM0
2023-03-30 15:23:55 +08:00
#ifndef PWM0_CH0_PORT0_CONFIG
#define PWM0_CH0_PORT0_CONFIG \
2022-07-28 15:16:35 +08:00
{ \
.name = "pwm0", \
2023-03-30 15:23:55 +08:00
.channel = 0, \
.gpio = GET_PIN(0, 0), \
2022-07-18 11:43:07 +08:00
}
2022-07-28 15:16:35 +08:00
#endif /* PWM0_CH7_PORT2_CONFIG */
#ifndef PWM0_CH7_PORT2_CONFIG
#define PWM0_CH7_PORT2_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(2, 2), \
}
#endif /* PWM0_CH7_PORT2_CONFIG */
#ifndef PWM0_CH7_PORT5_CONFIG
#define PWM0_CH7_PORT5_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(5, 6), \
}
#endif /* PWM0_CH7_PORT5_CONFIG */
#ifndef PWM0_CH7_PORT7_CONFIG
#define PWM0_CH7_PORT7_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(7, 7), \
}
#endif /* PWM0_CH7_PORT7_CONFIG */
#ifndef PWM0_CH7_PORT9_CONFIG
#define PWM0_CH7_PORT9_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(9, 4), \
}
#endif /* PWM0_CH7_PORT9_CONFIG */
#ifndef PWM0_CH7_PORT10_CONFIG
#define PWM0_CH7_PORT10_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(10, 2), \
}
#endif /* PWM0_CH7_PORT10_CONFIG */
#ifndef PWM0_CH7_PORT12_CONFIG
#define PWM0_CH7_PORT12_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(12, 6), \
}
#endif /* PWM0_CH7_PORT12_CONFIG */
2023-03-30 15:23:55 +08:00
#ifndef PWM0_CH3_PORT13_CONFIG
#define PWM0_CH3_PORT13_CONFIG \
{ \
.name = "pwm0", \
.channel = 3, \
.gpio = GET_PIN(13, 7), \
}
#endif /* PWM0_CH3_PORT13_CONFIG */
2022-07-18 11:43:07 +08:00
#endif /* BSP_USING_PWM0 */
#ifdef __cplusplus
}
#endif
#endif