HPM APP
HPMicro Application solution
POWER_PWM_API

HPM Power PWM interface;HPM电源PWM接口 More...

Functions

uint8_t mp_pwm_pair_get_mapindex (uint8_t pair_index)
 Get the PWM MAP index number of a pair of PWM ;获取PWM对 MAP数组序号 More...
 
uint8_t mp_pwm_get_mapindex (uint8_t index)
 Get the PWM MAP index number of the PWM ;获取PWM MAP数组序号 More...
 
uint32_t mp_pwm_pair_get_busfreq (uint8_t pair_index)
 Get the bus frequency of a pair of PWM ;获取PWM对总线频率 More...
 
uint32_t mp_pwm_get_busfreq (uint8_t index)
 Get the bus frequency of the PWM ;获取PWM总线频率 More...
 
uint32_t mp_pwm_pair_get_reload (uint8_t pair_index, uint32_t freq)
 Get the reload_count of a pair of PWM ;获取PWM对重载值reload_count. More...
 
uint32_t mp_pwm_get_reload (uint8_t index, uint32_t freq)
 Get the reload_count of the PWM ;获取PWM重载值reload_count. More...
 
int mp_pwm_pair_config (hpm_pwm_pair_t *pwm_pair_t)
 A pair of PWM init config
;PWM对初始配置 More...
 
int mp_pwm_config (hpm_pwm_t *pwm_t)
 PWM init config ;PWM初始配置 More...
 
int mp_pwm_pair_output_enable (hpm_pwm_pair_t *pwm_pair_t, bool enable)
 Enable a pair of PWM waveform outputs ;PWM对波形输出使能 More...
 
int mp_pwm_output_enable (hpm_pwm_t *pwm_t, bool enable)
 Enable the PWM waveform outputs ;PWM波形输出使能 More...
 
int mp_pwm_enable_counter (hpm_pwm_t *pwm_t, bool enable)
 The PWM counter enables counting ;PWM计数器使能计数 More...
 
int mp_pwm_fault_mux_config (uint8_t type, void *handle)
 PWM TRGM for fault protection ;PWM故障保护互联配置 More...
 
int mp_pwm_trigger_mux_config (uint8_t type, void *handle)
 PWM TRGM (trigger ADC sampling at a specific moment during PWM, etc) ;PWM互联触发配置(PWM某一时刻触发ADC采样等) More...
 
const mp_pwm_trigger_map_tmp_pwm_get_trigger_map (uint8_t type, uint8_t index)
 Get the PWM TRGM for MAP table ;获取PWM互联触发MAP表 More...
 
int mp_pwm_sync_config (hpm_mp_t *mp_t)
 PWM synchronous configuration Note: PWM synchronization only supports different PWM controllers ;PWM同步配置 注意: PWM同步只支持不同的PWM控制器 More...
 

Detailed Description

HPM Power PWM interface;HPM电源PWM接口

Function Documentation

◆ mp_pwm_config()

int mp_pwm_config ( hpm_pwm_t pwm_t)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

PWM init config ;PWM初始配置

Parameters
[in]pwm_tAddress of the PWM data structure object ;PWM数据结构对象地址
Return values
==0initialization succeeded; !=0 initialization failed ;==0 PWM初始配置成功; !=0 PWM初始配置失败;

◆ mp_pwm_enable_counter()

