Jump to main content

##

# 3.8.4 mcHalI_PwmCallbackRegister

## C

    /* PWM fault interrupt callback function */
    void mcHalI_PwmCallbackRegister( TCC_CALLBACK callback, uintptr_t context )

## Summary

This function registers a callback function to be invoked upon a PWM fault interrupt.

## Description

This function registers a callback function to be invoked upon a PWM fault, utilizing the QSpin GUI-configured peripheral API.

## Precondition

None.

## Parameters

Param | Description
--- | ---
callback | callback function pointer.
context | Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients)

## Returns

None

## Example

    void mcAppI_OverCurrentReactionIsr( TCC_CALLBACK callback, uintptr_t context )
    {
      /* Execute over current reaction ISR */
    }

    /* Register the PWM fault callback function*/
    mcHalI_PwmCallbackRegister( (TCC_CALLBACK)mcAppI_OverCurrentReactionIsr, (uintptr_t)NULL);

## Remarks

None.