1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2022-09-21 yuqi created 9 */ 10 11 #ifndef DRIVERS_CONFIG_PWM_CONFIG_H_ 12 #define DRIVERS_CONFIG_PWM_CONFIG_H_ 13 #include "F28x_Project.h" // Device Headerfile and Examples Include File 14 #include "F2837xD_epwm.h" 15 #include "rtthread.h" 16 #include "drv_config.h" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 #ifdef BSP_USING_PWM1 22 #ifndef PWM1_CONFIG 23 #define PWM1_CONFIG \ 24 { \ 25 .name = "pwm1", \ 26 .pwm_regs = &EPwm1Regs, \ 27 } 28 #endif 29 #endif 30 #ifdef BSP_USING_PWM2 31 #ifndef PWM2_CONFIG 32 #define PWM2_CONFIG \ 33 { \ 34 .name = "pwm2", \ 35 .pwm_regs = &EPwm2Regs, \ 36 } 37 #endif 38 #endif 39 #ifdef BSP_USING_PWM3 40 #ifndef PWM3_CONFIG 41 #define PWM3_CONFIG \ 42 { \ 43 .name = "pwm3", \ 44 .pwm_regs = &EPwm3Regs, \ 45 } 46 #endif 47 #endif 48 #ifdef BSP_USING_PWM4 49 #ifndef PWM4_CONFIG 50 #define PWM4_CONFIG \ 51 { \ 52 .name = "pwm4", \ 53 .pwm_regs = &EPwm4Regs, \ 54 } 55 #endif 56 #endif 57 58 #define TZ_OFF 2 59 #define TZ_ON 1 60 #ifdef __cplusplus 61 } 62 #endif 63 64 65 #define RT_SHADOW_MODE CC_SHADOW 66 #define RT_LOAD_TIME CC_CTR_ZERO 67 #define RT_CTRMODE TB_COUNT_UPDOWN 68 #endif /* DRIVERS_CONFIG_PWM_CONFIG_H_ */ 69 70