1.11.16.2 OCMPx_FaultStatusGet Function

C

/* x = OCMP instance number */

bool OCMPx_FaultStatusGet (void)

Summary

Reads the fault status

Description

Returns the current state of the fault condition. When fault is detected, the PWM outputs are shut down asynchronously.

Precondition

OCMPx_Initialize() function must have been called first.

Parameters

None.

Returns

bool - status of the fault pin.

Example

bool status;
OCMP1_Initialize();
OCMP1_Enable();
status = OCMP1_FaultStatusGet();

Remarks

This function is applicable only for output compare mode (OCM) = 7 which is PWM mode with fault enabled