HPM APP
HPMicro Application solution
mp_common.h File Reference
#include <stdio.h>
#include "hpm_common.h"
#include "hpm_clock_drv.h"
#include "hpm_soc.h"
#include "hpm_soc_feature.h"
#include "pinmux.h"
#include "mp_config.h"

Go to the source code of this file.

Data Structures

struct  mp_adc_map_t
 ADC MAP data structure ;ADC MAP数据结构 More...
 
struct  mp_pwm_trigger_map_t
 PWM TRGM MAP data structure ;PWM 互联触发MAP数据结构 More...
 
struct  mp_pwm_fault_map_t
 PWM fault protection for MAP data structure ;PWM 故障保护MAP数据结构 More...
 
struct  mp_pwm_pair_map_t
 Address of a pair of PWM MAP data structure ;PWM 对MAP数据结构 More...
 
struct  mp_pwm_pair_map_t::io_p
 a pair of PWM,two I/O ports ;一对两路PWM,两路IO口 More...
 
struct  mp_pwm_map_t
 Address of the PWM MAP data structure ;PWM MAP数据结构 More...
 
struct  mp_pwm_map_t::io_t
 
struct  hpm_adc_t
 ADC data structure ;ADC 数据结构 More...
 
struct  hpm_hdma_adc_t
 HDMA ADC data structure, using HDMA to transfer ADC sampling values. This method is typically employed for sampling a set of data at a fixed frequency, such as collecting a group of points, for instance, 512/1024/4096. ;HDMA ADC 数据结构, 使用HDMA搬用ADC采样值,一般应用于固定频率采样一组(例如:512/1024/4096个点)数据 More...
 
struct  hpm_pwm_fault_t
 PWM fault protection data structure ;PWM 故障保护数据结构 More...
 
struct  hpm_pwm_pair_t
 A pair of PWM data structure ;PWM 对数据结构 More...
 
struct  hpm_pwm_t
 PWM data structure
;PWM 数据结构 More...
 
struct  hpm_mp_t
 Power MP data structure
;电源MP数据结构 More...
 

Macros

#define MP_PWM_PAIR_COUNT   (MP_PWM_PAIR_NUM_MAX)
 Summation of a pair of PWM sequence numbers ;PWM对序号总和 More...
 
#define MP_PWM_TRIGGER_COUNT_MAX   (8)
 PWM trigger count max ;PWM互联触发最大总和 More...
 
#define MP_PWM_TRIGGER_ADC_BIT   (0)
 PWM trigger for ADC bit ;PWM互联触发ADC采样BIT位 More...
 

Typedefs

typedef void(* hpm_mp_adc_over_callback) (void *handle)
 ADC callback after sampling ends ;ADC 采样结束回调 More...
 
typedef void(* hpm_mp_hdma_over_callback) (hpm_hdma_adc_t *hdma_adc_t)
 HDMA ADC data transmission and callback completed ;HDMA ADC数据搬用完成回调 More...
 
typedef void(* mp_timer_cb) (void)
 High precision timer callback ;高精定时回调 More...
 

Enumerations

enum  mp_pwm_type { MP_PWM_SINGLE_TYPE = 0 , MP_PWM_PAIR_TYPE , MP_PWM_TYPE_MAX }
 PWM type(one channel or one pair) ;PWM类型(单路或一对) More...
 
enum  mp_pwm_pair_index {
  MP_PWM_PAIR_NUM_0 = 0 , MP_PWM_PAIR_NUM_1 , MP_PWM_PAIR_NUM_2 , MP_PWM_PAIR_NUM_3 ,
  MP_PWM_PAIR_NUM_4 , MP_PWM_PAIR_NUM_5 , MP_PWM_PAIR_NUM_6 , MP_PWM_PAIR_NUM_7 ,
  MP_PWM_PAIR_NUM_8 , MP_PWM_PAIR_NUM_9 , MP_PWM_PAIR_NUM_10 , MP_PWM_PAIR_NUM_11 ,
  MP_PWM_PAIR_NUM_12 , MP_PWM_PAIR_NUM_13 , MP_PWM_PAIR_NUM_14 , MP_PWM_PAIR_NUM_15 ,
  MP_PWM_PAIR_NUM_MAX
}
 a pair of PWM index number(an abstract MAP sequence number) ; PWM对序号(MAP抽象序号) More...
 