int mp_pwm_enable_counter ( hpm_pwm_t pwm_t,
bool  enable 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

The PWM counter enables counting ;PWM计数器使能计数

Parameters
[in]pwm_tAddress of the PWM data structure object ;PWM数据结构对象地址
[in]enabletrue:enable; flase:disable; ; true:使能; flase:禁止;
Return values
==0configuration succeeded; !=0 configuration failed ;==0 设置成功; !=0 设置失败;

◆ mp_pwm_fault_mux_config()

int mp_pwm_fault_mux_config ( uint8_t  type,
void *  handle 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

PWM TRGM for fault protection ;PWM故障保护互联配置

Parameters
[in]typePWM type mp_pwm_type ;PWM类型 mp_pwm_type
[in]handleAddress of the PWM or a pair of PWM data structure object hpm_pwm_t or hpm_pwm_pair_t ;PWM 或 PWM对数据结构对象地址 hpm_pwm_thpm_pwm_pair_t
Return values
==0configuration succeeded; !=0 configuration failed ;==0 配置成功; !=0 配置失败

◆ mp_pwm_get_busfreq()

uint32_t mp_pwm_get_busfreq ( uint8_t  index)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the bus frequency of the PWM ;获取PWM总线频率

Parameters
[in]indexThe PWM index number(an abstract MAP sequence number) ;PWM序号(MAP抽象序号)
Return values
Thebus frequency of the PWM ;PWM总线频率

◆ mp_pwm_get_mapindex()

uint8_t mp_pwm_get_mapindex ( uint8_t  index)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the PWM MAP index number of the PWM ;获取PWM MAP数组序号

Parameters
[in]indexThe PWM index number(an abstract MAP sequence number) ;PWM序号(MAP抽象序号)
Return values
ThePWM MAP index number ;PWM MAP数组序号

◆ mp_pwm_get_reload()

uint32_t mp_pwm_get_reload ( uint8_t  index,
uint32_t  freq 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the reload_count of the PWM ;获取PWM重载值reload_count.

Parameters
[in]indexThe PWM index number(an abstract MAP sequence number) ;PWM序号(MAP抽象序号)
[in]freqThe frequency of the PWM ;PWM频率
Return values
Thereload_count of the PWM ;PWM重载值reload_count

◆ mp_pwm_get_trigger_map()

const mp_pwm_trigger_map_t* mp_pwm_get_trigger_map ( uint8_t  type,
uint8_t  index 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the PWM TRGM for MAP table ;获取PWM互联触发MAP表

Parameters
[in]typePWM type mp_pwm_type ;PWM类型 mp_pwm_type
[in]indexA pair of PWM or PWM index number(an abstract MAP sequence number) ;PWM序号或PWM对序号(MAP抽象序号)
Returns
MAP table address ;返回PWM互联触发MAP表地址

◆ mp_pwm_output_enable()

int mp_pwm_output_enable ( hpm_pwm_t pwm_t,
bool  enable 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Enable the PWM waveform outputs ;PWM波形输出使能

Parameters
[in]pwm_tAddress of the PWM data structure object ;PWM数据结构对象地址
[in]enabletrue:enable; flase:disable; ; true:使能; flase:禁止;
Return values
==0configuration succeeded; !=0 configuration failed ;==0 设置成功; !=0 设置失败;

◆ mp_pwm_pair_config()

int mp_pwm_pair_config ( hpm_pwm_pair_t pwm_pair_t)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

A pair of PWM init config
;PWM对初始配置

Parameters
[in]pwm_pair_tAddress of a pair of PWM data structure object ;PWM对数据结构对象地址
Return values
==0initialization succeeded; !=0 initialization failed ;==0 PWM对初始配置成功; !=0 PWM对初始配置失败;

◆ mp_pwm_pair_get_busfreq()

uint32_t mp_pwm_pair_get_busfreq ( uint8_t  pair_index)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the bus frequency of a pair of PWM ;获取PWM对总线频率

Parameters
[in]pair_indexA pair of PWM index number(an abstract MAP sequence number) ;PWM对序号(MAP抽象序号)
Return values
Thebus frequency of a pair of PWM ;PWM对总线频率

◆ mp_pwm_pair_get_mapindex()

uint8_t mp_pwm_pair_get_mapindex ( uint8_t  pair_index)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the PWM MAP index number of a pair of PWM ;获取PWM对 MAP数组序号

Parameters
[in]pair_indexA pair of PWM index number(an abstract MAP sequence number) ;PWM对序号(MAP抽象序号)
Return values
Apair of PWM MAP index number ;PWM对 MAP数组序号

◆ mp_pwm_pair_get_reload()

uint32_t mp_pwm_pair_get_reload ( uint8_t  pair_index,
uint32_t  freq 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Get the reload_count of a pair of PWM ;获取PWM对重载值reload_count.

Parameters
[in]pair_indexA pair of PWM index number(an abstract MAP sequence number) ;PWM对序号(MAP抽象序号)
[in]freqThe frequency of a pair of PWM ;PWM对频率
Return values
Thereload_count of a pair of PWM ;PWM对重载值reload_count

◆ mp_pwm_pair_output_enable()

int mp_pwm_pair_output_enable ( hpm_pwm_pair_t pwm_pair_t,
bool  enable 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

Enable a pair of PWM waveform outputs ;PWM对波形输出使能

Parameters
[in]pwm_pair_tAddress of a pair of PWM data structure object ;PWM对数据结构对象地址
[in]enabletrue:enable; flase:disable; ; true:使能; flase:禁止;
Return values
==0configuration succeeded; !=0 configuration failed ;==0 设置成功; !=0 设置失败;

◆ mp_pwm_sync_config()

int mp_pwm_sync_config ( hpm_mp_t mp_t)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

PWM synchronous configuration Note: PWM synchronization only supports different PWM controllers ;PWM同步配置 注意: PWM同步只支持不同的PWM控制器

Parameters
[in]mp_tAddress of the POWER MP data structure object ;电源MP数据结构对象地址
Return values
==0configuration succeeded; !=0 configuration failed ;==0 配置成功; !=0 配置失败

◆ mp_pwm_trigger_mux_config()

int mp_pwm_trigger_mux_config ( uint8_t  type,
void *  handle 
)

#include <apps/mp_adapte/software/adapte/src/mp_pwm.h>

PWM TRGM (trigger ADC sampling at a specific moment during PWM, etc) ;PWM互联触发配置(PWM某一时刻触发ADC采样等)

Parameters
[in]typePWM type mp_pwm_type ;PWM类型 mp_pwm_type
[in]handleAddress of the PWM or a pair of PWM data structure object hpm_pwm_t or hpm_pwm_pair_t ;PWM 或 PWM对数据结构对象地址 hpm_pwm_thpm_pwm_pair_t
Return values
==0configuration succeeded; !=0 configuration failed ;==0 配置成功; !=0 配置失败