1 /* 2 * Copyright (c) 2021-2022 Bestechnic (Shanghai) Co., Ltd. All rights reserved. 3 * 4 * This file is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef __PWM_BES_H__ 10 #define __PWM_BES_H__ 11 12 #include "hal_pwm.h" 13 #include "hal_gpio.h" 14 #ifdef CHIP_BEST2003 15 #include "hal_iomux.h" 16 #endif 17 #include "pwm_core.h" 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 struct PwmResource { 24 uint32_t pwmPin; 25 uint32_t pwmId; 26 }; 27 28 struct PwmDevice { 29 struct IDeviceIoService ioService; 30 struct HAL_PWM_CFG_T pwmCfg; 31 struct PwmConfig *cfg; 32 struct PwmResource resource; 33 }; 34 35 #ifdef __cplusplus 36 } 37 #endif 38 #endif 39