44 #ifndef P33C_PWM_SFR_ABSTRACTION_H
45 #define P33C_PWM_SFR_ABSTRACTION_H
84 #ifndef P33C_PWM_MODULE_s
89 struct tagPCLKCONBITS
bits;
130 struct tagCMBTRIGLBITS
bits;
134 struct tagCMBTRIGHBITS
bits;
138 struct tagLOGCONABITS
bits;
142 struct tagLOGCONABITS
bits;
146 struct tagLOGCONABITS
bits;
150 struct tagLOGCONABITS
bits;
154 struct tagLOGCONABITS
bits;
158 struct tagLOGCONABITS
bits;
162 struct tagPWMEVTABITS
bits;
166 struct tagPWMEVTABITS
bits;
170 struct tagPWMEVTABITS
bits;
174 struct tagPWMEVTABITS
bits;
178 struct tagPWMEVTABITS
bits;
182 struct tagPWMEVTABITS
bits;
193 #ifndef P33C_PWM_GENERATOR_s
197 struct tagPG1CONLBITS
bits;
201 struct tagPG1CONHBITS
bits;
205 struct tagPG1STATBITS
bits;
209 struct tagPG1IOCONLBITS
bits;
213 struct tagPG1IOCONHBITS
bits;
217 struct tagPG1EVTLBITS
bits;
221 struct tagPG1EVTHBITS
bits;
225 struct tagPG1FPCILBITS
bits;
229 struct tagPG1FPCIHBITS
bits;
233 struct tagPG1CLPCILBITS
bits;
237 struct tagPG1CLPCIHBITS
bits;
241 struct tagPG1FFPCILBITS
bits;
245 struct tagPG1FFPCIHBITS
bits;
249 struct tagPG1SPCILBITS
bits;
253 struct tagPG1SPCIHBITS
bits;
263 struct tagPG1LEBHBITS
bits;
279 struct tagPG1DCABITS
bits;
307 struct tagPG1DTLBITS
bits;
311 struct tagPG1DTHBITS
bits;
323 #define P33C_PWMGEN_SFR_OFFSET ((volatile uint16_t)&PG2CONL - (volatile uint16_t)&PG1CONL)
328 #if defined (PG8CONL)
329 #define P33C_PG_COUNT 8
330 #elif defined (PG4CONL)
331 #define P33C_PG_COUNT 4
377 volatile uint16_t period);
379 volatile uint16_t duty);
381 volatile uint16_t dead_time_rising,
volatile uint16_t dead_time_falling);
385 volatile uint16_t pgMotherTriggerOutput,
387 volatile bool ChildImmediateUpdate
volatile uint16_t p33c_PwmGenerator_SetDeadTimes(volatile struct P33C_PWM_GENERATOR_s *pg, volatile uint16_t dead_time_rising, volatile uint16_t dead_time_falling)
Sets the dead-times of a given PWM generator.
volatile uint16_t p33c_PwmGenerator_SetDutyCycle(volatile struct P33C_PWM_GENERATOR_s *pg, volatile uint16_t duty)
Sets the on-time of a given PWM generator.
volatile uint16_t p33c_PwmGenerator_SetPeriod(volatile struct P33C_PWM_GENERATOR_s *pg, volatile uint16_t period)
Sets the period of a given PWM generator.
volatile uint16_t p33c_PwmGenerator_Suspend(volatile struct P33C_PWM_GENERATOR_s *pg)
Disables the PWM generator outputs but keeps the module running.
volatile struct P33C_PWM_MODULE_s * p33c_PwmModule_GetHandle(void)
Gets pointer to PWM module SFR set.
volatile struct P33C_PWM_GENERATOR_s * p33c_PwmGenerator_GetHandle(volatile uint16_t pgInstance)
Returns the PWM generator index.
volatile struct P33C_PWM_MODULE_s p33c_PwmModule_ConfigRead(void)
Read the current configuration from the PWM base module registers.
volatile uint16_t p33c_PwmGenerator_Dispose(volatile uint16_t pgInstance)
Disposes a given PWM generator by resetting all its registers to default.
volatile uint16_t p33c_PwmGenerator_GetInstance(volatile struct P33C_PWM_GENERATOR_s *pg)
Get the PWM generator instance index of a known PWM object pointer address.
volatile uint16_t p33c_PwmModule_Dispose(void)
Resets all PWM base module registers to their RESET default values.
volatile uint16_t p33c_PwmGenerator_Enable(volatile struct P33C_PWM_GENERATOR_s *pg)
Enables a given PWM generator with output pins disabled.
volatile uint16_t p33c_PwmGenerator_Resume(volatile struct P33C_PWM_GENERATOR_s *pg)
Disables a PWM generator IOs.
volatile uint16_t p33c_PwmGenerator_Initialize(volatile uint16_t pgInstance)
Initializes a given PWM generator by resetting all its registers to default.
volatile uint16_t p33c_PwmModule_ConfigWrite(volatile struct P33C_PWM_MODULE_s pwmConfig)
Writes a user-defined configuration to the PWM base module registers.
volatile uint16_t p33c_PwmGenerator_SyncGenerators(volatile struct P33C_PWM_GENERATOR_s *pgHandleMother, volatile uint16_t pgMotherTriggerOutput, volatile struct P33C_PWM_GENERATOR_s *pgHandleChild, volatile bool ChildImmediateUpdate)
Sets the synchronization triggers of two PWM generators, of which the Mother PWM generator is the tri...
volatile uint16_t p33c_PwmGenerator_ConfigWrite(volatile uint16_t pgInstance, volatile struct P33C_PWM_GENERATOR_s pgConfig)
Disposes a given PWM generator by resetting all its registers to default.
volatile uint16_t p33c_PwmModule_Initialize(void)
Initializes the PWM base module by resetting all its registers to default.
volatile uint16_t p33c_PwmGenerator_Disable(volatile struct P33C_PWM_GENERATOR_s *pg)
Disables a given PWM generator.
volatile struct P33C_PWM_GENERATOR_s p33c_PwmGenerator_ConfigRead(volatile uint16_t pgInstance)
Disposes a given PWM generator by resetting all its registers to default.
volatile uint16_t p33c_PwmGenerator_GetGroup(volatile struct P33C_PWM_GENERATOR_s *pg)
Get the PWM generator group.
volatile struct P33C_PWM_GENERATOR_s pgConfigClear
Default RESET configuration of one PWM generator instance SFRs.
volatile struct P33C_PWM_MODULE_s pwmConfigDefault
Default initialization configuration of the PWM module SFRs.
volatile struct P33C_PWM_MODULE_s pwmConfigClear
Default RESET configuration of the PWM module SFRs.
struct tagPCLKCONBITS bits
union P33C_PWM_MODULE_s::@60 LOGCON_C
union P33C_PWM_MODULE_s::@67 PWMEVT_D
union P33C_PWM_MODULE_s::@63 LOGCON_F
union P33C_PWM_MODULE_s::@56 vCMBTRIGL
union P33C_PWM_MODULE_s::@53 vMDC
union P33C_PWM_MODULE_s::@62 LOGCON_E
union P33C_PWM_MODULE_s::@57 vCMBTRIGH
union P33C_PWM_MODULE_s::@52 vMPHASE
union P33C_PWM_MODULE_s::@61 LOGCON_D
union P33C_PWM_MODULE_s::@66 PWMEVT_C
union P33C_PWM_MODULE_s::@64 PWMEVT_A
union P33C_PWM_MODULE_s::@55 vLFSR
union P33C_PWM_MODULE_s::@51 vFSMINPER
union P33C_PWM_MODULE_s::@58 LOGCON_A
union P33C_PWM_MODULE_s::@68 PWMEVT_E
union P33C_PWM_MODULE_s::@50 vFSCL
union P33C_PWM_MODULE_s::@54 vMPER
union P33C_PWM_MODULE_s::@65 PWMEVT_B
union P33C_PWM_MODULE_s::@59 LOGCON_B
union P33C_PWM_MODULE_s::@69 PWMEVT_F
union P33C_PWM_MODULE_s::@49 vPCLKCON
union P33C_PWM_GENERATOR_s::@86 PGxCLPCIH
union P33C_PWM_GENERATOR_s::@82 PGxEVTH
union P33C_PWM_GENERATOR_s::@102 PGxCAP
union P33C_PWM_GENERATOR_s::@90 PGxSPCIH
union P33C_PWM_GENERATOR_s::@93 PGxPHASE
union P33C_PWM_GENERATOR_s::@96 PGxPER
union P33C_PWM_GENERATOR_s::@97 PGxTRIGA
union P33C_PWM_GENERATOR_s::@77 PGxCONH
union P33C_PWM_GENERATOR_s::@79 PGxIOCONL
union P33C_PWM_GENERATOR_s::@99 PGxTRIGC
union P33C_PWM_GENERATOR_s::@91 PGxLEBL
union P33C_PWM_GENERATOR_s::@83 PGxFPCIL
union P33C_PWM_GENERATOR_s::@87 PGxFFPCIL
union P33C_PWM_GENERATOR_s::@78 PGxSTAT
union P33C_PWM_GENERATOR_s::@80 PGxIOCONH
struct tagPG1CONLBITS bits
union P33C_PWM_GENERATOR_s::@92 PGxLEBH
union P33C_PWM_GENERATOR_s::@84 PGxFPCIH
union P33C_PWM_GENERATOR_s::@81 PGxEVTL
union P33C_PWM_GENERATOR_s::@101 PGxDTH
union P33C_PWM_GENERATOR_s::@76 PGxCONL
union P33C_PWM_GENERATOR_s::@95 PGxDCA
union P33C_PWM_GENERATOR_s::@100 PGxDTL
union P33C_PWM_GENERATOR_s::@98 PGxTRIGB
union P33C_PWM_GENERATOR_s::@89 PGxSPCIL
union P33C_PWM_GENERATOR_s::@94 PGxDC
union P33C_PWM_GENERATOR_s::@85 PGxCLPCIL
union P33C_PWM_GENERATOR_s::@88 PGxFFPCIH