32 #ifndef __STC8x_MPWM_H_
33 #define __STC8x_MPWM_H_
44 #if (PER_LIB_MCU_MUODEL == STC8Gx)
54 #ifndef PER_LIB_MCU_MUODEL
57 #define PER_LIB_MCU_MUODEL STC8Gx
61 #ifndef PER_LIB_MPWM_CTRL
64 #define PER_LIB_MPWM_CTRL 1
68 #ifndef PER_LIB_MPWM_INIT_CTRL
71 #define PER_LIB_MPWM_INIT_CTRL 1
75 #ifndef PER_LIB_MPWM_NVIC_CTRL
78 #define PER_LIB_MPWM_NVIC_CTRL 1
82 #ifndef PER_LIB_MPWM_WORK_CTRL
85 #define PER_LIB_MPWM_WORK_CTRL 1
89 #if (PER_LIB_MCU_MUODEL == STC8Gx)
BOOL
Definition: ELL_CORE.h:50
FSCSTATE
Definition: ELL_CORE.h:65
unsigned int uint16_t
Definition: ELL_TYPE.h:73
MPWMStartLevel_Type
Definition: STC8x_MPWM.h:126
@ MPWM_Start_High_Level
Definition: STC8x_MPWM.h:128
@ MPWM_Start_Low_Level
Definition: STC8x_MPWM.h:127
FSCSTATE MPWMn_Port_Init(MPWMPort_Type port, MPWMCLKSrc_Type clkSrc, uint16_t period)
PWM端口初始化函数。Init PWM port function.
Definition: STC8x_MPWM.c:208
FSCSTATE MPWMn_Stop(MPWMPort_Type port)
指定PWM端口停止工作。Stop specified PWM port working.
Definition: STC8x_MPWM.c:288
MPWMChannel_Type
Definition: STC8x_MPWM.h:149
@ MPWM_Channel_1
Definition: STC8x_MPWM.h:151
@ MPWM_Channel_0
Definition: STC8x_MPWM.h:150
@ MPWM_Channel_7
Definition: STC8x_MPWM.h:157
@ MPWM_Channel_2
Definition: STC8x_MPWM.h:152
@ MPWM_Channel_5
Definition: STC8x_MPWM.h:155
@ MPWM_Channel_3
Definition: STC8x_MPWM.h:153
@ MPWM_Channel_6
Definition: STC8x_MPWM.h:156
@ MPWM_Channel_4
Definition: STC8x_MPWM.h:154
FSCSTATE MPWMn_Channel_Init(MPWMPort_Type port, MPWMChannel_Type ch, MPWMStartLevel_Type level, uint16_t fValue, uint16_t sValue, BOOL run)
PWM通道初始化函数。Init PWM channel function.
Definition: STC8x_MPWM.c:234
MPWMPort_Type
Definition: STC8x_MPWM.h:135
@ MPWM_Port_5
Definition: STC8x_MPWM.h:141
@ MPWM_Port_0
Definition: STC8x_MPWM.h:136
@ MPWM_Port_2
Definition: STC8x_MPWM.h:138
@ MPWM_Port_1
Definition: STC8x_MPWM.h:137
@ MPWM_Port_4
Definition: STC8x_MPWM.h:140
@ MPWM_Port_3
Definition: STC8x_MPWM.h:139
MPWMCLKSrc_Type
MPWM系统时钟选择枚举体。
Definition: STC8x_MPWM.h:101
@ MPWM_SCLK_DIV_14
Definition: STC8x_MPWM.h:115
@ MPWM_SCLK_DIV_16
Definition: STC8x_MPWM.h:117
@ MPWM_SCLK_DIV_4
Definition: STC8x_MPWM.h:105
@ MPWM_SCLK_DIV_7
Definition: STC8x_MPWM.h:108
@ MPWM_TIMER2_PULSE
Definition: STC8x_MPWM.h:118
@ MPWM_SCLK_DIV_6
Definition: STC8x_MPWM.h:107
@ MPWM_SCLK_DIV_9
Definition: STC8x_MPWM.h:110
@ MPWM_SCLK_DIV_3
Definition: STC8x_MPWM.h:104
@ MPWM_SCLK_DIV_13
Definition: STC8x_MPWM.h:114
@ MPWM_SCLK_DIV_1
Definition: STC8x_MPWM.h:102
@ MPWM_SCLK_DIV_10
Definition: STC8x_MPWM.h:111
@ MPWM_SCLK_DIV_15
Definition: STC8x_MPWM.h:116
@ MPWM_SCLK_DIV_8
Definition: STC8x_MPWM.h:109
@ MPWM_SCLK_DIV_2
Definition: STC8x_MPWM.h:103
@ MPWM_SCLK_DIV_12
Definition: STC8x_MPWM.h:113
@ MPWM_SCLK_DIV_5
Definition: STC8x_MPWM.h:106
@ MPWM_SCLK_DIV_11
Definition: STC8x_MPWM.h:112
FSCSTATE MPWMn_Run(MPWMPort_Type port)
指定PWM端口开始工作。Run specified PWM port.
Definition: STC8x_MPWM.c:273