EtherCAT SubDevice
 
Loading...
Searching...
No Matches

◆ EC_API_SLV_cbRegisterUserApplicationMainLoop()

uint32_t EC_API_SLV_cbRegisterUserApplicationMainLoop ( EC_API_SLV_SHandle_t pHandle,
EC_API_SLV_CBUsrApplicationMainLoop_t  cbFunc,
void *  pContext 
)

This is the function to register a function which runs application mainloop handler.

The callback function is called in a loop task and therefore should not consume too much time.

Parameters
[in]pHandleThe pointer to the EtherCAT API instance.
[in]cbFuncFunction pointer to the Application MainLoop Handler
[in]pContextusrApplicationMainLoop call context
Returns
uint32_t Returns the API error code.
Example
#include <ecSlvApi.h>
// the Call
uint32_t EC_API_SLV_cbRegisterUserApplicationMainLoop(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBUsrApplicationMainLoop_t cbFunc, void *pContext)
This is the function to register a function which runs application mainloop handler.
Definition ecSlvApi_ssc.c:50