CiA402 Application implementation.
CiA402 Application implementation.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ecSlvApi.h>
#include <defines/ecSlvApiDef.h>
#include "ecSubDeviceCiA402.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>
#if !(defined FBTL_REMOTE) && !(defined DPRAM_REMOTE)
#include <CUST_PHY_base.h>
#endif
#include <ecSlvApi.h>
#if !(defined MBXMEM)
#define MBXMEM
#endif
#define I2C_IOEXP_ADDR 0x60
#define RXPDOMAP_INDEX (0x1600u)
#define TXPDOMAP_INDEX (0x1A00u)
#define COE_SM_ERROR_MAX_COUNT (0xFFFFu)
#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_CIA_applicationRun(void* appCtxt);
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (defined GPIO_TEST_PROFILE_2) && (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(ptSubDevice);
{
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;
}
{
OSAL_printf("%s:%d Error code: 0x%08x\r\n", __func__, __LINE__, error);
goto Exit;
}
Exit:
return error;
}
{
if (!pApplicationInstance_p)
{
goto Exit;
}
EC_API_SLV_CiA402_setAxisNumber (ptSubDevice, AXES_NUMBER);
{
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;
uint32_t curOffset = 0;
uint32_t offset = 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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
Exit:
return error;
}
{
uint16_t txIndex = TXPDOMAP_INDEX + axis_p;
uint32_t curOffset = 0;
uint32_t offset = 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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
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;
}
curOffset += BIT2BYTE(offset);
Exit:
return error;
}
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (defined GPIO_TEST_PROFILE_2) && (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL)
void EC_SLV_APP_measurement(void* pMsrmtCtxt_p, uint32_t measureChannel_p, bool channelOn_p)
{
EC_SLV_APP_Application_t* pApplicationInstance = (EC_SLV_APP_Application_t*)pMsrmtCtxt_p;
if(NULL != pApplicationInstance)
{
volatile CSL_GpioBank_registersRegs * pGpioRegBank = NULL;
uint32_t pinMask = 0;
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_CIA_boardPhyReset(void* pCtxt_p, uint8_t phyIdx_p, bool reset_p)
{
}
#endif
static void EC_SLV_APP_CIA_appBoardStatusLed(void* pCallContext_p, bool runLed_p, bool errLed_p)
{
if (NULL == pApplicationInstance)
{
goto Exit;
}
Exit:
return;
}
{
if (!pApplicationInstance)
{
goto Exit;
}
,EC_SLV_APP_CIA_appBoardStatusLed
,pApplicationInstance);
Exit:
return error;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
ESL_OS_manualMdioConfig(pAppInstance_p->
ptEcSlvApi);
#if (!(defined SOC_AM263PX) && !(defined SOC_AM261X))
#endif
#else
OSALUNREF_PARM(pAppInstance_p);
#endif
Exit:
return;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
CUST_PHY_CBregisterLibDetect(CUST_PHY_detect, pAppInstance_p);
#if (!(defined SOC_AM263PX) && !(defined SOC_AM261X))
CUST_PHY_CBregisterReset(EC_SLV_APP_CIA_boardPhyReset, pAppInstance_p);
#endif
#endif
Exit:
return;
}
{
if (!pAppInstance_p)
{
goto Exit;
}
{
OSAL_error(__func__, __LINE__, OSAL_CONTAINER_NOMEMORY, true, 0);
goto Exit;
}
error = EC_SLV_APP_CIA_populateBoardFunctions(pAppInstance_p);
{
OSAL_printf("Populate board functions Error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_CIA_populateSlaveInfo(pAppInstance_p);
{
OSAL_printf("Create subdevice Info Error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateCiA402Functions(pAppInstance_p);
{
OSAL_printf("Create subdevice information error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateRxPDO(pAppInstance_p, pAppInstance_p->
ptRxPdo1600, AXIS_ONE);
{
OSAL_printf("Create RxPDO error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateRxPDO(pAppInstance_p, pAppInstance_p->
ptRxPdo1601, AXIS_TWO);
{
OSAL_printf("Create RxPDO error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateRxPDO(pAppInstance_p, pAppInstance_p->
ptRxPdo1602, AXIS_THREE);
{
OSAL_printf("Create RxPDO error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateTxPDO(pAppInstance_p, pAppInstance_p->
ptTxPdo1A00, AXIS_ONE);
{
OSAL_printf("Create TxPDO error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateTxPDO(pAppInstance_p, pAppInstance_p->
ptTxPdo1A01, AXIS_TWO);
{
OSAL_printf("Create TxPDO error code: 0x%08x\r\n", error);
goto Exit;
}
error = EC_SLV_APP_populateTxPDO(pAppInstance_p, pAppInstance_p->
ptTxPdo1A02, AXIS_THREE);
{
OSAL_printf("Create TxPDO error code: 0x%08x\r\n", error);
goto Exit;
}
#if !(defined DPRAM_REMOTE) && !(defined FBTL_REMOTE)
EC_SLV_APP_EEP_init,
EC_SLV_APP_EEP_write, EEPROM_MAGIC_KEY);
EC_SLV_APP_EEP_read, EEPROM_MAGIC_KEY);
#endif
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (defined GPIO_TEST_PROFILE_2) && (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL)
#endif
#endif
{
OSAL_printf("SubDevice Init Error Code: 0x%08x\r\n", error);
goto Exit;
}
Exit:
return;
}
void EC_SLV_APP_CIA_applicationRun(void* appCtxt)
{
OSALUNREF_PARM(appCtxt);
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (defined GPIO_TEST_PROFILE_1) && (defined GPIO_TEST_PROFILE_2) && ((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
}
uint16_t EC_SLV_APP_CIA_startInputHandler(void *ctxt, uint16_t *intMask)
Get cycle time information.
Definition ESL_cia402Demo.c:519
void EC_SLV_APP_cia402Application(void *ctxt)
CiA402 Application function.
Definition ESL_cia402Demo.c:982
void EC_SLV_APP_cia402LocalError(void *ctxt, uint16_t errorCode)
Local Error function handler.
Definition ESL_cia402Demo.c:1315
void EC_SLV_APP_CIA_applicationInit(EC_SLV_APP_CIA_Application_t *pAppInstance_p)
Initialize subdevice application example.
Definition ecSubDeviceCiA402.c:959
void EC_SLV_APP_setObdValues(void *ctxt)
Set default values for CiA 402 object dictionary.
Definition ESL_cia402Demo.c:462
uint32_t EC_SLV_APP_cia402ObjectDictionary(void *pContext_p)
Generate CiA402 Objects.
Definition ESL_cia402Obd.c:83
uint32_t EC_API_SLV_cbRegisterMeasurement(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBMsrmt_t cbFunc, void *pContext)
Register measurement callback.
Definition ecSlvApi.c:2469
uint32_t EC_API_SLV_init(EC_API_SLV_SHandle_t *pHandle)
This is the function to initialize the EtherCAT Slave API.
Definition ecSlvApi.c:1231
EC_API_SLV_SHandle_t * EC_API_SLV_new(void)
This is the function to create a new EtherCAT Slave device instance.
Definition ecSlvApi.c:918
uint32_t EC_API_SLV_run(EC_API_SLV_SHandle_t *pHandle)
This is the function to run the EtherCAT Slave API.
Definition ecSlvApi.c:1448
uint32_t EC_API_SLV_cbRegisterBoardStatusLed(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBBoardStatusLed_t cbFunc, void *pContext)
Register Board Status LED callback.
Definition ecSlvApi_board.c:102
uint32_t EC_API_SLV_setStandardMailbox(EC_API_SLV_SHandle_t *pHandle, uint16_t rxOffset, uint16_t rxSize, uint16_t txOffset, uint16_t txSize)
Set Standard Mailbox Configuration.
Definition ecSlvApi_param.c:696
uint32_t EC_API_SLV_setRevisionNumber(EC_API_SLV_SHandle_t *pHandle, uint32_t revisionNumber)
Set device revision number. Used by the EEPROM and Object Dictionary.
Definition ecSlvApi_param.c:173
uint32_t EC_API_SLV_setBootStrapMailbox(EC_API_SLV_SHandle_t *pHandle, uint16_t rxOffset, uint16_t rxSize, uint16_t txOffset, uint16_t txSize)
Set Bootstrap Mailbox Configuration.
Definition ecSlvApi_param.c:637
uint32_t EC_API_SLV_setDeviceType(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_EDevType_t devType)
Define EtherCAT Device Type. Identifies the slave as a standard slave, an EtherCAT servo drive suppor...
Definition ecSlvApi_param.c:1271
uint32_t EC_API_SLV_setSyncManErrLimit(EC_API_SLV_SHandle_t *pHandle, uint16_t smErrorLimit)
Set SyncManager sequence error counter limit.
Definition ecSlvApi_param.c:816
uint32_t EC_API_SLV_setProductCode(EC_API_SLV_SHandle_t *pHandle, uint32_t productCode)
Set device product code. Used by the EEPROM and Object Dictionary.
Definition ecSlvApi_param.c:121
uint32_t EC_API_SLV_setHwVersion(EC_API_SLV_SHandle_t *pHandle, char *pHardwareVersion)
Set device hardware version.
Definition ecSlvApi_param.c:396
uint32_t EC_API_SLV_setSerialNumber(EC_API_SLV_SHandle_t *pHandle, uint32_t serialNumber)
Set default serial number.
Definition ecSlvApi_param.c:224
uint32_t EC_API_SLV_setPDOSize(EC_API_SLV_SHandle_t *pHandle, uint32_t maxPdOutSize, uint32_t maxPdInSize)
Set ProcessData Size Limits.
Definition ecSlvApi_param.c:531
uint32_t EC_API_SLV_setSyncManConfig(EC_API_SLV_SHandle_t *pHandle, uint8_t syncManIdx, uint16_t offset, uint16_t size, uint8_t control, uint8_t enable)
Set SyncManager Configuration.
Definition ecSlvApi_param.c:752
uint32_t EC_API_SLV_setGroupType(EC_API_SLV_SHandle_t *pHandle, char *pGroupType)
Set device group name.
Definition ecSlvApi_param.c:335
uint32_t EC_API_SLV_setVendorId(EC_API_SLV_SHandle_t *pHandle, uint32_t vendorId)
Set device vendor ID. Used by the EEPROM and Object Dictionary.
Definition ecSlvApi_param.c:60
uint32_t EC_API_SLV_setProductName(EC_API_SLV_SHandle_t *pHandle, char *pProductName)
Set device product name.
Definition ecSlvApi_param.c:275
uint32_t EC_API_SLV_setPDICfg(EC_API_SLV_SHandle_t *pHandle, uint16_t pdiControl, uint16_t pdiConfig)
Set PDI Configuration.
Definition ecSlvApi_param.c:580
uint32_t EC_API_SLV_CiA402_registerSetDictValues(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CiA402_CBUsrApplSetDictValues_t cbFunc, void *pContext)
Set values for configured CiA402 Object Dictionary objects.
Definition ecSlvApi_CiA402.c:89
uint32_t EC_API_SLV_CiA402_registerApplication(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CiA402_CBUsrApplApplication_t cbFunc, void *pContext)
Register CiA402 application callback.
Definition ecSlvApi_CiA402.c:176
uint32_t EC_API_SLV_CiA402_registerLocalError(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CiA402_CBUsrApplLocalError_t cbFunc, void *pContext)
Register a local error, triggered if CiA402 state machine changes into an error state.
Definition ecSlvApi_CiA402.c:218
uint32_t EC_API_SLV_CoE_getObjectEntry(EC_API_SLV_SHandle_t *pHandle, uint16_t index, uint8_t subIndex, EC_API_SLV_SCoE_ObjEntry_t **ppObjectEntry)
This function returns object entries from the Object Dictionary.
Definition ecSlvApi_CoE.c:661
uint32_t EC_API_SLV_EEPROM_cbRegisterInit(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBEepromInit_t cbFunc, void *pContext)
Initialize flash memory block.
Definition ecSlvApi.c:2403
uint32_t EC_API_SLV_EEPROM_cbRegisterWrite(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBEepromWrite_t cbFunc, void *pContext)
Register a function lo store the eeprom content.
Definition ecSlvApi.c:2356
uint32_t EC_API_SLV_EEPROM_cbRegisterRead(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBEepromRead_t cbFunc, void *pContext)
Register a function lo load the eeprom content.
Definition ecSlvApi.c:2303
@ EC_API_eERR_INVALID
Definition ecSlvApiDef_error.h:48
@ EC_API_eERR_NONE
Definition ecSlvApiDef_error.h:41
enum EC_API_EError EC_API_EError_t
uint32_t EC_API_SLV_PDO_create(EC_API_SLV_SHandle_t *pHandle, char *pName, uint16_t mapIndex, EC_API_SLV_Pdo_t **pOutPdo)
Creates an empty PDO.
Definition ecSlvApi_pdo.c:416
uint32_t EC_API_SLV_PDO_getEntryDataLength(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t subIndex, uint32_t *pLength)
Read PDO entry data length.
Definition ecSlvApi_pdo.c:2053
uint32_t EC_API_SLV_PDO_createEntry(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, char *pName, EC_API_SLV_SCoE_ObjEntry_t *pObjEntry)
This function maps an object entry from the Object Dictionary as a PDO.
Definition ecSlvApi_pdo.c:827
uint32_t EC_API_SLV_cbRegisterStartInputHandler(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBStartInputHandler_t cbFunc, void *pContext)
This is the function to register a function which starts the input handler.
Definition ecSlvApi_ssc.c:246
uint32_t EC_API_SLV_cbRegisterUserApplicationRun(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBUsrApplicationRun_t cbFunc, void *pContext)
This is the function to register a function which runs application run handler.
Definition ecSlvApi_ssc.c:95
@ EC_API_SLV_eDT_SERVO_DRIVE
The device supports CiA402 for a servo drive.
Definition ecSlvApi_types.h:81
Definition ecSlvApiInternal.h:129
Definition ecSlvApiInternal.h:331
Definition ecSlvApiInternal.h:172
uint16_t realPdoOutLen
Definition ecSubDeviceCiA402.h:195
EC_API_SLV_Pdo_t * ptRxPdo1600
Definition ecSubDeviceCiA402.h:183
EC_API_SLV_Pdo_t * ptRxPdo1601
Definition ecSubDeviceCiA402.h:184
void * gpioHandle
Definition ecSubDeviceCiA402.h:166
EC_API_SLV_Pdo_t * ptTxPdo1A01
Definition ecSubDeviceCiA402.h:187
uint16_t realPdoInLen
Definition ecSubDeviceCiA402.h:196
EC_API_SLV_Pdo_t * ptTxPdo1A02
Definition ecSubDeviceCiA402.h:188
uint32_t selectedPruInstance
Definition ecSubDeviceCiA402.h:158
EC_API_SLV_Pdo_t * ptTxPdo1A00
Definition ecSubDeviceCiA402.h:186
EC_API_SLV_SHandle_t * ptEcSlvApi
Definition ecSubDeviceCiA402.h:199
EC_API_SLV_Pdo_t * ptRxPdo1602
Definition ecSubDeviceCiA402.h:185
EC_SLV_APP_sCIA_axisData_t CiA402_axisData[AXES_NUMBER]
Definition ecSubDeviceCiA402.h:197
Definition ecSubDeviceCiA402.h:157
EC_SLV_APP_sCIA_object_t statusWordIndex
Definition ecSubDeviceCiA402.h:81
EC_SLV_APP_sCIA_object_t targetTorqueIndex
Definition ecSubDeviceCiA402.h:103
EC_SLV_APP_sCIA_object_t targetVelocityIndex
Definition ecSubDeviceCiA402.h:113
EC_SLV_APP_sCIA_object_t modesOfOperationDisplayIndex
Definition ecSubDeviceCiA402.h:88
EC_SLV_APP_sCIA_object_t targetPositionIndex
Definition ecSubDeviceCiA402.h:108
EC_SLV_APP_sCIA_object_t modesOfOperationIndex
Definition ecSubDeviceCiA402.h:87
EC_SLV_APP_sCIA_object_t velocityActualValueIndex
Definition ecSubDeviceCiA402.h:98
EC_SLV_APP_sCIA_object_t controlWordIndex
Definition ecSubDeviceCiA402.h:80
EC_SLV_APP_sCIA_object_t torqueActualValueIndex
Definition ecSubDeviceCiA402.h:106
EC_SLV_APP_sCIA_object_t positionActualValueIndex
Definition ecSubDeviceCiA402.h:91
uint32_t pdoObjectOffset
Definition ecSubDeviceCiA402.h:64
EC_API_SLV_Pdo_t * pdoObject
Definition ecSubDeviceCiA402.h:63
uint16_t objectIndex
Definition ecSubDeviceCiA402.h:60