1 /* 2 * Change Logs: 3 * Date Author Notes 4 * 2021-04-20 liuhy the first version 5 * 6 * Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. All rights reserved. 7 * 8 * SPDX-License-Identifier: Apache-2.0 9 * 10 * Licensed under the Apache License, Version 2.0 (the License); you may 11 * not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 * 22 */ 23 24 #ifndef __ES_CONF_INFO_PWM_H__ 25 #define __ES_CONF_INFO_PWM_H__ 26 27 #include "es_conf_info_map.h" 28 #include <ald_cmu.h> 29 #include <ald_timer.h> 30 #include <ald_gpio.h> 31 32 33 #define ES_C_PWM_OC_POL_HIGH TIMER_OC_POLARITY_HIGH 34 #define ES_C_PWM_OC_POL_LOW TIMER_OC_POLARITY_LOW 35 36 #define ES_C_PWM_OC_MODE_PWM1 TIMER_OC_MODE_PWM1 37 #define ES_C_PWM_OC_MODE_PWM2 TIMER_OC_MODE_PWM2 38 39 40 41 /* PWM 配置 */ 42 43 44 /* codes_main */ 45 46 47 48 #define ES_PWM_OC_POLARITY ES_C_PWM_OC_POL_HIGH 49 #define ES_PWM_OC_MODE ES_C_PWM_OC_MODE_PWM2 50 51 #ifndef ES_PWM_OC_POLARITY 52 #define ES_PWM_OC_POLARITY ES_C_PWM_OC_POL_HIGH 53 #endif 54 #ifndef ES_PWM_OC_MODE 55 #define ES_PWM_OC_MODE ES_C_PWM_OC_MODE_PWM2 56 #endif 57 58 #ifndef ES_DEVICE_NAME_AD16C4T0_PWM 59 #define ES_DEVICE_NAME_AD16C4T0_PWM "pwm0" 60 #endif 61 #ifndef ES_DEVICE_NAME_AD16C4T1_PWM 62 #define ES_DEVICE_NAME_AD16C4T1_PWM "pwm1" 63 #endif 64 #ifndef ES_DEVICE_NAME_GP32C4T0_PWM 65 #define ES_DEVICE_NAME_GP32C4T0_PWM "pwm2" 66 #endif 67 #ifndef ES_DEVICE_NAME_GP32C4T1_PWM 68 #define ES_DEVICE_NAME_GP32C4T1_PWM "pwm3" 69 #endif 70 #ifndef ES_DEVICE_NAME_GP16C4T0_PWM 71 #define ES_DEVICE_NAME_GP16C4T0_PWM "pwm4" 72 #endif 73 #ifndef ES_DEVICE_NAME_GP16C4T1_PWM 74 #define ES_DEVICE_NAME_GP16C4T1_PWM "pwm5" 75 #endif 76 77 78 #endif 79