CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
Common definitions

Constants for common definitions. More...

+ Collaboration diagram for Common definitions:

Macros

#define CO_CONFIG_FLAG_CALLBACK_PRE   0x1000
 Enable custom callback after CAN receive.
 
#define CO_CONFIG_FLAG_TIMERNEXT   0x2000
 Enable calculation of timerNext_us variable.
 
#define CO_CONFIG_FLAG_OD_DYNAMIC   0x4000
 Enable dynamic behaviour of Object Dictionary variables.
 
#define CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE   (0)
 This flag may be set globally for mainline objects to CO_CONFIG_FLAG_CALLBACK_PRE.
 
#define CO_CONFIG_GLOBAL_RT_FLAG_CALLBACK_PRE   (0)
 This flag may be set globally for Real-Time objects (SYNC, PDO) to CO_CONFIG_FLAG_CALLBACK_PRE.
 
#define CO_CONFIG_GLOBAL_FLAG_TIMERNEXT   (0)
 This flag may be set globally to CO_CONFIG_FLAG_TIMERNEXT.
 
#define CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC   CO_CONFIG_FLAG_OD_DYNAMIC
 This flag may be set globally to (0)
 

Detailed Description

Constants for common definitions.

Macro Definition Documentation

◆ CO_CONFIG_FLAG_CALLBACK_PRE

#define CO_CONFIG_FLAG_CALLBACK_PRE   0x1000

Enable custom callback after CAN receive.

Flag enables optional callback functions, which are part of some CANopenNode objects. Callbacks can optionally be registered by application, which configures threads in operating system. Callbacks are called after something has been preprocessed by higher priority thread and must be further processed by lower priority thread. For example when CAN message is received and preprocessed, callback should wake up mainline processing function. See also CO_process() function.

If callback functions are used, they must be initialized separately, after the object initialization.

This flag is common to multiple configuration macros.

◆ CO_CONFIG_FLAG_TIMERNEXT

#define CO_CONFIG_FLAG_TIMERNEXT   0x2000

Enable calculation of timerNext_us variable.

Calculation of the timerNext_us variable is useful for smooth operation on operating system. See also CO_process() function.

This flag is common to multiple configuration macros.

◆ CO_CONFIG_FLAG_OD_DYNAMIC

#define CO_CONFIG_FLAG_OD_DYNAMIC   0x4000

Enable dynamic behaviour of Object Dictionary variables.

Some CANopen objects uses Object Dictionary variables as arguments to initialization functions, which are processed in communication reset section. If this flag is set, then writing to OD variable will reconfigure corresponding CANopen object also during CANopen normal operation.

This flag is common to multiple configuration macros.