Jump to main content

##

# 3.8.11 mcHalI_AdcCallBackRegister

## C

    /* ADC conversion complete interrupt callback function */
    void mcHalI_AdcCallBackRegister( ADC_CALLBACK callback, uintptr_t context )

## Summary

This function registers a callback function to be invoked upon the completion of an ADC conversion interrupt.

## Description

This function registers a callback function to be invoked upon ADC conversion completion, 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_AdcFinishedIsr( ADC_STATUS status, uintptr_t context )
    {
      /* Execute FOC tasks */
    }

    /* Register the ADC callback function*/
    mcHalI_AdcCallBackRegister(mcAppI_AdcFinishedIsr, (uintptr_t)NULL);

## Remarks

None.