enum  mp_pwm_index {
  MP_PWM_NUM_0 = 0 , MP_PWM_NUM_1 , MP_PWM_NUM_2 , MP_PWM_NUM_3 ,
  MP_PWM_NUM_4 , MP_PWM_NUM_5 , MP_PWM_NUM_6 , MP_PWM_NUM_7 ,
  MP_PWM_NUM_MAX
}
 The PWM index number(an abstract MAP sequence number) ;PWM序号(MAP抽象序号) More...
 
enum  mp_adc_index {
  MP_ADC_NUM_0 = 0 , MP_ADC_NUM_1 , MP_ADC_NUM_2 , MP_ADC_NUM_3 ,
  MP_ADC_NUM_4 , MP_ADC_NUM_5 , MP_ADC_NUM_6 , MP_ADC_NUM_7 ,
  MP_ADC_NUM_8 , MP_ADC_NUM_9 , MP_ADC_NUM_10 , MP_ADC_NUM_11 ,
  MP_ADC_NUM_12 , MP_ADC_NUM_13 , MP_ADC_NUM_14 , MP_ADC_NUM_15 ,
  MP_ADC_NUM_16 , MP_ADC_NUM_17 , MP_ADC_NUM_18 , MP_ADC_NUM_19 ,
  MP_ADC_NUM_20 , MP_ADC_NUM_21 , MP_ADC_NUM_22 , MP_ADC_NUM_23 ,
  MP_ADC_NUM_MAX
}
 ADC index number(an abstract MAP sequence number) ;ADC序号(MAP抽象序号) More...
 
enum  mp_pwm_pair_mode { MP_PWM_PAIR_MODE_REVERSE = 0 , MP_PWM_PAIR_MODE_CENTRAL , MP_PWM_PAIR_MODE_EDGE , MP_PWM_PAIR_MODE_MAX }
 The type of a pair of PWM(complementary mode, phase center aligned mode, edge aligned mode) ;PWM对模式类型(互补模式; 相位中心对齐模式; 边沿对齐模式) More...
 
enum  mp_pwm_pair_phase_angle {
  MP_PWM_PAIR_PHASE_ANGLE_0 = 0 , MP_PWM_PAIR_PHASE_ANGLE_180 = 2 , MP_PWM_PAIR_PHASE_ANGLE_120 = 3 , MP_PWM_PAIR_PHASE_ANGLE_90 = 4 ,
  MP_PWM_PAIR_PHASE_ANGLE_72 = 5 , MP_PWM_PAIR_PHASE_ANGLE_60 = 6 , MP_PWM_PAIR_PHASE_ANGLE_45 = 8 , MP_PWM_PAIR_PHASE_ANGLE_40 = 9 ,
  MP_PWM_PAIR_PHASE_ANGLE_36 = 10 , MP_PWM_PAIR_PHASE_ANGLE_30 = 12
}
 The phase Angle of a pair of PWM in phase center aligned mode ;PWM对相位中心对齐模式相位角度 More...
 
enum  mp_pwm_trigger_mode { MP_PWM_TRIGGER_MODE_OUTPUT = 0 , MP_PWM_TRIGGER_MODE_DMA }
 PWM TRGM mode(Output mode; DMA request mode) Output mode:TRGM output IO signal DMA request mode:TRGM output DMA request and then trigger DMA ;PWM互联触发模式(输出模式;DMA请求模式) 输出模式: 互联输出IO信号 DMA请求模式: 互联输出DMA请求,触发DMA. More...