1.2.6.4.12 SRV_USI_CALLBACK Typedef

C

typedef void ( * SRV_USI_CALLBACK ) ( uint8_t *pData, size_t length );

Summary

Pointer to an USI service callback function.

Description

This data type defines a pointer to an USI service callback function, thus defining the function signature. Clients of the USI service can register callback functions for a specific USI protocol with SRV_USI_CallbackRegister function. That function will be called back when a new message is received and it belongs to the specified USI protocol.

Parameters

ParamDescription
pDataPointer to data payload of the received USI message
lengthLength in bytes of data payload of the received USI message

Returns

None.

Example

void APP_USIPhyProtocolEventHandler(uint8_t *pData, size_t length)
{
    /* Message received from external tool */
}

// 'handle', returned from SRV_USI_Open previously called
SRV_USI_CallbackRegister(handle, SRV_USI_PROT_ID_PHY, APP_USIPhyProtocolEventHandler);

Remarks

None.