PAN1080 Peripheral API
pan_pwm.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Panchip Technology Corp. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
14#ifndef __PAN_PWM_H__
15#define __PAN_PWM_H__
16
23#ifdef __cplusplus
24extern "C"
25{
26#endif
27
28
29#define PWM_CHANNEL_NUM (8)
34#define PWM_CH0 0x0
35#define PWM_CH1 0x1
36#define PWM_CH2 0x2
37#define PWM_CH3 0x3
38#define PWM_CH4 0x4
39#define PWM_CH5 0x5
40#define PWM_CH6 0x6
41#define PWM_CH7 0x7
44#if 0
45#define PWM_TRIGGER_ADC_CNTR_IS_0 PWM_ADCTCTL0_ZPTRGEN0_Msk
46#define PWM_TRIGGER_ADC_CNTR_IS_CMR_D PWM_ADCTCTL0_CDTRGEN0_Msk
47#define PWM_TRIGGER_ADC_CNTR_IS_CNR PWM_ADCTCTL0_CPTRGEN0_Msk
48#define PWM_TRIGGER_ADC_CNTR_IS_CMR_U PWM_ADCTCTL0_CUTRGEN0_Msk
49#endif
50
54typedef enum _PWM_ClkDivDef
55{
68{
78{
88{
98typedef enum _PWM_CntModeDef
99{
112__STATIC_INLINE void PWM_EnableOutput(PWM_T *pwm, uint32_t u32ChannelMask)
113{
114 pwm->POEN |= u32ChannelMask;
115}
116
124__STATIC_INLINE void PWM_DisableOutput(PWM_T *pwm, uint32_t u32ChannelMask)
125{
126 pwm->POEN &= ~u32ChannelMask;
127}
128
137__STATIC_INLINE void PWM_EnableDeadZone(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Duration)
138{
139 // every two channels shares the same setting
140 u32ChannelNum >>= 1;
141 // set duration
142 pwm->DTCTL = (pwm->DTCTL & ~(PWM_DTCTL_DTI01_Msk << (8 * u32ChannelNum))) | (u32Duration << (8 * u32ChannelNum));
143 // enable dead zone
144 pwm->CTL2 |= (PWM_CTL2_DTCNT01_Msk << u32ChannelNum);
145}
146
153__STATIC_INLINE void PWM_DisableDeadZone(PWM_T *pwm, uint32_t u32ChannelNum)
154{
155 // every two channels shares the same setting
156 u32ChannelNum >>= 1;
157 // enable dead zone
158 pwm->CTL2 &= ~(PWM_CTL2_DTCNT01_Msk << u32ChannelNum);
159}
160
167__STATIC_INLINE void PWM_EnableCMPDInt(PWM_T *pwm, uint32_t u32ChannelNum)
168{
169 (pwm)->INTEN |= ((1 << PWM_INTEN_CMPDIEN0_Pos) << u32ChannelNum);
170}
171
178__STATIC_INLINE void PWM_DisableCMPDInt(PWM_T *pwm, uint32_t u32ChannelNum)
179{
180 (pwm)->INTEN &= ~((1 << PWM_INTEN_CMPDIEN0_Pos) << u32ChannelNum);
181}
182
189__STATIC_INLINE void PWM_ClearCMPDIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
190{
191 pwm->INTSTS = (PWM_INTSTS_CMPDIF0_Msk << u32ChannelNum);
192}
193
202__STATIC_INLINE uint32_t PWM_GetCMPDIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
203{
204 return(pwm->INTSTS & (PWM_INTSTS_CMPDIF0_Msk << u32ChannelNum) ? 1 : 0);
205}
206
213__STATIC_INLINE void PWM_EnablePeriodInt(PWM_T *pwm, uint32_t u32ChannelNum)
214{
215 (pwm)->INTEN |= ((1 << PWM_INTEN_PIEN0_Pos) << u32ChannelNum);
216}
217
224__STATIC_INLINE void PWM_DisablePeriodInt(PWM_T *pwm, uint32_t u32ChannelNum)
225{
226 (pwm)->INTEN &= ~((1 << PWM_INTEN_PIEN0_Pos) << u32ChannelNum);
227}
228
235__STATIC_INLINE void PWM_ClearPeriodIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
236{
237 pwm->INTSTS = (PWM_INTSTS_PIF0_Msk << u32ChannelNum);
238}
239
248__STATIC_INLINE uint32_t PWM_GetPeriodIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
249{
250 return(pwm->INTSTS & (PWM_INTSTS_PIF0_Msk << u32ChannelNum) ? 1 : 0);
251}
252
253
254
261__STATIC_INLINE void PWM_EnableZeroInt(PWM_T *pwm, uint32_t u32ChannelNum)
262{
263 (pwm)->INTEN |= ((1 << PWM_INTEN_ZIEN0_Pos) << u32ChannelNum);
264}
265
272__STATIC_INLINE void PWM_DisableZeroInt(PWM_T *pwm, uint32_t u32ChannelNum)
273{
274 (pwm)->INTEN &= ~((1 << PWM_INTEN_ZIEN0_Pos) << u32ChannelNum);
275}
276
283__STATIC_INLINE void PWM_ClearZeroIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
284{
285 pwm->INTSTS = (PWM_INTSTS_ZIF0_Msk << u32ChannelNum);
286}
287
296__STATIC_INLINE uint32_t PWM_GetZeroIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
297{
298 return(pwm->INTSTS & (PWM_INTSTS_ZIF0_Msk << u32ChannelNum) ? 1 : 0);
299}
300//------------------------------------------------------
307__STATIC_INLINE void PWM_EnableCMPUInt(PWM_T *pwm, uint32_t u32ChannelNum)
308{
309 (pwm)->INTEN |= ((1 << PWM_INTEN_CMPUIEN0_Pos) << u32ChannelNum);
310}
311
318__STATIC_INLINE void PWM_DisableCMPUInt(PWM_T *pwm, uint32_t u32ChannelNum)
319{
320 (pwm)->INTEN &= ~((1 << PWM_INTEN_CMPUIEN0_Pos) << u32ChannelNum);
321}
322
329__STATIC_INLINE void PWM_ClearCMPUIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
330{
331 pwm->INTSTS = (PWM_INTSTS_CMPUIF0_Msk << u32ChannelNum);
332}
333
342__STATIC_INLINE uint32_t PWM_GetCMPUIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
343{
344 return (pwm->INTSTS & (PWM_INTSTS_CMPUIF0_Msk << u32ChannelNum) ? 1 : 0);
345}
346
357__STATIC_INLINE void PWM_EnableCenterInt(PWM_T *pwm, uint32_t u32ChannelNum, PWM_IntPeriodTypeDef IntPeriodType)
358{
359 pwm->CTL2 &= ~PWM_CTL2_PINTTYPE_Msk;
360 pwm->CTL2 |= (IntPeriodType << PWM_CTL2_PINTTYPE_Pos);
361 pwm->INTEN = (pwm->INTEN & ~(PWM_INTEN_PIEN0_Msk << u32ChannelNum)) | (PWM_INTEN_PIEN0_Msk << u32ChannelNum) ;
362}
363
370__STATIC_INLINE void PWM_DisableCenterInt(PWM_T *pwm, uint32_t u32ChannelNum)
371{
372 pwm->INTEN &= ~(PWM_INTEN_PIEN0_Msk << u32ChannelNum);
373}
374
381__STATIC_INLINE void PWM_ClearCenterIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
382{
383 pwm->INTSTS = (PWM_INTSTS_PIF0_Msk << u32ChannelNum);
384}
385
394__STATIC_INLINE uint32_t PWM_GetCenterIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
395{
396 return(pwm->INTSTS & (PWM_INTSTS_PIF0_Msk << u32ChannelNum) ? 1 : 0);
397}
398
404__STATIC_INLINE void PWM_EnableIndependentMode(PWM_T *pwm)
405{
406 pwm->CTL2 &= ~PWM_CTL2_MODE_Msk;
407}
413__STATIC_INLINE void PWM_EnableComplementaryMode(PWM_T *pwm)
414{
415 pwm->CTL2 = (pwm->CTL2 & ~PWM_CTL2_MODE_Msk) | (1UL << PWM_CTL2_MODE_Pos);
416}
417
423__STATIC_INLINE void PWM_DisableComplementaryMode(PWM_T *pwm)
424{
425 pwm->CTL2 &= ~PWM_CTL2_MODE_Msk;
426}
427
433__STATIC_INLINE void PWM_EnableGroupMode(PWM_T *pwm)
434{
435 pwm->CTL2 |= PWM_CTL2_GROUPEN_Msk;
436}
437
443__STATIC_INLINE void PWM_DisableGroupMode(PWM_T *pwm)
444{
445 pwm->CTL2 &= ~PWM_CTL2_GROUPEN_Msk;
446}
447
453__STATIC_INLINE void PWM_EnableSyncMode(PWM_T *pwm)
454{
455 pwm->CTL2 = (pwm->CTL2 & ~PWM_CTL2_MODE_Msk) | (2UL << PWM_CTL2_MODE_Pos);
456}
457
463__STATIC_INLINE void PWM_DisableSyncMode(PWM_T *pwm)
464{
465 pwm->CTL2 &= ~PWM_CTL2_MODE_Msk;
466}
467
477__STATIC_INLINE void PWM_SetPrescaler(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Prescaler)
478{
479 pwm->CLKPSC = (pwm->CLKPSC & ~(PWM_CLKPSC_CLKPSC01_Msk << ((u32ChannelNum >> 1) * 8))) | (u32Prescaler << ((u32ChannelNum >> 1) * 8));
480}
481
490__STATIC_INLINE void PWM_ResetPrescaler(PWM_T *pwm, uint32_t u32ChannelNum)
491{
492 pwm->CLKPSC &= ~(PWM_CLKPSC_CLKPSC01_Msk << ((u32ChannelNum >> 1) * 8));
493}
494
507__STATIC_INLINE void PWM_SetDivider(PWM_T *pwm, uint32_t u32ChannelNum, PWM_ClkDivDef Divider)
508{
509 pwm->CLKDIV = (pwm->CLKDIV & ~(PWM_CLKDIV_CLKDIV0_Msk << ((u32ChannelNum) * 4))) | (Divider << (u32ChannelNum * 4));
510}
511
520__STATIC_INLINE void PWM_SetCMR(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CMR)
521{
522 (*((__IO uint32_t *)((((uint32_t) & ((pwm)->CMPDAT0)) + u32ChannelNum * 4)))= (u32CMR & 0x0000FFFF)|(*((__IO uint32_t *)((((uint32_t) & ((pwm)->CMPDAT0)) + u32ChannelNum * 4))) & 0xFFFF0000));
523}
533__STATIC_INLINE void PWM_SetCNR(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CNR)
534{
535 (*((__IO uint32_t *) ((((uint32_t)&((pwm)->PERIOD0)) + (u32ChannelNum) * 4))) = (u32CNR));
536}
537
546__STATIC_INLINE void PWM_SetCMRD(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CMRD)
547{
548 (*((__IO uint32_t *)((((uint32_t) & ((pwm)->CMPDAT0)) + (u32ChannelNum) * 4)))= (u32CMRD << 16)|(*((__IO uint32_t *)((((uint32_t) & ((pwm)->CMPDAT0)) + (u32ChannelNum) * 4))) & 0x0000FFFF));
549}
550
560__STATIC_INLINE void PWM_SetAlignedType(PWM_T *pwm, uint32_t u32ChannelMask, PWM_AlignedTypeDef AlignedType)
561{
562 pwm->CTL2 = (pwm->CTL2 & ~PWM_CTL2_CNTTYPE_Msk) | (AlignedType << PWM_CTL2_CNTTYPE_Pos);
563}
564
570__STATIC_INLINE void PWM_EnableAsymmetricMode(PWM_T *pwm)
571{
572 pwm->CTL |= PWM_CTL_ASYMEN_Msk;
573}
574
580__STATIC_INLINE void PWM_DisableAsymmetricMode(PWM_T *pwm)
581{
582 pwm->CTL &= ~PWM_CTL_ASYMEN_Msk;
583}
584
590__STATIC_INLINE void PWM_EnablePCA(PWM_T *pwm)
591{
592 pwm->PCACTL |= PWM_PCACTL_PCAEN_Msk;
593}
594
600__STATIC_INLINE void PWM_DisablePCA(PWM_T *pwm)
601{
602 pwm->PCACTL &= ~PWM_PCACTL_PCAEN_Msk;
603}
604
612__STATIC_INLINE void PWM_SetCntMode(PWM_T *pwm, uint32_t u32ChannelNum, PWM_CntModeDef CntMode)
613{
614 pwm->CTL = (pwm->CTL & ~(PWM_CTL_CNTMODE0_Msk << (u32ChannelNum * 4))) | ((CntMode << PWM_CTL_CNTMODE0_Pos) << ((u32ChannelNum) * 4));
615}
616
628uint32_t PWM_ConfigOutputChannel(PWM_T *pwm,
629 uint32_t u32ChannelNum,
630 uint32_t u32Frequency,
631 uint32_t u32DutyCycle,
632 PWM_OperateTypeDef OperateType);
633
641void PWM_Start(PWM_T *pwm, uint32_t u32ChannelMask);
642
650void PWM_Stop(PWM_T *pwm, uint32_t u32ChannelMask);
651
659void PWM_ForceStop(PWM_T *pwm, uint32_t u32ChannelMask);
660
668void PWM_EnableOutputInverter(PWM_T *pwm, uint32_t u32ChannelMask);
669
677void PWM_DisableOutputInverter(PWM_T *pwm, uint32_t u32ChannelMask);
678
679
680#if 0
692void PWM_EnableADCTrigger(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition);
699void PWM_DisableADCTrigger(PWM_T *pwm, uint32_t u32ChannelNum);
707void PWM_ClearADCTriggerFlag(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition);
715uint32_t PWM_GetADCTriggerFlag (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition);
716#endif
717
718
719
722#ifdef __cplusplus
723}
724#endif
725
726#endif /* __PAN_PWM_H__ */
enum _PWM_AlignedTypeDef PWM_AlignedTypeDef
_PWM_AlignedTypeDef
Definition: pan_pwm.h:68
@ PWM_CENTER_ALIGNED
Definition: pan_pwm.h:70
@ PWM_EDGE_ALIGNED
Definition: pan_pwm.h:69
_PWM_ClkDivDef
Definition: pan_pwm.h:55
enum _PWM_ClkDivDef PWM_ClkDivDef
@ PWM_CLK_DIV_2
Definition: pan_pwm.h:57
@ PWM_CLK_DIV_4
Definition: pan_pwm.h:58
@ PWM_CLK_DIV_1
Definition: pan_pwm.h:56
@ PWM_CLK_DIV_8
Definition: pan_pwm.h:59
@ PWM_CLK_DIV_16
Definition: pan_pwm.h:60
_PWM_CntModeDef
Definition: pan_pwm.h:99
enum _PWM_CntModeDef PWM_CntModeDef
@ PWM_CNTMODE_ONE_SHOT
Definition: pan_pwm.h:100
@ PWM_CNTMODE_AUTO_RELOAD
Definition: pan_pwm.h:101
enum _PWM_OperateTypeDef PWM_OperateTypeDef
_PWM_OperateTypeDef
Definition: pan_pwm.h:88
@ OPERATION_EDGE_ALIGNED
Definition: pan_pwm.h:89
@ OPERATION_PRECISE_CENTER_ALIGNED
Definition: pan_pwm.h:91
@ OPERATION_CENTER_ALIGNED
Definition: pan_pwm.h:90
enum _PWM_IntPeriodTypeDef PWM_IntPeriodTypeDef
_PWM_IntPeriodTypeDef
Definition: pan_pwm.h:78
@ PWM_PERIOD_INT_UNDERFLOW
Definition: pan_pwm.h:79
@ PWM_PERIOD_INT_MATCH_CNR
Definition: pan_pwm.h:80
void PWM_ForceStop(PWM_T *pwm, uint32_t u32ChannelMask)
This function stop PWM generation immediately by clear channel enable bit.
__STATIC_INLINE void PWM_SetCNR(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CNR)
This function set the period of the selected channel.
Definition: pan_pwm.h:533
void PWM_Stop(PWM_T *pwm, uint32_t u32ChannelMask)
This function stop PWM module.
__STATIC_INLINE void PWM_ClearCMPDIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function clears Compare_Down interrupt flag of selected channel.
Definition: pan_pwm.h:189
__STATIC_INLINE void PWM_DisableOutput(PWM_T *pwm, uint32_t u32ChannelMask)
This function disables PWM output generation of selected channels.
Definition: pan_pwm.h:124
__STATIC_INLINE void PWM_EnableComplementaryMode(PWM_T *pwm)
This function enable complementary mode.
Definition: pan_pwm.h:413
__STATIC_INLINE void PWM_SetCMR(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32CMR)
This function set the duty of the selected channel.
Definition: pan_pwm.h:520
void PWM_EnableOutputInverter(PWM_T *pwm, uint32_t u32ChannelMask)
This function enable output inverter of specified channel(s)
__STATIC_INLINE void PWM_ClearZeroIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function clears Zero interrupt flag of selected channel.
Definition: pan_pwm.h:283
__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.
Definition: pan_pwm.h:546
__STATIC_INLINE void PWM_SetPrescaler(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Prescaler)
This function set the prescaler of the selected channel.
Definition: pan_pwm.h:477
__STATIC_INLINE void PWM_DisableCMPUInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function disable Compare_Up interrupt of selected channel.
Definition: pan_pwm.h:318
__STATIC_INLINE uint32_t PWM_GetCMPUIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function get Compare_Up interrupt flag of selected channel.
Definition: pan_pwm.h:342
__STATIC_INLINE uint32_t PWM_GetCMPDIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function get Compare_Down interrupt flag of selected channel.
Definition: pan_pwm.h:202
__STATIC_INLINE void PWM_SetDivider(PWM_T *pwm, uint32_t u32ChannelNum, PWM_ClkDivDef Divider)
This function set the divider of the selected channel.
Definition: pan_pwm.h:507
__STATIC_INLINE void PWM_EnableCMPUInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function enable Compare_Up interrupt of selected channel.
Definition: pan_pwm.h:307
__STATIC_INLINE void PWM_DisableAsymmetricMode(PWM_T *pwm)
This function disables PWM asymmetric mode.
Definition: pan_pwm.h:580
__STATIC_INLINE uint32_t PWM_GetPeriodIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function get Period interrupt flag of selected channel.
Definition: pan_pwm.h:248
__STATIC_INLINE void PWM_EnableCMPDInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function enable Compare_Down interrupt of selected channel.
Definition: pan_pwm.h:167
__STATIC_INLINE void PWM_DisableZeroInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function disable Zero interrupt of selected channel.
Definition: pan_pwm.h:272
__STATIC_INLINE void PWM_ClearCenterIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function clear Central interrupt of selected channel.
Definition: pan_pwm.h:381
__STATIC_INLINE void PWM_SetCntMode(PWM_T *pwm, uint32_t u32ChannelNum, PWM_CntModeDef CntMode)
This function set the CntMode of the selected channel.
Definition: pan_pwm.h:612
__STATIC_INLINE void PWM_EnablePCA(PWM_T *pwm)
This function enables PWM Precise Center-Aligned Type.
Definition: pan_pwm.h:590
__STATIC_INLINE uint32_t PWM_GetCenterIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function get Central interrupt of selected channel.
Definition: pan_pwm.h:394
__STATIC_INLINE void PWM_ClearPeriodIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function clears Period interrupt flag of selected channel.
Definition: pan_pwm.h:235
__STATIC_INLINE void PWM_EnableDeadZone(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Duration)
This function enable Dead zone of selected channel.
Definition: pan_pwm.h:137
__STATIC_INLINE void PWM_DisableCenterInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function disable Central interrupt of selected channel.
Definition: pan_pwm.h:370
__STATIC_INLINE void PWM_EnableCenterInt(PWM_T *pwm, uint32_t u32ChannelNum, PWM_IntPeriodTypeDef IntPeriodType)
This function enable Central interrupt of selected channel.
Definition: pan_pwm.h:357
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.
__STATIC_INLINE void PWM_EnableIndependentMode(PWM_T *pwm)
This function enable independent mode.
Definition: pan_pwm.h:404
__STATIC_INLINE void PWM_DisableComplementaryMode(PWM_T *pwm)
This function disable complementary mode, and enable independent mode.
Definition: pan_pwm.h:423
__STATIC_INLINE void PWM_ResetPrescaler(PWM_T *pwm, uint32_t u32ChannelNum)
This function reset the prescaler of the selected channel.
Definition: pan_pwm.h:490
__STATIC_INLINE void PWM_ClearCMPUIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function clears Compare_Up interrupt flag of selected channel.
Definition: pan_pwm.h:329
__STATIC_INLINE void PWM_DisableSyncMode(PWM_T *pwm)
This function disable synchronous mode, and enable independent mode.
Definition: pan_pwm.h:463
__STATIC_INLINE void PWM_DisablePCA(PWM_T *pwm)
This function disables PWM Precise Center-Aligned Type.
Definition: pan_pwm.h:600
void PWM_DisableOutputInverter(PWM_T *pwm, uint32_t u32ChannelMask)
This function disable output inverter of specified channel(s)
__STATIC_INLINE void PWM_EnableOutput(PWM_T *pwm, uint32_t u32ChannelMask)
This function enables PWM output generation of selected channels.
Definition: pan_pwm.h:112
void PWM_Start(PWM_T *pwm, uint32_t u32ChannelMask)
This function start PWM module.
__STATIC_INLINE void PWM_DisableCMPDInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function disable Compare_Down interrupt of selected channel.
Definition: pan_pwm.h:178
__STATIC_INLINE void PWM_DisableDeadZone(PWM_T *pwm, uint32_t u32ChannelNum)
This function disable Dead zone of selected channel.
Definition: pan_pwm.h:153
__STATIC_INLINE void PWM_DisableGroupMode(PWM_T *pwm)
This function disable group mode.
Definition: pan_pwm.h:443
__STATIC_INLINE uint32_t PWM_GetZeroIntFlag(PWM_T *pwm, uint32_t u32ChannelNum)
This function get Zero interrupt flag of selected channel.
Definition: pan_pwm.h:296
__STATIC_INLINE void PWM_EnablePeriodInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function enable Period interrupt of selected channel.
Definition: pan_pwm.h:213
__STATIC_INLINE void PWM_SetAlignedType(PWM_T *pwm, uint32_t u32ChannelMask, PWM_AlignedTypeDef AlignedType)
This function set the PWM aligned type.
Definition: pan_pwm.h:560
__STATIC_INLINE void PWM_DisablePeriodInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function disable Period interrupt of selected channel.
Definition: pan_pwm.h:224
__STATIC_INLINE void PWM_EnableAsymmetricMode(PWM_T *pwm)
This function enables PWM asymmetric mode.
Definition: pan_pwm.h:570
__STATIC_INLINE void PWM_EnableSyncMode(PWM_T *pwm)
This function enable synchronous mode.
Definition: pan_pwm.h:453
__STATIC_INLINE void PWM_EnableZeroInt(PWM_T *pwm, uint32_t u32ChannelNum)
This function enable Zero interrupt of selected channel.
Definition: pan_pwm.h:261
__STATIC_INLINE void PWM_EnableGroupMode(PWM_T *pwm)
This function enable group mode.
Definition: pan_pwm.h:433