1.10.15.2 1.11.16.2 1.12.16.2 1.13.15.2 1.16.12.2 1.17.12.2 1.18.12.2 1.19.12.2 1.20.12.2 1.21.13.2 1.22.17.2 1.23.16.2 1.24.14.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