EtherCAT Slave  1.06.01
ecSlvESI.c

EtherCAT® Slave Example Application

Author
KUNBUS GmbH
Date
2020-06-19
#define HAVEDISPLAY 0
/*-----------------------------------------------------------------------------------------
------
------ Includes
------
-----------------------------------------------------------------------------------------*/
#include <ecApiDef.h>
#include <ecSlvESI.h>
#include <ESL_os.h>
#include <ESL_BOARD_config.h>
#include <ESL_vendor.h>
#include <ESL_phyLibTlk110.h>
#include <ESL_gpioHelper.h>
#include <ESL_foeDemo.h>
#include <ESL_soeDemo.h>
#include <ESL_eeprom.h>
#include <ESL_cia402Demo.h>
#include <ESL_esiParser.h>
#if (defined HAVEDISPLAY) && (HAVEDISPLAY==1)
#include <oled_drv.h>
#endif
#include <ecSlvApi.h>
#if !(defined MBXMEM)
#define MBXMEM
#endif
#ifdef OSAL_LINUX
#define SITARA_ESI_FILE "sitara.xml"
#define FAULHABER_ESI_FILE "Faulhaber_MC5004_012601_06.xml"
#define WEIDMULLER_ESI_FILE "Weidmueller_UR20_FBC.xml"
#define KUNBUS_ESI_FILE "Gateway_Component_EtherCAT_R02.xml"
#define PILZ_ESI_FILE "KUNBUS-PNOZ_m_ES_EtherCAT_V1_1.xml"
#else
#include "Sitara_Slave_Simple_CiA402.h"
#endif
/*-----------------------------------------------------------------------------------------
------
------ local variables and constants
------
-----------------------------------------------------------------------------------------*/
#define I2C_IOEXP_ADDR 0x60 // The I2C address for GPIO expander
static void EC_SLV_APP_applicationRun(void* pAppCtxt_p);
/*-----------------------------------------------------------------------------------------
------
------ application specific functions
------
-----------------------------------------------------------------------------------------*/
#if (defined HAVEDISPLAY) && (HAVEDISPLAY==1)
void oled_init(void)
{
/* Oled Init */
const char oled_line1[] = "Kunbus GmbH";
const char oled_line2[] = "EtherCAT DTK Demo";
Board_oledInit();
clear();
setline(0);
setOrientation(1);
printstr((int8_t *)oled_line1);
setline(1);
setOrientation(1);
printstr((int8_t *)oled_line2);
scrollDisplayRight();
}
void oled_run(uint8_t i8uState)
{
const char oled_line1[] = "EtherCAT DTK Demo";
clear();
setline(0);
setOrientation(1);
printstr((int8_t *)oled_line1);
setline(1);
setOrientation(1);
char line2[] = "State: ";
char buffer[7];
sprintf(buffer, "%d ", i8uState);
strcat(line2, buffer);
printstr((int8_t *)line2);
scrollDisplayRight();
}
#endif
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
static OSAL_FUNC_UNUSED void EC_SLV_APP_boardPhyReset(void* pCtxt_p, uint8_t phyIdx_p, bool reset_p)
{
EC_SLV_APP_Sapplication_t* pApplicationInstance = (EC_SLV_APP_Sapplication_t*)pCtxt_p;
uint8_t module = (uint8_t)~0;
uint8_t pin = (uint8_t)~0;
switch(phyIdx_p)
{
case 0:
#if (defined APP_PHY00_RESET_MODULE) && (defined APP_PHY00_RESET_PIN)
if ((EC_API_SLV_ePRUICSS_INSTANCE_ONE == pApplicationInstance->selectedPruInstance) || (0 == pApplicationInstance->selectedPruInstance))
{
module = APP_PHY00_RESET_MODULE;
pin = APP_PHY00_RESET_PIN;
}
#endif
#if (defined APP_PHY10_RESET_MODULE) && (defined APP_PHY10_RESET_PIN)
{
module = APP_PHY10_RESET_MODULE;
pin = APP_PHY10_RESET_PIN;
}
#endif
break;
case 1:
#if (defined APP_PHY01_RESET_MODULE) && (defined APP_PHY01_RESET_PIN)
if ((EC_API_SLV_ePRUICSS_INSTANCE_ONE == pApplicationInstance->selectedPruInstance) || (0 == pApplicationInstance->selectedPruInstance))
{
module = APP_PHY01_RESET_MODULE;
pin = APP_PHY01_RESET_PIN;
}
#endif
#if (defined APP_PHY11_RESET_MODULE) && (defined APP_PHY11_RESET_PIN)
{
module = APP_PHY11_RESET_MODULE;
pin = APP_PHY11_RESET_PIN;
}
#endif
break;
default:
return;
}
if ((uint8_t)-1 == pin || (uint8_t)-1 == module)
{
OSAL_printf("Invalid PHY config %u\r\n", phyIdx_p);
OSAL_error(__FUNCTION__, __LINE__, OSAL_STACK_PHYDETECT_ERROR, true, 0);
}
if (reset_p)
{
OSAL_printf("Phy Reset: %u.%u\r\n", module, pin);
ESL_GPIO_write(pApplicationInstance->gpioHandle, (ESL_GPIO_EModule_t)module, (ESL_GPIO_EPin_t)pin, ESL_GPIO_enPINSTATE_LOW);
}
else
{
OSAL_printf("Phy UnReset: %u.%u\r\n", module, pin);
ESL_GPIO_write(pApplicationInstance->gpioHandle, (ESL_GPIO_EModule_t)module, (ESL_GPIO_EPin_t)pin, ESL_GPIO_enPINSTATE_HIGH);
}
}
#endif
static void EC_SLV_APP_appBoardStatusLed(void* pCallContext_p, void* pLedContext_p, bool runLed_p, bool errLed_p)
{
EC_SLV_APP_Sapplication_t* pApplicationInstance = (EC_SLV_APP_Sapplication_t*)pCallContext_p;
OSALUNREF_PARM(pLedContext_p);
if (NULL == pApplicationInstance)
{
goto Exit;
}
ESL_Board_StatusLED(pApplicationInstance->gpioHandle, pApplicationInstance->selectedPruInstance, runLed_p, errLed_p);
Exit:
return;
}
static EC_API_EError_t EC_SLV_APP_populateBoardFunctions(EC_SLV_APP_Sapplication_t* pApplicationInstance)
{
if (!pApplicationInstance)
{
goto Exit;
}
EC_API_SLV_cbRegisterBoardStatusLed(pApplicationInstance->ptEcSlvApi, pApplicationInstance
,EC_SLV_APP_appBoardStatusLed
,&pApplicationInstance->selectedPruInstance);
Exit:
return error;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
/* open gpio instance */
pAppInstance_p->gpioHandle = ESL_GPIO_init();
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
/* configure Phy Reset Pin */
#if (defined APP_PHY00_RESET_PIN) && (defined APP_PHY00_RESET_MODULE) && (defined APP_PHY01_RESET_PIN) && (defined APP_PHY01_RESET_MODULE)
{
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, APP_PHY00_RESET_MODULE, APP_PHY00_RESET_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, APP_PHY01_RESET_MODULE, APP_PHY01_RESET_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
}
#endif
#if (defined APP_PHY10_RESET_PIN) && (defined APP_PHY10_RESET_MODULE) && (defined APP_PHY11_RESET_PIN) && (defined APP_PHY11_RESET_MODULE)
{
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, APP_PHY10_RESET_MODULE, APP_PHY10_RESET_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, APP_PHY11_RESET_MODULE, APP_PHY11_RESET_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
}
#endif
#else
OSALUNREF_PARM(pAppInstance_p);
#endif
/* configure LED Pin */
#if (defined GPIO_LEDRG0_BANK) && (defined GPIO_LEDRG0_PIN) && (defined GPIO_LEDLR0_BANK) && (defined GPIO_LEDLR0_PIN)
{
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, GPIO_LEDRG0_BANK, GPIO_LEDRG0_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, GPIO_LEDLR0_BANK, GPIO_LEDLR0_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
}
#endif
#if (defined GPIO_LEDRG1_BANK) && (defined GPIO_LEDRG1_PIN) && (defined GPIO_LEDLR1_BANK) && (defined GPIO_LEDLR1_PIN)
{
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, GPIO_LEDRG1_BANK, GPIO_LEDRG1_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
ESL_GPIO_setConfigMode(pAppInstance_p->gpioHandle, GPIO_LEDLR1_BANK, GPIO_LEDLR1_PIN, ESL_GPIO_enDIRECTION_MODE_OUTPUT, ESL_GPIO_enIRQ_MODE_NONE);
}
#endif
ESL_GPIO_apply(pAppInstance_p->gpioHandle);
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
/* configure Phy Reset Pin */
#if (defined APP_PHY00_RESET_PIN) && (defined APP_PHY00_RESET_MODULE) && (defined APP_PHY01_RESET_PIN) && (defined APP_PHY01_RESET_MODULE)
{
EC_SLV_APP_boardPhyReset(pAppInstance_p, 0, true);
EC_SLV_APP_boardPhyReset(pAppInstance_p, 1, true);
}
#endif
#if (defined APP_PHY10_RESET_PIN) && (defined APP_PHY10_RESET_MODULE) && (defined APP_PHY11_RESET_PIN) && (defined APP_PHY11_RESET_MODULE)
{
EC_SLV_APP_boardPhyReset(pAppInstance_p, 0, true);
EC_SLV_APP_boardPhyReset(pAppInstance_p, 1, true);
}
#endif
#endif
Exit:
return;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
#if !(defined TIESC_PHYADDR_0) && !(defined TIESC_PHYADDR_1) && !(defined TIESC_PHYADDR_2) && !(defined TIESC_PHYADDR_3)
#error "EtherCAT without PHY is useless"
#endif
#if (defined TIESC_PHYADDR_0) && (defined TIESC_PHYADDR_1)
{
EC_API_SLV_registerPhy(0, TIESC_PHYADDR_0, TIESC_LINK0_POLINVERT, TIESC_LINK0_USERXLINK);
EC_API_SLV_registerPhy(1, TIESC_PHYADDR_1, TIESC_LINK1_POLINVERT, TIESC_LINK1_USERXLINK);
}
#endif
#if (defined TIESC_PHYADDR_2) && (defined TIESC_PHYADDR_3)
{
EC_API_SLV_registerPhy(0, TIESC_PHYADDR_2, TIESC_LINK2_POLINVERT, TIESC_LINK2_USERXLINK);
EC_API_SLV_registerPhy(1, TIESC_PHYADDR_3, TIESC_LINK3_POLINVERT, TIESC_LINK3_USERXLINK);
}
#endif
#if (defined TIESC_PHYADDR_4) && (defined TIESC_PHYADDR_5)
{
EC_API_SLV_registerPhy(0, TIESC_PHYADDR_4, TIESC_LINK4_POLINVERT, TIESC_LINK4_USERXLINK);
EC_API_SLV_registerPhy(1, TIESC_PHYADDR_5, TIESC_LINK5_POLINVERT, TIESC_LINK5_USERXLINK);
}
#endif
#if (!defined OSAL_FREERTOS)
EC_API_SLV_cbRegisterPhyLibDetect(EC_SLV_APP_TLK110_phyLibDetect, pAppInstance_p);
#endif
EC_API_SLV_cbRegisterPhyReset(EC_SLV_APP_boardPhyReset, pAppInstance_p);
#endif
Exit:
return;
}
uint8_t EC_API_SLV_PendingErrorCb(
EC_SLV_APP_Sapplication_t* pAppInstance_p,
uint16_t Index,
uint8_t Subindex,
uint32_t length,
uint16_t* pData,
uint8_t bCompleteAccess
)
{
OSALUNREF_PARM(Subindex);
OSALUNREF_PARM(bCompleteAccess);
OSALUNREF_PARM(pData);
if(Index == 0x2000 && length == 2)
{
}
return 0;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
// Initialize DTK
pAppInstance_p->ptEcSlvApi = EC_API_SLV_new();
if (!pAppInstance_p->ptEcSlvApi)
{
OSAL_error(__FUNCTION__, __LINE__, OSAL_CONTAINER_NOMEMORY, true, 0);
goto Exit;
}
error = EC_SLV_APP_populateBoardFunctions(pAppInstance_p);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Populate board functions Error code: 0x%08x\n", error);
goto Exit;
}
EC_API_SLV_CiA402_registerSetDictValues (pAppInstance_p->ptEcSlvApi, pAppInstance_p->ptEcSlvApi, EC_SLV_APP_usrApplCia402SetDictValues);
EC_API_SLV_CiA402_registerApplication (pAppInstance_p->ptEcSlvApi, pAppInstance_p->ptEcSlvApi, EC_SLV_APP_usrApplCia402Application);
EC_API_SLV_PDO_setAssignment(pAppInstance_p->ptEcSlvApi, true);
EC_API_SLV_cbRegisterUserApplicationRun(pAppInstance_p->ptEcSlvApi, pAppInstance_p->ptEcSlvApi, EC_SLV_APP_applicationRun, &pAppInstance_p);
#ifdef OSAL_LINUX
error = (EC_API_EError_t)ESL_ESI_parseFile(pAppInstance_p->ptEcSlvApi, SITARA_ESI_FILE);
#else
error = (EC_API_EError_t)ESL_ESI_parseFileRam(pAppInstance_p->ptEcSlvApi, (const uint8_t *)Sitara_Slave_Simple_CiA402_xml, Sitara_Slave_Simple_CiA402_xml_len);
#endif
if(error != EC_API_eERR_NONE)
{
goto Exit;
}
error = (EC_API_EError_t)EC_API_SLV_init(pAppInstance_p->ptEcSlvApi);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Slave Init Error Code: 0x%08x\n", error);
goto Exit;
}
#if (defined HAVEDISPLAY) && (HAVEDISPLAY==1)
oled_init();
#endif
#if (defined ENABLE_I2CLEDS) && (ENABLE_I2CLEDS == 1)
pAppInstance_p->ioexpLedHandle = ESL_OS_ioexp_leds_init() ;
#endif
pAppInstance_p->state = EC_API_SLV_eESM_init;
pAppInstance_p->msec = 0;
pAppInstance_p->trigger = 1000; /* 1000 ms */
pAppInstance_p->prev = ESL_OS_clockGet();
EC_API_SLV_run(pAppInstance_p->ptEcSlvApi);
Exit:
return;
}
{
if (pAppInstance_p)
{
EC_API_SLV_delete(pAppInstance_p->ptEcSlvApi);
pAppInstance_p->ptEcSlvApi = NULL;
}
}
static void EC_SLV_APP_applicationRun(void* pAppCtxt_p)
{
EC_SLV_APP_Sapplication_t* pApplicationInstace = (EC_SLV_APP_Sapplication_t*)pAppCtxt_p;
static uint8_t lastLed = 0;
pApplicationInstace->diff = ESL_OS_clockDiff(pApplicationInstace->prev, NULL);
if (pApplicationInstace->diff)
{
#if (defined ENABLE_I2CLEDS) && (ENABLE_I2CLEDS == 1)
ESL_OS_ioexp_leds_write(pApplicationInstace->ioexpLedHandle, ledPDData);
#endif
pApplicationInstace->prev = ESL_OS_clockGet();
lastLed = lastLed ? lastLed << 1 : 1;
}
if (EC_API_SLV_getState() != pApplicationInstace->state)
{
pApplicationInstace->state = EC_API_SLV_getState();
#if (defined HAVEDISPLAY) && (HAVEDISPLAY==1)
oled_run(pApplicationInstace->state);
#endif
}
}
EC_API_SLV_ePRUICSS_INSTANCE_TWO
@ EC_API_SLV_ePRUICSS_INSTANCE_TWO
Definition: ecSlvApi.h:70
EC_API_SLV_cbRegisterUserApplicationRun
void EC_API_SLV_cbRegisterUserApplicationRun(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBUsrApplicationRun_t cbFunc_p, void *pApplCtxt_p)
This is the function to register a function which runs application run handler.
Definition: ecSlvApi_ESMStub.c:120
EC_SLV_APP_Sapplication::prev
clock_t prev
Definition: ecSlvSimple.h:85
EC_API_EError_t
enum EC_API_EError EC_API_EError_t
EC_API_SLV_delete
uint32_t EC_API_SLV_delete(EC_API_SLV_SHandle_t *pEcSlaveApi_p)
This is the function to delete a created adapter.
Definition: ecSlvApiStub.c:628
EC_SLV_APP_registerStacklessBoardFunctions
void EC_SLV_APP_registerStacklessBoardFunctions(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Register board related functions, which do not use stack handle.
Definition: ecSlvESI.c:303
EC_SLV_APP_Sapplication::ioexpLedHandle
void * ioexpLedHandle
Definition: ecSlvSimple.h:74
EC_API_SLV_cbRegisterPhyLibDetect
void EC_API_SLV_cbRegisterPhyLibDetect(EC_API_SLV_CBExtPhyLibDetect_t cbFunc_p, void *pContext_p)
Register an application specific Phy Library.
Definition: ecSlvApi_BoardStub.c:162
EC_API_SLV_cbRegisterPhyReset
void EC_API_SLV_cbRegisterPhyReset(EC_API_SLV_CBBoardPhyReset_t cbFunc_p, void *pContext_p)
This is the function to register Phy Reset Function.
Definition: ecSlvApi_BoardStub.c:78
EC_SLV_APP_applicationDeInit
void EC_SLV_APP_applicationDeInit(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Deinitialize application.
Definition: ecSlvESI.c:441
EC_API_SLV_cbRegisterStartInputHandler
void EC_API_SLV_cbRegisterStartInputHandler(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBStartInputHandler_t cbFunc_p)
This is the function to register a function which starts the input handler.
Definition: ecSlvApi_ESMStub.c:256
EC_API_SLV_registerPhy
bool EC_API_SLV_registerPhy(uint8_t phyIdx_p, uint8_t phyAddr_p, bool invertLinkPolarity_p, bool useRxLinkPin_p)
Register a phy for stack usage.
Definition: ecSlvApi_BoardStub.c:121
EC_API_SLV_eESM_init
@ EC_API_SLV_eESM_init
Init State.
Definition: ecSlvApi.h:87
EC_SLV_APP_Sapplication::state
uint8_t state
Definition: ecSlvSimple.h:83
EC_SLV_APP_Sapplication
Definition: ecSlvSimple.h:55
EC_API_SLV_cbRegisterBoardStatusLed
void EC_API_SLV_cbRegisterBoardStatusLed(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBBoardStatusLed_t cbFunc_p, void *pLedContext_p)
Register Board Status LED callback.
Definition: ecSlvApi_BoardStub.c:271
EC_SLV_APP_Sapplication::gpioHandle
void * gpioHandle
Definition: ecSlvSimple.h:72
EC_API_SLV_CiA402_registerApplication
void EC_API_SLV_CiA402_registerApplication(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CiA402_CBUsrApplApplication_t cbFunc_p)
CiA402 Servo Drive application.
Definition: ecSlvApi_CiA402Stub.c:223
EC_API_SLV_getState
EC_API_SLV_EEsmState_t EC_API_SLV_getState(void)
This is the function to read the EtherCAT Slave state machine.
Definition: ecSlvApiStub.c:969
EC_SLV_APP_Sapplication::selectedPruInstance
uint32_t selectedPruInstance
Definition: ecSlvSimple.h:57
EC_API_SLV_run
uint32_t EC_API_SLV_run(EC_API_SLV_SHandle_t *pEcSlaveApi_p)
This is the function to run the EtherCAT Slave API.
Definition: ecSlvApiStub.c:726
EC_API_eERR_INVALID
@ EC_API_eERR_INVALID
Definition: ecApiError.h:73
EC_API_SLV_ePRUICSS_INSTANCE_THREE
@ EC_API_SLV_ePRUICSS_INSTANCE_THREE
Definition: ecSlvApi.h:71
EC_SLV_APP_applicationInit
void EC_SLV_APP_applicationInit(EC_SLV_APP_Sapplication_t *pAppInstance_p)
This is the init function.
Definition: ecSlvESI.c:374
EC_SLV_APP_Sapplication::ptEcSlvApi
EC_API_SLV_SHandle_t * ptEcSlvApi
Definition: ecSlvSimple.h:97
EC_API_SLV_CiA402_registerLocalError
void EC_API_SLV_CiA402_registerLocalError(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CiA402_CBUsrApplLocalError_t cbFunc_p)
Register a local error function, triggered if CiA402 state machine changes into an error state.
Definition: ecSlvApi_CiA402Stub.c:267
EC_SLV_APP_initBoardFunctions
void EC_SLV_APP_initBoardFunctions(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Initialize board related functions.
Definition: ecSlvESI.c:234
EC_API_SLV_CiA402_SM_clearErrorCode
void EC_API_SLV_CiA402_SM_clearErrorCode(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint8_t axisNo_p)
Inform the CiA402 state machine whether a state change finished or not.
Definition: ecSlvApi_CiA402Stub.c:402
EC_SLV_APP_startInputHandler
EC_API_SLV_EUserRetCodes_t EC_SLV_APP_startInputHandler(void *ctxt, uint16_t *pIntMask)
Get cycle time information.
Definition: ESL_cia402Demo.c:247
EC_SLV_APP_Sapplication::trigger
int32_t trigger
Definition: ecSlvSimple.h:81
EC_API_SLV_ePRUICSS_INSTANCE_ONE
@ EC_API_SLV_ePRUICSS_INSTANCE_ONE
Definition: ecSlvApi.h:69
EC_SLV_APP_Sapplication::diff
clock_t diff
Definition: ecSlvSimple.h:85
EC_API_SLV_CiA402_registerSetDictValues
void EC_API_SLV_CiA402_registerSetDictValues(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CiA402_CBUsrApplSetDictValues_t cbFunc_p)
Register a function which sets the default values of the CiA402 related objects.
Definition: ecSlvApi_CiA402Stub.c:131
EC_API_eERR_NONE
@ EC_API_eERR_NONE
Definition: ecApiError.h:66
EC_SLV_APP_Sapplication::msec
int32_t msec
Definition: ecSlvSimple.h:80
EC_API_SLV_new
EC_API_SLV_SHandle_t * EC_API_SLV_new(void)
This is the function to create a new EtherCAT Slave device instance.
Definition: ecSlvApiStub.c:536
EC_API_SLV_init
uint32_t EC_API_SLV_init(EC_API_SLV_SHandle_t *pEcSlaveApi_p)
This is the function to initialize the EtherCAT Slave API.
Definition: ecSlvApiStub.c:679
EC_SLV_APP_cia402LocalError
void EC_SLV_APP_cia402LocalError(void *ctxt, uint16_t ErrorCode)
Local Error function handler.
Definition: ESL_cia402Demo.c:631
EC_API_SLV_PDO_setAssignment
uint32_t EC_API_SLV_PDO_setAssignment(EC_API_SLV_SHandle_t *pEcSlaveApi_p, bool assignment_p)
Enable or disable PDO assignments of the SyncManagers. Download of PDO assignment (e....
Definition: ecSlvApi_ProcDataStub.c:549