CONodeInit()

This function initializes the internals of the CANopen stack.

Description

The specification of the CANopen node, and the CANopen node object itself is given as parameter.

Prototype

void CONodeInit(CO_NODE *node, CO_NODE_SPEC *spec);

Arguments

Parameter Description
node pointer to node object
spec pointer to node specification object

Returned Value

  • none

Example

The following example shows the external reference to the node specification AppSpec which is typically allocated within a configuration file and the allocation of the CANopen node memory AppNode.

    extern const CO_NODE_SPEC AppSpec;
                 CO_NODE      AppNode;

With these objects, the CANopen node can be initialized and started:

    :
    CONodeInit (&AppNode, (CO_NODE_SPEC *)&AppSpec);
    :