#include "mp_common.h"Go to the source code of this file.
Macros | |
| #define | MP_VERSION "V0.1.0" |
Functions | |
| int | hpm_mp_api_get_default (hpm_mp_t *mp_t) |
| Get the default value of the power data structure ;电源数据结构默认值获取 More... | |
| int | hpm_mp_pwm_pair_get_default (uint8_t pwm_pair_index, uint32_t freq, hpm_pwm_pair_t *pwm_pair_t) |
| Get the default value of a pair of PWM (two PWM channels as a pair) data structure ;获取PWM对(两路PWM成一对)数据结构默认值 More... | |
| int | hpm_mp_pwm_get_default (uint8_t pwm_index, uint32_t freq, hpm_pwm_t *pwm_t) |
| Get the default value of the single PWM data structure ;获取PWM(单路)数据结构默认值 More... | |
| int | hpm_mp_adc_get_default (uint8_t adc_index, hpm_adc_t *adc_t) |
| Get the default value of the ADC data structure ;获取ADC数据结构默认值 More... | |
| int | hpm_mp_api_init (hpm_mp_t *mp_t) |
| Power API initialization ;电源API初始化 More... | |
| uint32_t | hpm_mp_api_pwmpair_get_reload_of_freq (hpm_pwm_pair_t *pwm_pair_t, uint32_t freq) |
| A pair of PWM gets the overloaded value 'reload_count' based on frequency ;PWM对根据频率获取重载值reload_count. More... | |
| int | hpm_mp_api_pwmpair_set_reload_and_duty (hpm_pwm_pair_t *pwm_pair_t, uint32_t reload_count, uint32_t duty_count) |
| A pair of PWM, configured frequency and duty cycle Note: Get reload_count by frequency first,by using hpm_mp_api_pwmpair_get_reload_of_freq ;PWM对同时设置频率和占空比; 注意: 先通过频率获取reload_count,调用 hpm_mp_api_pwmpair_get_reload_of_freq 接口获取 More... | |
| int | hpm_mp_api_pwmpair_freq (hpm_pwm_pair_t *pwm_pair_t, uint32_t freq) |
| A pair of PWM frequency Settings; Note: After setting the frequency, the duty cycle automatically converts to the original percentage. For example, with a 20% duty cycle, after setting the frequency, the duty cycle remains at 20% ;PWM对频率设置; 注意: 设置频率后,占空比自动转换为原始百分比。如:20占空比,设置频率后,占空比仍然为20%. More... | |
| int | hpm_mp_api_pwmpair_freq_of_half_duty (hpm_pwm_pair_t *pwm_pair_t, uint32_t freq) |
| Setting the frequency for a pair of PWM and configuring a 50% duty cycle Note: After setting the frequency, the duty cycle is simultaneously set to 50% ;PWM对频率设置且固定半占空比 注意: 设置频率后,占空比同时设置为50%. More... | |
| int | hpm_mp_api_pwmpair_duty (hpm_pwm_pair_t *pwm_pair_t, uint32_t duty) |
| A pair of PWM duty cycle Settings Note: The duty cycle ranges from 0 to reload_count(reload_count is a member of pwm_pair_t) ;PWM对占空比设置 注意: 占空比范围为0~reload_count(reload_count为pwm_pair_t成员) More... | |
| int | hpm_mp_api_pwmpair_force_config (hpm_pwm_pair_t *pwm_pair_t, uint8_t index, uint8_t level) |
| Setting forced output for a pair of PWM (setting a pair of PWM signals to high or low level) Note: This interface is for configuration only and does not enable the active state. Enable or disable the following interfaces separately Enable (force output to be high or low level) hpm_mp_api_pwmpair_force_enable_output Disable (Restore PWM waveform) hpm_mp_api_pwmpair_force_disable_output ;PWM对强制输出设置(将PWM对强制设置为高电平或低电平) 注意: 此接口只是配置,并不会使能生效状态,使能或禁止需单独调用以下接口 使能生效(强制输出为高或低) hpm_mp_api_pwmpair_force_enable_output 禁止生效(恢复PWM波形) hpm_mp_api_pwmpair_force_disable_output. More... | |
| void | hpm_mp_api_pwmpair_force_enable_output (hpm_pwm_pair_t *pwm_pair_t, uint8_t index) |
| Enable a pair of PWM signals forced outputs (force output to be high or low level) ;PWM对强制输出使能生效(强制输出为高或低) More... | |
| void | hpm_mp_api_pwmpair_force_disable_output (hpm_pwm_pair_t *pwm_pair_t, uint8_t index) |
| Disable a pair of PWM signals forced outputs(Restore PWM waveform) ;PWM对强制输出禁止生效(恢复PWM波形) More... | |
| void | hpm_mp_api_pwmpair_fault_software_clear (hpm_pwm_pair_t *pwm_pair_t) |
| A pair of PWM fault states are cleared by software Note: When the fault recovery is set to software recovery, use this interface to clear the fault status after confirming fault clearance. ;PWM对故障状态软件清除 注意: 当故障恢复设置为软件恢复后,在确认故障清除后,使用此接口清除故障状态 More... | |
| int | hpm_mp_api_pwm_freq (hpm_pwm_t *pwm_t, uint32_t freq) |
| PWM frequency Settings; Note: After setting the frequency, the duty cycle automatically converts to the original percentage. For example, with a 20% duty cycle, after setting the frequency, the duty cycle remains at 20% ;PWM频率设置; 注意: 设置频率后,占空比自动转换为原始百分比。如:20占空比,设置频率后,占空比仍然为20%. More... | |
| int | hpm_mp_api_pwm_freq_of_half_duty (hpm_pwm_t *pwm_t, uint32_t freq) |
| Setting the frequency for the PWM and configuring a 50% duty cycle Note: After setting the frequency, the duty cycle is simultaneously set to 50% ;PWM频率设置且固定半占空比 注意: 设置频率后,占空比同时设置为50%. More... | |
| int | hpm_mp_api_pwm_duty (hpm_pwm_t *pwm_t, uint32_t duty) |
| The PWM duty cycle Settings Note: The duty cycle ranges from 0 to reload_count(reload_count is a member of pwm_pair_t) ;PWM占空比设置 注意: 占空比范围为0~reload_count(reload_count为pwm_t成员) More... | |
| int | hpm_mp_api_pwm_force_config (hpm_pwm_t *pwm_t, uint8_t level) |
| Setting forced output for the PWM (setting the PWM signal to high or low level) Note: This interface is for configuration only and does not enable the active state. Enable or disable the following interfaces separately Enable (force output to be high or low level) hpm_mp_api_pwm_force_enable_output Disable (Restore PWM waveform) hpm_mp_api_pwm_force_disable_output ;PWM强制输出设置(将PWM强制设置为高电平或低电平) 注意: 此接口只是配置,并不会使能生效状态,使能或禁止需单独调用以下接口 使能生效(强制输出为高或低) hpm_mp_api_pwm_force_enable_output 禁止生效(恢复PWM波形) hpm_mp_api_pwm_force_disable_output. More... | |
| void | hpm_mp_api_pwm_force_enable_output (hpm_pwm_t *pwm_t) |
| Enable the PWM signal forced outputs (force output to be high or low level) ;PWM强制输出使能生效(强制输出为高或低) More... | |
| void | hpm_mp_api_pwm_force_disable_output (hpm_pwm_t *pwm_t) |
| Disable the PWM signal forced outputs(Restore PWM waveform) ;PWM强制输出禁止生效(恢复PWM波形) More... | |
| void | hpm_mp_api_pwm_fault_software_clear (hpm_pwm_t *pwm_t) |
| The PWM fault states are cleared by software Note: When the fault recovery is set to software recovery, use this interface to clear the fault status after confirming fault clearance. ;PWM故障状态软件清除 注意: 当故障恢复设置为软件恢复后,在确认故障清除后,使用此接口清除故障状态 More... | |
| int | hpm_mp_api_pwm_pair_trig_set_duty (hpm_pwm_pair_t *pwm_pair_t, uint32_t duty) |
| Setting the duty cycle for a pair of PWM signals that trigger ADC sampling moments Note: Duty cycle ranges from 0 to reload_count(pwm_t) ;PWM对触发ADC采样时刻占空比设置 注意: 占空比范围为0~reload_count(pwm_pair_t) More... | |
| int | hpm_mp_api_pwm_trig_set_duty (hpm_pwm_t *pwm_t, uint32_t duty) |
| Setting the duty cycle for the PWM signal that trigger ADC sampling moments Note: Duty cycle ranges from 0 to reload_count(pwm_t) ;PWM 触发ADC采样时刻占空比设置 注意: 占空比范围为0~reload_count(pwm_t) More... | |
| int | hpm_mp_api_pwm_pair_set_deadzone (hpm_pwm_pair_t *pwm_pair_t, uint32_t start_halfcycle, uint32_t end_halfcycle) |
| A pair of PWM dead zone Settings ;PWM对前后死区设置 More... | |
| int | hpm_mp_api_dma_request_enable (bool enable, uint8_t type, void *handle) |
| PWM DMA enable ;PWM DMA请求使能 More... | |
| int | hpm_mp_timer_create (uint32_t us, mp_timer_cb cb) |
| High precision timer creation ;高精定时器创建 More... | |
| int | hpm_mp_api_pwm_pair_set_map (const mp_pwm_pair_map_t *map_t, int count) |
| Settings for a pair of PWM MAP ;PWM对 MAP设置 More... | |
| int | hpm_mp_api_pwm_set_map (const mp_pwm_map_t *map_t, int count) |
| Settings for the PWM MAP ;PWM MAP设置 More... | |
| int | hpm_mp_api_adc_set_map (const mp_adc_map_t *map_t, int count) |
| Settings for the ADC MAP ;ADC MAP设置 More... | |
| void | hpm_mp_api_pair_pwm_io_init (uint8_t pair_index) |
| A pair of PWM IO init ;PWM 对 IO初始化 More... | |
| void | hpm_mp_api_pwm_io_init (uint8_t index) |
| PWM IO init ;PWM IO初始化 More... | |
| void | hpm_mp_api_adc_io_init (uint8_t adc_index) |
| ADC IO init ;ADC IO初始化 More... | |