PAN1080 Peripheral API
|
Pwm Interface. More...
Modules | |
Pwm channel number | |
Pwm channel number constants definitions. | |
Pwm clk divider | |
Pwm clk divider constants definitions. | |
Pwm aligned type | |
Pwm aligned type constants definitions. | |
Pwm period interrupt condition | |
Pwm period interrupt trigger condition constants definitions. | |
Pwm operate type | |
Pwm operate type constants definitions. | |
Pwm count mode | |
Pwm count mode constants definitions. | |
Macros | |
#define | PWM_CHANNEL_NUM (8) |
Functions | |
__STATIC_INLINE void | PWM_EnableOutput (PWM_T *pwm, uint32_t u32ChannelMask) |
This function enables PWM output generation of selected channels. More... | |
__STATIC_INLINE void | PWM_DisableOutput (PWM_T *pwm, uint32_t u32ChannelMask) |
This function disables PWM output generation of selected channels. More... | |
__STATIC_INLINE void | PWM_EnableDeadZone (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Duration) |
This function enable Dead zone of selected channel. More... | |
__STATIC_INLINE void | PWM_DisableDeadZone (PWM_T *pwm, uint32_t u32ChannelNum) |
This function disable Dead zone of selected channel. More... | |
__STATIC_INLINE void | PWM_EnableCMPDInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function enable Compare_Down interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_DisableCMPDInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function disable Compare_Down interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_ClearCMPDIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function clears Compare_Down interrupt flag of selected channel. More... | |
__STATIC_INLINE uint32_t | PWM_GetCMPDIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function get Compare_Down interrupt flag of selected channel. More... | |
__STATIC_INLINE void | PWM_EnablePeriodInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function enable Period interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_DisablePeriodInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function disable Period interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_ClearPeriodIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function clears Period interrupt flag of selected channel. More... | |
__STATIC_INLINE uint32_t | PWM_GetPeriodIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function get Period interrupt flag of selected channel. More... | |
__STATIC_INLINE void | PWM_EnableZeroInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function enable Zero interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_DisableZeroInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function disable Zero interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_ClearZeroIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function clears Zero interrupt flag of selected channel. More... | |
__STATIC_INLINE uint32_t | PWM_GetZeroIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function get Zero interrupt flag of selected channel. More... | |
__STATIC_INLINE void | PWM_EnableCMPUInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function enable Compare_Up interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_DisableCMPUInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function disable Compare_Up interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_ClearCMPUIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function clears Compare_Up interrupt flag of selected channel. More... | |
__STATIC_INLINE uint32_t | PWM_GetCMPUIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function get Compare_Up interrupt flag of selected channel. More... | |
__STATIC_INLINE void | PWM_EnableCenterInt (PWM_T *pwm, uint32_t u32ChannelNum, PWM_IntPeriodTypeDef IntPeriodType) |
This function enable Central interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_DisableCenterInt (PWM_T *pwm, uint32_t u32ChannelNum) |
This function disable Central interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_ClearCenterIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function clear Central interrupt of selected channel. More... | |
__STATIC_INLINE uint32_t | PWM_GetCenterIntFlag (PWM_T *pwm, uint32_t u32ChannelNum) |
This function get Central interrupt of selected channel. More... | |
__STATIC_INLINE void | PWM_EnableIndependentMode (PWM_T *pwm) |
This function enable independent mode. More... | |
__STATIC_INLINE void | PWM_EnableComplementaryMode (PWM_T *pwm) |
This function enable complementary mode. More... | |
__STATIC_INLINE void | PWM_DisableComplementaryMode (PWM_T *pwm) |
This function disable complementary mode, and enable independent mode. More... | |
__STATIC_INLINE void | PWM_EnableGroupMode (PWM_T *pwm) |
This function enable group mode. More... | |
__STATIC_INLINE void | PWM_DisableGroupMode (PWM_T *pwm) |
This function disable group mode. More... | |
__STATIC_INLINE void | PWM_EnableSyncMode (PWM_T *pwm) |
This function enable synchronous mode. More... | |
__STATIC_INLINE void | PWM_DisableSyncMode (PWM_T *pwm) |
This function disable synchronous mode, and enable independent mode. More... | |
__STATIC_INLINE void | PWM_SetPrescaler (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Prescaler) |
This function set the prescaler of the selected channel. More... | |
__STATIC_INLINE void | PWM_ResetPrescaler (PWM_T *pwm, uint32_t u32ChannelNum) |
This function reset the prescaler of the selected channel. More... | |
__STATIC_INLINE void | PWM_SetDivider (PWM_T *pwm, uint32_t u32ChannelNum, PWM_ClkDivDef Divider) |
This function set the divider of the selected channel. More... | |
__STATIC_INLINE void | PWM_SetCMR (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CMR) |
This function set the duty of the selected channel. More... | |
__STATIC_INLINE void | PWM_SetCNR (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CNR) |
This function set the period of the selected channel. More... | |
__STATIC_INLINE void | PWM_SetCMRD (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CMRD) |
This function set the duty of the selected channel for PWM asymmetric Mode. More... | |
__STATIC_INLINE void | PWM_SetAlignedType (PWM_T *pwm, uint32_t u32ChannelMask, PWM_AlignedTypeDef AlignedType) |
This function set the PWM aligned type. More... | |
__STATIC_INLINE void | PWM_EnableAsymmetricMode (PWM_T *pwm) |
This function enables PWM asymmetric mode. More... | |
__STATIC_INLINE void | PWM_DisableAsymmetricMode (PWM_T *pwm) |
This function disables PWM asymmetric mode. More... | |
__STATIC_INLINE void | PWM_EnablePCA (PWM_T *pwm) |
This function enables PWM Precise Center-Aligned Type. More... | |
__STATIC_INLINE void | PWM_DisablePCA (PWM_T *pwm) |
This function disables PWM Precise Center-Aligned Type. More... | |
__STATIC_INLINE void | PWM_SetCntMode (PWM_T *pwm, uint32_t u32ChannelNum, PWM_CntModeDef CntMode) |
This function set the CntMode of the selected channel. More... | |
uint32_t | PWM_ConfigOutputChannel (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle, PWM_OperateTypeDef OperateType) |
This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode. More... | |
void | PWM_Start (PWM_T *pwm, uint32_t u32ChannelMask) |
This function start PWM module. More... | |
void | PWM_Stop (PWM_T *pwm, uint32_t u32ChannelMask) |
This function stop PWM module. More... | |
void | PWM_ForceStop (PWM_T *pwm, uint32_t u32ChannelMask) |
This function stop PWM generation immediately by clear channel enable bit. More... | |
void | PWM_EnableOutputInverter (PWM_T *pwm, uint32_t u32ChannelMask) |
This function enable output inverter of specified channel(s) More... | |
void | PWM_DisableOutputInverter (PWM_T *pwm, uint32_t u32ChannelMask) |
This function disable output inverter of specified channel(s) More... | |
Pwm Interface.
#define PWM_CHANNEL_NUM (8) |
PWM channel number
__STATIC_INLINE void PWM_ClearCenterIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function clear Central interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_ClearCMPDIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function clears Compare_Down interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_ClearCMPUIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function clears Compare_Up interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_ClearPeriodIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function clears Period interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_ClearZeroIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function clears Zero interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
uint32_t PWM_ConfigOutputChannel | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Frequency, | ||
uint32_t | u32DutyCycle, | ||
PWM_OperateTypeDef | OperateType | ||
) |
This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | u32Frequency | Target generator frequency |
[in] | u32DutyCycle | Target generator duty cycle percentage. Valid range are between 0 ~ 100. 10 means 10%, 20 means 20%... |
[in] | OperateType | Target operation type.Valid value Edge-aligned,Center-Aligned,Precise Center-Aligned |
__STATIC_INLINE void PWM_DisableAsymmetricMode | ( | PWM_T * | pwm | ) |
This function disables PWM asymmetric mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_DisableCenterInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function disable Central interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_DisableCMPDInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function disable Compare_Down interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_DisableCMPUInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function disable Compare_Up interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_DisableComplementaryMode | ( | PWM_T * | pwm | ) |
This function disable complementary mode, and enable independent mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_DisableDeadZone | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function disable Dead zone of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_DisableGroupMode | ( | PWM_T * | pwm | ) |
This function disable group mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_DisableOutput | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function disables PWM output generation of selected channels.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Set bit 0 to 1 disables channel 0 output, set bit 1 to 1 disables channel 1 output... |
void PWM_DisableOutputInverter | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function disable output inverter of specified channel(s)
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of channels to disable. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
__STATIC_INLINE void PWM_DisablePCA | ( | PWM_T * | pwm | ) |
This function disables PWM Precise Center-Aligned Type.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_DisablePeriodInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function disable Period interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_DisableSyncMode | ( | PWM_T * | pwm | ) |
This function disable synchronous mode, and enable independent mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_DisableZeroInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function disable Zero interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_EnableAsymmetricMode | ( | PWM_T * | pwm | ) |
This function enables PWM asymmetric mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_EnableCenterInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
PWM_IntPeriodTypeDef | IntPeriodType | ||
) |
This function enable Central interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | IntPeriodType | Period interrupt type, could be either |
__STATIC_INLINE void PWM_EnableCMPDInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function enable Compare_Down interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_EnableCMPUInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function enable Compare_Up interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_EnableComplementaryMode | ( | PWM_T * | pwm | ) |
This function enable complementary mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_EnableDeadZone | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Duration | ||
) |
This function enable Dead zone of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | u32Duration | Dead Zone length in PWM clock count, valid values are between 0~0xFF, but 0 means there is no dead zone. |
__STATIC_INLINE void PWM_EnableGroupMode | ( | PWM_T * | pwm | ) |
This function enable group mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_EnableIndependentMode | ( | PWM_T * | pwm | ) |
This function enable independent mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_EnableOutput | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function enables PWM output generation of selected channels.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. Set bit 0 to 1 enables channel 0 output, set bit 1 to 1 enables channel 1 output... |
void PWM_EnableOutputInverter | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function enable output inverter of specified channel(s)
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
__STATIC_INLINE void PWM_EnablePCA | ( | PWM_T * | pwm | ) |
This function enables PWM Precise Center-Aligned Type.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_EnablePeriodInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function enable Period interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_EnableSyncMode | ( | PWM_T * | pwm | ) |
This function enable synchronous mode.
[in] | pwm | The base address of PWM module |
__STATIC_INLINE void PWM_EnableZeroInt | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function enable Zero interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
void PWM_ForceStop | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function stop PWM generation immediately by clear channel enable bit.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1... |
__STATIC_INLINE uint32_t PWM_GetCenterIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function get Central interrupt of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
0 | Central interrupt did not occurred |
1 | Central interrupt occurred |
__STATIC_INLINE uint32_t PWM_GetCMPDIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function get Compare_Down interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
0 | Compare_Down interrupt did not occurred |
1 | Compare_Down interrupt occurred |
__STATIC_INLINE uint32_t PWM_GetCMPUIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function get Compare_Up interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
0 | Compare_Up interrupt did not occurred |
1 | Compare_Up interrupt occurred |
__STATIC_INLINE uint32_t PWM_GetPeriodIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function get Period interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
0 | Period interrupt did not occurred |
1 | Period interrupt occurred |
__STATIC_INLINE uint32_t PWM_GetZeroIntFlag | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function get Zero interrupt flag of selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
0 | Zero interrupt did not occurred |
1 | Zero interrupt occurred |
__STATIC_INLINE void PWM_ResetPrescaler | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum | ||
) |
This function reset the prescaler of the selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
__STATIC_INLINE void PWM_SetAlignedType | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask, | ||
PWM_AlignedTypeDef | AlignedType | ||
) |
This function set the PWM aligned type.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | This parameter is not used |
[in] | AlignedType | PWM aligned type, valid values are: |
__STATIC_INLINE void PWM_SetCMR | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32CMR | ||
) |
This function set the duty of the selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | u32CMR | Duty of specified channel. Valid values are between 0~0xFFFF |
__STATIC_INLINE void PWM_SetCMRD | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32CMRD | ||
) |
This function set the duty of the selected channel for PWM asymmetric Mode.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | u32CMRD | Down counter in Asymmetric Mode. Valid values are between 0~0xFFFF |
__STATIC_INLINE void PWM_SetCNR | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32CNR | ||
) |
This function set the period of the selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | u32CNR | Period of specified channel. Valid values are between 0~0xFFFF |
__STATIC_INLINE void PWM_SetCntMode | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
PWM_CntModeDef | CntMode | ||
) |
This function set the CntMode of the selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | CntMode | PWM cntmode select. Valid value 0:one shot,1:auto reload |
__STATIC_INLINE void PWM_SetDivider | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
PWM_ClkDivDef | Divider | ||
) |
This function set the divider of the selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | Divider | Clock divider of specified channel. Valid values are |
__STATIC_INLINE void PWM_SetPrescaler | ( | PWM_T * | pwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Prescaler | ||
) |
This function set the prescaler of the selected channel.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelNum | PWM channel number. Valid values are between 0~7 |
[in] | u32Prescaler | Clock prescaler of specified channel. Valid values are between 1 ~ 0xFF |
void PWM_Start | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function start PWM module.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1... |
void PWM_Stop | ( | PWM_T * | pwm, |
uint32_t | u32ChannelMask | ||
) |
This function stop PWM module.
[in] | pwm | The base address of PWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1... |