CiA402 Application implementation.
#include <ecSlvApi.h>
#include <ecSlvApiDef.h>
#include "ecSlvCiA402.h"
#include "ESL_cia402Obd.h"
#include "ESL_cia402Demo.h"
#include "project.h"
#include <ESL_os.h>
#include <ESL_BOARD_config.h>
#include <ESL_vendor.h>
#include <ESL_gpioHelper.h>
#include <ESL_foeDemo.h>
#include <ESL_soeDemo.h>
#include <ESL_eeprom.h>
#include <ESL_version.h>
#include <ecSlvApi.h>
#if !(defined MBXMEM)
#define MBXMEM
#endif
#define I2C_IOEXP_ADDR 0x60
#define RXPDOMAP_INDEX 0x1600
#define TXPDOMAP_INDEX 0x1A00
#define COE_SM_ERROR_MAX_COUNT 0xFFFF
#define AXIS_ONE 0
#define AXIS_TWO 1
#define AXIS_THREE 2
#if !(defined BIT2BYTE)
#define BIT2BYTE(x) (((x)+7) >> 3)
#endif
static void EC_SLV_APP_applicationRun(void* pAppCtxt_p);
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL)
static void EC_SLV_APP_measurement(void* pMsrmtCtxt_p, uint32_t measureChannel_p, bool channelOn_p);
#endif
#endif
{
if (!pApplicationInstance_p)
{
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
error = ESL_setSWVersion(ptSlave);
{
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
EC_BOOTSTRAP_MBXOUT_START, EC_BOOTSTRAP_MBXOUT_DEF_LENGTH,
EC_BOOTSTRAP_MBXIN_START, EC_BOOTSTRAP_MBXIN_DEF_LENGTH);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
EC_MBXOUT_START, EC_MBXOUT_DEF_LENGTH,
EC_MBXIN_START, EC_MBXIN_DEF_LENGTH);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
0, EC_MBXOUT_START, EC_MBXOUT_DEF_LENGTH,
EC_MBXOUT_CONTROLREG, EC_MBXOUT_ENABLE);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
1, EC_MBXIN_START, EC_MBXIN_DEF_LENGTH,
EC_MBXIN_CONTROLREG, EC_MBXIN_ENABLE);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
2, EC_OUTPUT_START, EC_OUTPUT_DEF_LENGTH,
EC_OUTPUT_CONTROLREG, EC_OUTPUT_ENABLE);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
3, EC_INPUT_START, EC_INPUT_DEF_LENGTH,
EC_INPUT_CONTROLREG, EC_INPUT_ENABLE);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
error = (
EC_API_EError_t)EC_API_SLV_setSyncManErrLimit(ptSlave, COE_SM_ERROR_MAX_COUNT);
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
Exit:
return error;
}
{
if (!pApplicationInstance_p)
{
goto Exit;
}
{
OSAL_printf("%s:%d CiA402 Object Dictionary error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
Exit:
return error;
}
{
uint16_t rxIndex = RXPDOMAP_INDEX + axis_p;
uint16_t curOffset = 0;
uint8_t subIndex = 0;
if (!pApplicationInstance_p)
{
goto Exit;
}
{
OSAL_printf("%s:%d Create PDO 0x%04x error code: 0x%08x\r\n", __func__, __LINE__, rxIndex, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
subIndex++;
Exit:
return error;
}
{
uint16_t txIndex = TXPDOMAP_INDEX + axis_p;
uint16_t curOffset = 0;
uint8_t subIndex = 0;
if (!pApplicationInstance_p)
{
goto Exit;
}
{
OSAL_printf("Create PDO for axis %d error code: 0x%08x\r\n", axis_p);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("PDO 0x1A00 Entry 2 Error code: 0x%08x\r\n", error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("PDO 0x1A00 Entry 2 Error code: 0x%08x\r\n", error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("PDO 0x1A00 Entry 2 Error code: 0x%08x\r\n", error);
goto Exit;
}
subIndex++;
{
OSAL_printf("%s:%d Variable Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
{
OSAL_printf("PDO 0x1A00 Entry 2 Error code: 0x%08x\r\n", error);
goto Exit;
}
subIndex++;
Exit:
return error;
}
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL)
void EC_SLV_APP_measurement(void* pMsrmtCtxt_p, uint32_t measureChannel_p, bool channelOn_p)
{
volatile CSL_GpioBank_registersRegs * pGpioRegBank = NULL;
uint32_t pinMask = 0;
if (pApplicationInstance)
{
switch (measureChannel_p)
{
case 0: pGpioRegBank = ESL_TESTPIN_STATE_REG_BANK; pinMask = ESL_TESTPIN_0_MASK; break;
case 1: pGpioRegBank = ESL_TESTPIN_STATE_REG_BANK; pinMask = ESL_TESTPIN_1_MASK; break;
case 2: pGpioRegBank = ESL_TESTPIN_STATE_REG_BANK; pinMask = ESL_TESTPIN_2_MASK; break;
default:
break;
}
if (channelOn_p)
{
ESL_GPIO_testPins_set(pGpioRegBank, pinMask);
}
else
{
ESL_GPIO_testPins_clear(pGpioRegBank, pinMask);
}
}
}
#endif
#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)
{
}
#endif
static void EC_SLV_APP_appBoardStatusLed(void* pCallContext_p, void* pLedContext_p, bool runLed_p, bool errLed_p)
{
OSALUNREF_PARM(pLedContext_p);
if (NULL == pApplicationInstance)
{
goto Exit;
}
Exit:
return;
}
{
if (!pApplicationInstance)
{
goto Exit;
}
,EC_SLV_APP_appBoardStatusLed
Exit:
return error;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
ESL_OS_manualMdioConfig(pAppInstance_p->
ptEcSlvApi);
#else
OSALUNREF_PARM(pAppInstance_p);
#endif
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
#endif
Exit:
return;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
#endif
Exit:
return;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
{
OSAL_error(__func__, __LINE__, OSAL_CONTAINER_NOMEMORY, true, 0);
goto Exit;
}
error = EC_SLV_APP_populateBoardFunctions(pAppInstance_p);
{
OSAL_printf("Populate board functions Error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateSlaveInfo(pAppInstance_p);
{
OSAL_printf("Create Slave Info Error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateCiA402Functions(pAppInstance_p);
{
OSAL_printf("Create slave information error code: 0x%08x\r\n", error);
return;
}
{
OSAL_printf("Create RxPDO error code: 0x%08x\r\n", error);
return;
}
{
OSAL_printf("Create RxPDO error code: 0x%08x\r\n", error);
return;
}
{
OSAL_printf("Create RxPDO error code: 0x%08x\r\n", error);
return;
}
{
OSAL_printf("Create TxPDO error code: 0x%08x\r\n", error);
return;
}
{
OSAL_printf("Create TxPDO error code: 0x%08x\r\n", error);
return;
}
{
OSAL_printf("Create TxPDO error code: 0x%08x\r\n", error);
return;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
#else
OSAL_SCHED_startTask(EC_SLV_APP_usrAppRunWrapper, pAppInstance_p, OSAL_TASK_ePRIO_Idle
,(uint8_t*)EC_SLV_APP_appRunWrapTaskStack_g, APPRWRAP_TASK_SIZE_BYTE, 0, "AppRun");
#endif
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL)
#endif
#endif
{
OSAL_printf("Slave Init Error Code: 0x%08x\r\n", error);
return;
}
Exit:
return;
}
{
if (pAppInstance_p)
{
}
}
void EC_SLV_APP_applicationRun(void* pAppRunCtxt_p)
{
OSALUNREF_PARM(pAppRunCtxt_p);
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && ((GPIO_TEST_PROFILE_1 == GPIO_TEST_PROFILE_SEL) || (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL))
static bool bToggle = false;
if (bToggle)
{
ESL_GPIO_testPins_set(ESL_TESTPIN_STATE_REG_BANK, ESL_TESTPIN_3_MASK);
}
else
{
ESL_GPIO_testPins_clear(ESL_TESTPIN_STATE_REG_BANK, ESL_TESTPIN_3_MASK);
}
bToggle = !bToggle;
#endif
#endif
}
void EC_SLV_APP_cia402Application(void *pCtxt_p)
CiA402 Application function.
Definition: ESL_cia402Demo.c:876
EC_API_SLV_EUserRetCodes_t EC_SLV_APP_startInputHandler(void *ctxt, uint16_t *pIntMask)
Get cycle time information.
Definition: ESL_cia402Demo.c:247
void EC_SLV_APP_applicationInit(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Initialize slave application example.
Definition: ecSlvCiA402.c:847
void EC_SLV_APP_cia402LocalError(void *ctxt, uint16_t ErrorCode)
Local Error function handler.
Definition: ESL_cia402Demo.c:631
void EC_SLV_APP_setObdValues(void *pCtxt_p)
Set default values for CiA 402 object dictionary.
Definition: ESL_cia402Demo.c:443
uint32_t EC_SLV_APP_cia402ObjectDictionary(void *pContext_p)
Generate CiA402 Objects.
Definition: ESL_cia402Obd.c:82
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:535
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:678
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:627
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:781
void EC_API_SLV_cbRegisterPhyReset(CUST_PHY_CBreset_t cbFunc_p, void *pContext_p)
This is the function to register Phy Reset Function.
Definition: ecSlvApi_BoardStub.c:79
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:273
uint32_t EC_API_SLV_setProductCode(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t productCode_p)
Set device product code. Used by the EEPROM and Object Dictionary.
Definition: ecSlvApi_ParamStub.c:134
uint32_t EC_API_SLV_setVendorId(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t vendorId_p)
Set device vendor ID. Used by the EEPROM and Object Dictionary.
Definition: ecSlvApi_ParamStub.c:86
uint32_t EC_API_SLV_setSerialNumber(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t serialNumber_p)
Set default serial number.
Definition: ecSlvApi_ParamStub.c:229
uint32_t EC_API_SLV_setGroupType(EC_API_SLV_SHandle_t *pEcSlaveApi_p, char *pGroupType_p)
Set device group type.
Definition: ecSlvApi_ParamStub.c:323
uint32_t EC_API_SLV_setStandardMailbox(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint16_t rxOffset_p, uint16_t rxSize_p, uint16_t txOffset_p, uint16_t txSize_p)
Set Standard Mailbox Configuration.
Definition: ecSlvApi_ParamStub.c:606
uint32_t EC_API_SLV_setBootStrapMailbox(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint16_t rxOffset_p, uint16_t rxSize_p, uint16_t txOffset_p, uint16_t txSize_p)
Set Bootstrap Mailbox Configuration.
Definition: ecSlvApi_ParamStub.c:557
uint32_t EC_API_SLV_setSyncManConfig(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint8_t syncManIdx_p, uint16_t offset_p, uint16_t size_p, uint8_t control_p, uint8_t enable_p)
Set SyncManager Configuration.
Definition: ecSlvApi_ParamStub.c:650
uint32_t EC_API_SLV_setHwVersion(EC_API_SLV_SHandle_t *pEcSlaveApi_p, char *pHardwareVersion_p)
Set device hardware version.
Definition: ecSlvApi_ParamStub.c:370
uint32_t EC_API_SLV_setPDOSize(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t maxPdOutSize_p, uint32_t maxPdInSize_p)
Set ProcessData Size Limits.
Definition: ecSlvApi_ParamStub.c:463
uint32_t EC_API_SLV_setProductName(EC_API_SLV_SHandle_t *pEcSlaveApi_p, char *pProductName_p)
Set device product name.
Definition: ecSlvApi_ParamStub.c:276
uint32_t EC_API_SLV_setPDICfg(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint16_t pdiControl_p, uint16_t pdiConfig_p)
Set PDI Configuration.
Definition: ecSlvApi_ParamStub.c:508
uint32_t EC_API_SLV_setDeviceType(EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_EDevType_t devType_p)
Define EtherCAT Device Type. Identifies the slave as a standard slave, an EtherCAT servo drive suppor...
Definition: ecSlvApiStub.c:1524
uint32_t EC_API_SLV_setRevisionNumber(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t revisionNumber_p)
Set device revision number. Used by the EEPROM and Object Dictionary.
Definition: ecSlvApi_ParamStub.c:182
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
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
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
void EC_API_SLV_CiA402_setAxisNumber(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint8_t axisNo_p)
Set number of servo axis. A Cia402 Device might support multiple axes.
Definition: ecSlvApi_CiA402Stub.c:310
@ EC_API_eERR_INVALID
Definition: ecSlvApi_Error.h:73
@ EC_API_eERR_NONE
Definition: ecSlvApi_Error.h:66
enum EC_API_EError EC_API_EError_t
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
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
uint32_t EC_API_SLV_CoE_getObjectEntry(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint16_t index_p, uint8_t subIndex_p, EC_API_SLV_SCoE_ObjEntry_t **ppObjectEntry_p)
This function returns object entries from the Object Dictionary.
Definition: ecSlvApi_CoEStub.c:412
uint32_t EC_API_SLV_PDO_createEntry(EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, char *pName_p, EC_API_SLV_SCoE_ObjEntry_t *pObjectEntry_p)
This function maps an object entry from the Object Dictionary as a PDO.
Definition: ecSlvApi_ProcDataStub.c:271
uint32_t EC_API_SLV_PDO_getEntryDataLength(EC_API_SLV_SPdo_t *pPdo_p, uint8_t subIndex_p)
Read PDO entry data length.
Definition: ecSlvApi_ProcDataStub.c:979
uint32_t EC_API_SLV_PDO_create(EC_API_SLV_SHandle_t *pEcSlaveApi_p, char *pName_p, uint16_t mapIndex_p, EC_API_SLV_SPdo_t **pOutPdo_p)
Creates an empty PDO.
Definition: ecSlvApi_ProcDataStub.c:86
void EC_API_SLV_cbRegisterMeasurement(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBMsrmt_t cbFunc_p)
Initialize flash memory block.
Definition: ecSlvApiStub.c:1739
void EC_API_SLV_cbRegisterFlashInit(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBInitFlash_t cbFunc_p)
Initialize flash memory block.
Definition: ecSlvApiStub.c:1697
void EC_API_SLV_EEPROM_cbRegisterLoad(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBEepromLoad_t cbFunc_p)
Register a function lo load the eeprom content.
Definition: ecSlvApiStub.c:1610
void EC_API_SLV_EEPROM_cbRegisterWrite(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CBEepromWrite_t cbFunc_p)
Register a function lo store the eeprom content.
Definition: ecSlvApiStub.c:1655
struct EC_API_SLV_SPdo EC_API_SLV_SPdo_t
TPdo is used to describe the RxPDOs and TxPDOs.
Definition: ecSlvApi.h:148
@ EC_API_SLV_eDT_SERVO_DRIVE
The device supports CiA402 for a servo drive.
Definition: ecSlvApi.h:106
struct EC_API_SLV_SHandle EC_API_SLV_SHandle_t
EC_API_SLV_SHandle_t describes the EtherCAT Slave API.
Definition: ecSlvApi.h:157
@ EC_API_SLV_ePHY_IN
Phy index for IN Phy.
Definition: ecSlvApi.h:132
@ EC_API_SLV_ePHY_OUT
Phy index for OUT Phy.
Definition: ecSlvApi.h:133
struct EC_API_SLV_SCoE_ObjEntry EC_API_SLV_SCoE_ObjEntry_t
TSdoEntry describes an OBD Object Entry.
Definition: ecSlvApi.h:151
void EC_SLV_APP_initBoardFunctions(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Init board.
Definition: ecSlvCiA402.c:761
void EC_SLV_APP_applicationDeInit(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Deinitialize application.
Definition: ecSlvCiA402.c:959
void EC_SLV_APP_registerStacklessBoardFunctions(EC_SLV_APP_Sapplication_t *pAppInstance_p)
Register PHYs.
Definition: ecSlvCiA402.c:810
EC_API_EError_t EC_SLV_APP_populateTxPDO(EC_SLV_APP_Sapplication_t *pApplicationInstance_p)
Configure TX PDO entries.
Definition: ecSlvSimple.c:1692
EC_API_EError_t EC_SLV_APP_populateRxPDO(EC_SLV_APP_Sapplication_t *pApplicationInstance_p)
Configure RX PDO entries.
Definition: ecSlvSimple.c:1574
EC_API_SLV_SPdo_t * ptTxPdo1A02
Definition: ecSlvCiA402.h:197
EC_API_SLV_SPdo_t * ptRxPdo1601
Definition: ecSlvSimple.h:93
uint16_t realPdoOutLen
Definition: ecSlvCiA402.h:204
EC_API_SLV_SPdo_t * ptRxPdo1600
Definition: ecSlvSimple.h:92
uint16_t realPdoInLen
Definition: ecSlvCiA402.h:205
void * gpioHandle
Definition: ecSlvSimple.h:72
EC_API_SLV_SPdo_t * ptRxPdo1602
Definition: ecSlvCiA402.h:194
uint32_t selectedPruInstance
Definition: ecSlvSimple.h:57
EC_API_SLV_SHandle_t * ptEcSlvApi
Definition: ecSlvSimple.h:97
EC_API_SLV_SPdo_t * ptTxPdo1A01
Definition: ecSlvSimple.h:95
EC_SLV_APP_sCIA_axisData_t CiA402_axisData[AXES_NUMBER]
Definition: ecSlvCiA402.h:206
EC_API_SLV_SPdo_t * ptTxPdo1A00
Definition: ecSlvSimple.h:94
Definition: ecSlvSimple.h:56
EC_SLV_APP_sCIA_object_t statusWordIndex
Definition: ecSlvCiA402.h:80
EC_SLV_APP_sCIA_object_t targetTorqueIndex
Definition: ecSlvCiA402.h:102
EC_SLV_APP_sCIA_object_t targetVelocityIndex
Definition: ecSlvCiA402.h:112
EC_SLV_APP_sCIA_object_t modesOfOperationDisplayIndex
Definition: ecSlvCiA402.h:87
EC_SLV_APP_sCIA_object_t targetPositionIndex
Definition: ecSlvCiA402.h:107
EC_SLV_APP_sCIA_object_t modesOfOperationIndex
Definition: ecSlvCiA402.h:86
EC_SLV_APP_sCIA_object_t velocityActualValueIndex
Definition: ecSlvCiA402.h:97
EC_SLV_APP_sCIA_object_t controlWordIndex
Definition: ecSlvCiA402.h:79
EC_SLV_APP_sCIA_object_t torqueActualValueIndex
Definition: ecSlvCiA402.h:105
EC_SLV_APP_sCIA_object_t positionActualValueIndex
Definition: ecSlvCiA402.h:90
EC_API_SLV_SPdo_t * pdoObject
Definition: ecSlvCiA402.h:62
uint16_t pdoObjectOffset
Definition: ecSlvCiA402.h:63
uint16_t objectIndex
Definition: ecSlvCiA402.h:59