Skip to content

AliOS Things API HAL SOC PWM Guide

librae8226 edited this page Mar 1, 2018 · 1 revision

API INDEX


1-hal_pwm_init

int32_t hal_pwm_init(pwm_dev_t *pwm)
  • Description

    Initialises a PWM pin

  • Parameters

    IN/OUT NAME DESC
    [in] pwm the PWM device
  • Returns

    0 : on success, EIO : if an error occurred with any step

2-hal_pwm_start

int32_t hal_pwm_start(pwm_dev_t *pwm)
  • Description

    Starts Pulse-Width Modulation signal output on a PWM pin

  • Parameters

    IN/OUT NAME DESC
    [in] pwm the PWM device
  • Returns

    0 : on success, EIO : if an error occurred with any step

3-hal_pwm_stop

int32_t hal_pwm_stop(pwm_dev_t *pwm)
  • Description

    Stops output on a PWM pin

  • Parameters

    IN/OUT NAME DESC
    [in] pwm the PWM device
  • Returns

    0 : on success, EIO : if an error occurred with any step

4-hal_pwm_finalize

int32_t hal_pwm_finalize(pwm_dev_t *pwm)
  • Description

    finalize output on a PWM pin

  • Parameters

    IN/OUT NAME DESC
    [in] pwm the PWM device
  • Returns

    0 : on success, EIO : if an error occurred with any step

Clone this wiki locally