Description
This function initializes the internals of the CANopen stack. 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);
Parameter | Description |
---|---|
node | pointer to the CANopen node object |
spec | pointer to the configuration collection of configuration aspects. |
Returned Value
none
Additional Information
The node is still in INIT mode after this function call. To finalize the initialization phase (e.g. profile specific or application actions, etc..), see CONodeStart()
.
Example
The following example shows the external reference to the node specification AppSpec, which is typically allocated within the configuration file co_obj_cfg.c
, and the allocation of the CANopen node memory AppNode.
With these objects, the CANopen node can be initialized and started: