Function gx_timer_enable_pwm


int gx_timer_enable_pwm(unsigned int port, unsigned long int period_ns, unsigned long int duty_ns)

timer 输出pwm

参数
  • port -- PWM输出管脚

  • period_ns -- PWM周期

  • duty_ns -- 高电平时间

Returns 0

成功

Returns -1

失败

返回

pwm使能是否成功