52 volatile uint16_t retval=1;
106 volatile uint16_t retval=1;
133 ((
volatile uint8_t*) &PCLKCON);
160 volatile uint16_t retval=1;
165 ((
volatile uint8_t*) &PCLKCON);
194 ((
volatile uint8_t*) &PG1CONL + ((pgInstance - 1) * P33C_PWMGEN_SFR_OFFSET));
218 volatile uint16_t pgInstance,
222 volatile uint16_t retval=1;
227 ((
volatile uint8_t*) &PG1CONL + ((pgInstance - 1) * P33C_PWMGEN_SFR_OFFSET));
252 volatile uint16_t retval=1;
292 volatile uint16_t retval=1;
318 volatile uint16_t retval=1;
319 volatile uint16_t timeout=0;
338 while((!PCLKCONbits.HRRDY) && (timeout++<5000));
339 if ((timeout >= 5000) || (PCLKCONbits.HRERR))
368 volatile uint16_t retval=1;
402 volatile uint16_t retval=1;
430 volatile uint16_t retval=1;
459 volatile uint16_t period
462 volatile uint16_t retval=1;
492 volatile uint16_t duty
495 volatile uint16_t retval=1;
526 volatile uint16_t dead_time_rising,
527 volatile uint16_t dead_time_falling
530 volatile uint16_t retval=1;
561 ((
volatile uint8_t*)&PG1CONL + ((pgInstance - 1) * P33C_PWMGEN_SFR_OFFSET));
582 volatile uint16_t retval=1;
589 retval = (
volatile uint16_t)
590 (((
volatile uint16_t)&pg->
PGxCONL - (
volatile uint16_t)&PG1CONL) / P33C_PWMGEN_SFR_OFFSET) + 1;
592 if (retval > P33C_PG_COUNT)
614 volatile uint16_t retval=1;
615 volatile uint16_t pgInstance;
622 pgInstance = (
volatile uint16_t)
623 (((
volatile uint16_t)&pg->
PGxCONL - (
volatile uint16_t)&PG1CONL) / P33C_PWMGEN_SFR_OFFSET + 1);
626 if (pgInstance > P33C_PG_COUNT)
628 else if (pgInstance > 4)
672 volatile uint16_t pgMotherTriggerOutput,
674 volatile bool ChildImmediateUpdate
677 volatile uint16_t retval=1;
678 volatile uint16_t pgMotherInstance=0;
679 volatile uint16_t pgChildInstance=0;
680 volatile uint16_t pgMotherGroup=0;
681 volatile uint16_t pgChildGroup=0;
682 volatile uint16_t pgInstance;
685 if ((pgHandleMother == NULL) || (pgHandleChild == NULL))
704 pgHandleMother->
PGxEVTL.
bits.PGTRGSEL = (pgMotherTriggerOutput & 0x0003);
707 pgHandleChild->
PGxCONH.
bits.UPDMOD = (0b010 | ChildImmediateUpdate);
725 if (pgMotherGroup == pgChildGroup)
730 if (pgMotherGroup == 1)
731 pgHandleChild->
PGxCONH.
bits.SOCS = pgMotherInstance;
732 else if (pgMotherGroup == 2)
733 pgHandleChild->
PGxCONH.
bits.SOCS = (pgMotherInstance - 4);
776 .vFSCL.value = 0x0000,
777 .vFSMINPER.value = 0x0000,
778 .vMPHASE.value = 0x0000,
779 .vMDC.value = 0x0000,
780 .vMPER.value = 0x0000,
781 .vLFSR.value = 0x0000,
782 .vCMBTRIGL.value = 0x0000,
783 .vCMBTRIGH.value = 0x0000,
784 .LOGCON_A.value = 0x0000,
785 .LOGCON_B.value = 0x0000,
786 .LOGCON_C.value = 0x0000,
787 .LOGCON_D.value = 0x0000,
788 .LOGCON_E.value = 0x0000,
789 .LOGCON_F.value = 0x0000,
790 .PWMEVT_A.value = 0x0000,
791 .PWMEVT_B.value = 0x0000,
792 .PWMEVT_C.value = 0x0000,
793 .PWMEVT_D.value = 0x0000,
794 .PWMEVT_E.value = 0x0000,
795 .PWMEVT_F.value = 0x0000
816 .vFSCL.value = 0x0000,
817 .vFSMINPER.value = 0x0000,
818 .vMPHASE.value = 0x0000,
819 .vMDC.value = 0x0000,
820 .vMPER.value = 0x0000,
821 .vLFSR.value = 0x0000,
822 .vCMBTRIGL.value = 0x0000,
823 .vCMBTRIGH.value = 0x0000,
824 .LOGCON_A.value = 0x0000,
825 .LOGCON_B.value = 0x0000,
826 .LOGCON_C.value = 0x0000,
827 .LOGCON_D.value = 0x0000,
828 .LOGCON_E.value = 0x0000,
829 .LOGCON_F.value = 0x0000,
830 .PWMEVT_A.value = 0x0000,
831 .PWMEVT_B.value = 0x0000,
832 .PWMEVT_C.value = 0x0000,
833 .PWMEVT_D.value = 0x0000,
834 .PWMEVT_E.value = 0x0000,
835 .PWMEVT_F.value = 0x0000
859 .PGxCONH.value = 0x0000,
860 .PGxSTAT.value = 0x0000,
861 .PGxIOCONL.value = 0x0000,
862 .PGxIOCONH.value = 0x0000,
863 .PGxEVTL.value = 0x0000,
864 .PGxEVTH.value = 0x0000,
865 .PGxFPCIL.value = 0x0000,
866 .PGxFPCIH.value = 0x0000,
867 .PGxCLPCIL.value = 0x0000,
868 .PGxCLPCIH.value = 0x0000,
869 .PGxFFPCIL.value = 0x0000,
870 .PGxFFPCIH.value = 0x0000,
871 .PGxSPCIL.value = 0x0000,
872 .PGxSPCIH.value = 0x0000,
873 .PGxLEBL.value = 0x0000,
874 .PGxLEBH.value = 0x0000,
875 .PGxPHASE.value = 0x0000,
876 .PGxDC.value = 0x0000,
877 .PGxDCA.value = 0x0000,
878 .PGxPER.value = 0x0000,
879 .PGxTRIGA.value = 0x0000,
880 .PGxTRIGB.value = 0x0000,
881 .PGxTRIGC.value = 0x0000,
882 .PGxDTL.value = 0x0000,
883 .PGxDTH.value = 0x0000,
884 .PGxCAP.value = 0x0000