#ifndef TMPL_COS_CONFIG
#define TMPL_COS_CONFIG COS_CONF_SLAVE
#endif
#ifndef TMPL_COS_TEST_MAIN
#define TMPL_COS_TEST_MAIN 0
#endif
#ifndef TMPL_COS_USE_CAN_IF
#define TMPL_COS_USE_CAN_IF eCP_CHANNEL_1
#endif
int main(void)
{
int32_t slBitrateSelT;
uint8_t ubNodeIdT;
uint32_t ulLastTimerTickT = 0;
if (slBitrateSelT > eCP_BITRATE_MAX)
{
#if COS_LED_SUPPORT > 0
#endif
#if COS_LED_SUPPORT > 1
#endif
while (1) { };
}
if (ubNodeIdT > 127)
{
#if COS_LED_SUPPORT > 0
#endif
#if COS_LED_SUPPORT > 1
#endif
while (1) { };
}
while (1)
{
{
}
{
}
else
{
}
#if TMPL_COS_TEST_MAIN > 0
static uint32_t ulTestMainCounterS = TMPL_COS_TEST_MAIN;
if (ulTestMainCounterS == 0) break;
ulTestMainCounterS--;
#endif
}
return (0);
}
@ eCP_BITRATE_NONE
Definition canpie.h:642
CANopen Slave Stack - CiA 301 objects .
@ eCOS_ERR_NODE_RESET
Definition cos_defs.h:516
CANopen Slave Stack - Manufacturer specific objects .
void CosDemoAppInit(void)
CANopen Slave Stack - LED management .
void CosLedNetworkError(uint8_t ubErrorV)
Network Error LED.
@ eCosLedMod_FAIL_BAUD
Definition cos_led.h:107
@ eCosLedMod_FAIL_ADDR
Definition cos_led.h:110
void CosLedModuleStatus(uint8_t ubStatusV)
Module Status LED.
@ eCosLedErr_BUS_OFF
Definition cos_led.h:168
CANopen Slave Stack - Management functions .
uint8_t CosMgrRelease(void)
Release the CANopen Slave protocol stack.
uint8_t CosMgrInit(uint8_t ubCanIfV, uint16_t uwConfigV)
Initialise the CANopen Slave.
uint8_t CosMgrGetNodeId(void)
uint8_t CosMgrGetBitrate(void)
Get module bit-rate.
uint8_t CosMgrProcess(void)
Process CANopen message queue.
uint8_t CosMgrStart(uint8_t ubNodeIdV, int32_t slBitrateNomSelV, int32_t slBitrateDatSelV)
CANopen Slave Stack - Network management functions (NMT) .
CANopen Slave Stack - Timing functions .
void CosTmrEvent(void)
Execute Timer-based Services.
uint32_t McTmrTick(void)
Get timer tick.
void McTmrInit(void)
Initialise Timer.
MCL - Watchdog support functions .
Status_tv McWdtInit(void)
Initialize watchdog.