MT2523 API Reference  LinkIt SDK v4
Enum
HAL » PWM

Overview

Enumerations

enum  hal_pwm_status_t {
  HAL_PWM_STATUS_ERROR = -4,
  HAL_PWM_STATUS_ERROR_CHANNEL = -3,
  HAL_PWM_STATUS_INVALID_PARAMETER = -2,
  HAL_PWM_STATUS_INVALID_FREQUENCY = -1,
  HAL_PWM_STATUS_OK = 0
}
 This enum defines the API return type. More...
 
enum  hal_pwm_running_status_t {
  HAL_PWM_IDLE = 0,
  HAL_PWM_BUSY = 1
}
 This enum defines the PWM running status. More...
 
enum  hal_pwm_advanced_config_t {
  HAL_PWM_CLOCK_DIVISION_2 = 1,
  HAL_PWM_CLOCK_DIVISION_4 = 2,
  HAL_PWM_CLOCK_DIVISION_8 = 3
}
 This enum defines PWM clock division advanced configuration. More...
 
enum  hal_pwm_channel_t {
  HAL_PWM_0 = 0,
  HAL_PWM_1 = 1,
  HAL_PWM_2 = 2,
  HAL_PWM_3 = 3,
  HAL_PWM_4 = 4,
  HAL_PWM_5 = 5,
  HAL_PWM_MAX_CHANNEL
}
 The PWM channels. More...
 
enum  hal_pwm_source_clock_t {
  HAL_PWM_CLOCK_13MHZ = 0,
  HAL_PWM_CLOCK_32KHZ = 1
}
 PWM clock source options. More...
 

Enumeration Type Documentation

This enum defines PWM clock division advanced configuration.

Enumerator
HAL_PWM_CLOCK_DIVISION_2 

Specify the PWM source clock 2 division.

HAL_PWM_CLOCK_DIVISION_4 

Specify the PWM source clock 4 division.

HAL_PWM_CLOCK_DIVISION_8 

Specify the PWM source clock 8 division.

The PWM channels.

Enumerator
HAL_PWM_0 

PWM channel 0.

HAL_PWM_1 

PWM channel 1.

HAL_PWM_2 

PWM channel 2.

HAL_PWM_3 

PWM channel 3.

HAL_PWM_4 

PWM channel 4.

HAL_PWM_5 

PWM channel 5.

HAL_PWM_MAX_CHANNEL 

The total number of PWM channels (invalid PWM channel).

This enum defines the PWM running status.

Enumerator
HAL_PWM_IDLE 

The PWM status is idle.

HAL_PWM_BUSY 

The PWM status is busy.

PWM clock source options.

Enumerator
HAL_PWM_CLOCK_13MHZ 

PWM clock source 13MHz.

HAL_PWM_CLOCK_32KHZ 

PWM clock srouce 32kHz.

This enum defines the API return type.

Enumerator
HAL_PWM_STATUS_ERROR 

An error occurred during the function call.

HAL_PWM_STATUS_ERROR_CHANNEL 

A wrong PWM channel is given.

HAL_PWM_STATUS_INVALID_PARAMETER 

A wrong parameter is given.

HAL_PWM_STATUS_INVALID_FREQUENCY 

A smaller frequency is given.

HAL_PWM_STATUS_OK 

No error during the function call.