Jump to main content

##

# 2.88.5 PTG_Initialize Function

## C

    void PTG_Initialize(void)

## Summary

Initializes PTG peripheral of the device.

## Description

This function initializes the PTG Peripheral Library (PLIB) of the device with the values configured in the Configurations Options GUI. Once the peripheral is initialized, Step Sequence APIs can be used to start the Step Sequence.

## Precondition

MCC GUI should be configured with the correct values.

## Parameters

None.

## Returns

None.

## Example

    void main(void)
       {
       PTG_Initialize();
       PTG_Enable();
       PTG_StartStepSequence();
         while (1)
         {
             PTG_SoftwareTriggerSet();
             bool wdtBit = PTG_WatchdogTimeoutStatusGet();
                 if(wdtBit){
                    PTG_StepSequenceStop();
                    PTG_Disable();
                   }
         }
       }

## Remarks

None.