CANopenNode
CO_config.h File Reference

Configuration macros for CANopenNode. More...

Go to the source code of this file.

Macros

#define CO_CONFIG_FLAG_CALLBACK_PRE   0x1000
 Enable custom callback after CAN receive. More...
 
#define CO_CONFIG_FLAG_TIMERNEXT   0x2000
 Enable calculation of timerNext_us variable. More...
 
#define CO_CONFIG_FLAG_OD_DYNAMIC   0x4000
 Enable dynamic behaviour of Object Dictionary variables. More...
 
#define CO_CONFIG_NMT   (0)
 Configuration of NMT and Heartbeat. More...
 
#define CO_CONFIG_HB_CONS   (CO_CONFIG_HB_CONS_ENABLE)
 Configuration of Heartbeat consumer. More...
 
#define CO_CONFIG_HB_CONS_SIZE   8
 Number of heartbeat consumer objects, where each object corresponds to one sub-index in OD object 0x1016, "Consumer heartbeat time". More...
 
#define CO_CONFIG_EM   (CO_CONFIG_EM_PRODUCER | CO_CONFIG_EM_HISTORY)
 Configuration of Emergency. More...
 
#define CO_CONFIG_EM_ERR_STATUS_BITS_COUNT   (10*8)
 Maximum number of CO_EM_errorStatusBits_t. More...
 
#define CO_CONFIG_EM_BUFFER_SIZE   16
 Size of the internal buffer, where emergencies are stored after error indication with CO_error() function. More...
 
#define CO_CONFIG_ERR_CONDITION_GENERIC   (em->errorStatusBits[5] != 0)
 Condition for calculating CANopen Error register, "generic" error bit. More...
 
#define CO_CONFIG_ERR_CONDITION_CURRENT
 Condition for calculating CANopen Error register, "current" error bit. More...
 
#define CO_CONFIG_ERR_CONDITION_VOLTAGE
 Condition for calculating CANopen Error register, "voltage" error bit. More...
 
#define CO_CONFIG_ERR_CONDITION_TEMPERATURE
 Condition for calculating CANopen Error register, "temperature" error bit. More...
 
#define CO_CONFIG_ERR_CONDITION_COMMUNICATION   (em->errorStatusBits[2] || em->errorStatusBits[3])
 Condition for calculating CANopen Error register, "communication" error bit. More...
 
#define CO_CONFIG_ERR_CONDITION_DEV_PROFILE
 Condition for calculating CANopen Error register, "device profile" error bit. More...
 
#define CO_CONFIG_ERR_CONDITION_MANUFACTURER   (em->errorStatusBits[8] || em->errorStatusBits[9])
 Condition for calculating CANopen Error register, "manufacturer" error bit. More...
 
#define CO_CONFIG_SDO_SRV   (CO_CONFIG_SDO_SRV_SEGMENTED)
 Configuration of SDO server. More...
 
#define CO_CONFIG_SDO_SRV_BUFFER_SIZE   32
 Size of the internal data buffer for the SDO server. More...
 
#define CO_CONFIG_SDO_CLI   (0)
 Configuration of SDO client. More...
 
#define CO_CONFIG_SDO_CLI_BUFFER_SIZE   32
 Size of the internal data buffer for the SDO client. More...
 
#define CO_CONFIG_TIME   (0)
 Configuration of TIME. More...
 
#define CO_CONFIG_SYNC   (CO_CONFIG_SYNC_ENABLE | CO_CONFIG_SYNC_PRODUCER)
 Configuration of SYNC. More...
 
#define CO_CONFIG_PDO   (CO_CONFIG_RPDO_ENABLE | CO_CONFIG_TPDO_ENABLE | CO_CONFIG_PDO_SYNC_ENABLE)
 Configuration of PDO. More...
 
#define CO_CONFIG_LEDS   (CO_CONFIG_LEDS_ENABLE)
 Configuration of LED indicators. More...
 
#define CO_CONFIG_GFC   (0)
 Configuration of GFC. More...
 
#define CO_CONFIG_SRDO   (0)
 Configuration of SRDO. More...
 
#define CO_CONFIG_SRDO_MINIMUM_DELAY   0
 SRDO Tx time delay. More...
 
#define CO_CONFIG_LSS   (CO_CONFIG_LSS_SLAVE)
 Configuration of LSS. More...
 
#define CO_CONFIG_GTW   (0)
 Configuration of Gateway ASCII mapping. More...
 
#define CO_CONFIG_GTW_BLOCK_DL_LOOP   1
 Number of loops of CO_SDOclientDownload() in case of block download. More...
 
#define CO_CONFIG_GTWA_COMM_BUF_SIZE   200
 Size of command buffer in ASCII gateway object. More...
 
#define CO_CONFIG_GTWA_LOG_BUF_SIZE   2000
 Size of message log buffer in ASCII gateway object.
 
#define CO_CONFIG_CRC16   (0)
 Configuration of CRC 16 CCITT calculation. More...
 
#define CO_CONFIG_FIFO   (0)
 Configuration of FIFO circular buffer. More...
 
#define CO_CONFIG_TRACE   (0)
 Configuration of Trace for recording variables over time. More...
 
#define CO_CONFIG_DEBUG   (0)
 Configuration of debug messages from different parts of the stack, which can be logged according to target specific function. More...
 

Detailed Description

Configuration macros for CANopenNode.

Author
Janez Paternoster

This file is part of CANopenNode, an opensource CANopen Stack. Project home page is https://github.com/CANopenNode/CANopenNode. For more information on CANopen see http://www.can-cia.org/.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.