Jump to main content

##

# 2.109.13 SENTx_TransmitCompleteCallbackRegister Function

## C

    /* x refers to the instance number */

    void SENTx_TransmitCompleteCallbackRegister(SENT_TRANSMIT_COMPLETE_CALLBACK callback_fn, uintptr_t context)

## Summary

Registers a callback function to be called upon completing transmission for the SENTx Peripheral when it acts as a transmitter.

## Description

This function registers a callback upon completing transmission. The callback function allows the user to define custom actions to be taken when the trasnmission is complete.

## Precondition

Ensure that the SENTx is properly initialized and configured before calling this function. The function does not perform any error checking related to the initialization state of the SENT instance.

## Parameters

Param | Description
callback_fn | The user-defined callback function to be registered. This function should match the signature defined by "SENT_ERROR_CALLBACK".
context | A user-defined context value that will be passed to the callback function when it is invoked. This can be used to provide additional information or state to the callback function.

## Returns

None.

## Example

    void MyTransmitCompleteCallback(uintptr_t context) {
         /*Custom actions to be taken upon completing transmission
         The context parameter can be used to access additional information or state*/
    }

         /*Initialize and configure the SENT instance*/
          SENT1_Initialize();
         /*Register the transmit complete callback*/
         SENT1_TransmitCompleteCallbackRegister(MyReceiveCompleteCallback, (uintptr_t)myContext);

## Remarks

None.