/*================================================================ Copyright (c) 2022, Quectel Wireless Solutions Co., Ltd. All rights reserved. Quectel Wireless Solutions Proprietary and Confidential. =================================================================*/ #ifndef _QL_PWM_H #define _QL_PWM_H #ifdef __cplusplus extern "C" { #endif typedef enum QL_PWM_CYCLE_RANGE_ENUM { QL_PWM_CYCLE_ABOVE_1US, QL_PWM_CYCLE_ABOVE_10US, QL_PWM_CYCLE_ABOVE_1MS } QL_PWM_CYCLE_RANGE_E; typedef enum { QL_PWM_CLK_SRC_13M, QL_PWM_CLK_SRC_32K, }QL_PWM_CLK_SRC_E; typedef struct { unsigned long pwm_psc; //(value:1~64) example:choose 13 MHz, maximum is 13000000/1=13 MHz, minimum is 13000000/64 = 203,125 KHz. unsigned short high_one_cycle_duration; //Time that PWM_OUT puls is high in term of "clk_freq" define above. This value is written to PWDUTY register. unsigned short total_one_cycle_duration; //(1