CANopenNode
CO_config.h
Go to the documentation of this file.
1 
27 #ifndef CO_CONFIG_FLAGS_H
28 #define CO_CONFIG_FLAGS_H
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
78 #define CO_CONFIG_FLAG_CALLBACK_PRE 0x1000
79 
88 #define CO_CONFIG_FLAG_TIMERNEXT 0x2000
89 
100 #define CO_CONFIG_FLAG_OD_DYNAMIC 0x4000
101  /* CO_STACK_CONFIG_COMMON */
102 
103 
122 #ifdef CO_DOXYGEN
123 #define CO_CONFIG_NMT (0)
124 #endif
125 #define CO_CONFIG_NMT_CALLBACK_CHANGE 0x01
126 #define CO_CONFIG_NMT_MASTER 0x02
127 
152 #ifdef CO_DOXYGEN
153 #define CO_CONFIG_HB_CONS (CO_CONFIG_HB_CONS_ENABLE)
154 #endif
155 #define CO_CONFIG_HB_CONS_ENABLE 0x01
156 #define CO_CONFIG_HB_CONS_CALLBACK_CHANGE 0x02
157 #define CO_CONFIG_HB_CONS_CALLBACK_MULTI 0x04
158 #define CO_CONFIG_HB_CONS_QUERY_FUNCT 0x08
159 
166 #ifdef CO_DOXYGEN
167 #define CO_CONFIG_HB_CONS_SIZE 8
168 #endif
169  /* CO_STACK_CONFIG_NMT_HB */
170 
171 
196 #ifdef CO_DOXYGEN
197 #define CO_CONFIG_EM (CO_CONFIG_EM_PRODUCER | CO_CONFIG_EM_HISTORY)
198 #endif
199 #define CO_CONFIG_EM_PRODUCER 0x01
200 #define CO_CONFIG_EM_PROD_CONFIGURABLE 0x02
201 #define CO_CONFIG_EM_PROD_INHIBIT 0x04
202 #define CO_CONFIG_EM_HISTORY 0x08
203 #define CO_CONFIG_EM_STATUS_BITS 0x10
204 #define CO_CONFIG_EM_CONSUMER 0x20
205 
213 #ifdef CO_DOXYGEN
214 #define CO_CONFIG_EM_ERR_STATUS_BITS_COUNT (10*8)
215 #endif
216 
227 #ifdef CO_DOXYGEN
228 #define CO_CONFIG_EM_BUFFER_SIZE 16
229 #endif
230 
245 #ifdef CO_DOXYGEN
246 #define CO_CONFIG_ERR_CONDITION_GENERIC (em->errorStatusBits[5] != 0)
247 #endif
248 
254 #ifdef CO_DOXYGEN
255 #define CO_CONFIG_ERR_CONDITION_CURRENT
256 #endif
257 
263 #ifdef CO_DOXYGEN
264 #define CO_CONFIG_ERR_CONDITION_VOLTAGE
265 #endif
266 
272 #ifdef CO_DOXYGEN
273 #define CO_CONFIG_ERR_CONDITION_TEMPERATURE
274 #endif
275 
283 #ifdef CO_DOXYGEN
284 #define CO_CONFIG_ERR_CONDITION_COMMUNICATION (em->errorStatusBits[2] || em->errorStatusBits[3])
285 #endif
286 
292 #ifdef CO_DOXYGEN
293 #define CO_CONFIG_ERR_CONDITION_DEV_PROFILE
294 #endif
295 
303 #ifdef CO_DOXYGEN
304 #define CO_CONFIG_ERR_CONDITION_MANUFACTURER (em->errorStatusBits[8] || em->errorStatusBits[9])
305 #endif
306  /* CO_STACK_CONFIG_EMERGENCY */
307 
308 
328 #ifdef CO_DOXYGEN
329 #define CO_CONFIG_SDO_SRV (CO_CONFIG_SDO_SRV_SEGMENTED)
330 #endif
331 #define CO_CONFIG_SDO_SRV_SEGMENTED 0x02
332 #define CO_CONFIG_SDO_SRV_BLOCK 0x04
333 
341 #ifdef CO_DOXYGEN
342 #define CO_CONFIG_SDO_SRV_BUFFER_SIZE 32
343 #endif
344 
366 #ifdef CO_DOXYGEN
367 #define CO_CONFIG_SDO_CLI (0)
368 #endif
369 #define CO_CONFIG_SDO_CLI_ENABLE 0x01
370 #define CO_CONFIG_SDO_CLI_SEGMENTED 0x02
371 #define CO_CONFIG_SDO_CLI_BLOCK 0x04
372 #define CO_CONFIG_SDO_CLI_LOCAL 0x08
373 
385 #ifdef CO_DOXYGEN
386 #define CO_CONFIG_SDO_CLI_BUFFER_SIZE 32
387 #endif
388  /* CO_STACK_CONFIG_SDO */
389 
390 
405 #ifdef CO_DOXYGEN
406 #define CO_CONFIG_TIME (0)
407 #endif
408 #define CO_CONFIG_TIME_ENABLE 0x01
409 #define CO_CONFIG_TIME_PRODUCER 0x02
410  /* CO_STACK_CONFIG_TIME */
411 
412 
429 #ifdef CO_DOXYGEN
430 #define CO_CONFIG_SYNC (CO_CONFIG_SYNC_ENABLE | CO_CONFIG_SYNC_PRODUCER)
431 #endif
432 #define CO_CONFIG_SYNC_ENABLE 0x01
433 #define CO_CONFIG_SYNC_PRODUCER 0x02
434 
452 #ifdef CO_DOXYGEN
453 #define CO_CONFIG_PDO (CO_CONFIG_RPDO_ENABLE | CO_CONFIG_TPDO_ENABLE | CO_CONFIG_PDO_SYNC_ENABLE)
454 #endif
455 #define CO_CONFIG_RPDO_ENABLE 0x01
456 #define CO_CONFIG_TPDO_ENABLE 0x02
457 #define CO_CONFIG_PDO_SYNC_ENABLE 0x04
458 #define CO_CONFIG_RPDO_CALLS_EXTENSION 0x08
459 #define CO_CONFIG_TPDO_CALLS_EXTENSION 0x10
460  /* CO_STACK_CONFIG_SYNC_PDO */
461 
462 
476 #ifdef CO_DOXYGEN
477 #define CO_CONFIG_LEDS (CO_CONFIG_LEDS_ENABLE)
478 #endif
479 #define CO_CONFIG_LEDS_ENABLE 0x01
480  /* CO_STACK_CONFIG_LEDS */
481 
482 
496 #ifdef CO_DOXYGEN
497 #define CO_CONFIG_GFC (0)
498 #endif
499 #define CO_CONFIG_GFC_ENABLE 0x01
500 #define CO_CONFIG_GFC_CONSUMER 0x02
501 #define CO_CONFIG_GFC_PRODUCER 0x04
502 
519 #ifdef CO_DOXYGEN
520 #define CO_CONFIG_SRDO (0)
521 #endif
522 #define CO_CONFIG_SRDO_ENABLE 0x01
523 #define CO_CONFIG_SRDO_CHECK_TX 0x02
524 #define CO_CONFIG_RSRDO_CALLS_EXTENSION 0x04
525 #define CO_CONFIG_TSRDO_CALLS_EXTENSION 0x08
526 
533 #ifdef CO_DOXYGEN
534 #define CO_CONFIG_SRDO_MINIMUM_DELAY 0
535 #endif
536  /* CO_STACK_CONFIG_SRDO */
537 
538 
556 #ifdef CO_DOXYGEN
557 #define CO_CONFIG_LSS (CO_CONFIG_LSS_SLAVE)
558 #endif
559 #define CO_CONFIG_LSS_SLAVE 0x01
560 #define CO_CONFIG_LSS_SLAVE_FASTSCAN_DIRECT_RESPOND 0x02
561 #define CO_CONFIG_LSS_MASTER 0x10
562  /* CO_STACK_CONFIG_LSS */
563 
564 
594 #ifdef CO_DOXYGEN
595 #define CO_CONFIG_GTW (0)
596 #endif
597 #define CO_CONFIG_GTW_MULTI_NET 0x01
598 #define CO_CONFIG_GTW_ASCII 0x02
599 #define CO_CONFIG_GTW_ASCII_SDO 0x04
600 #define CO_CONFIG_GTW_ASCII_NMT 0x08
601 #define CO_CONFIG_GTW_ASCII_LSS 0x10
602 #define CO_CONFIG_GTW_ASCII_LOG 0x20
603 #define CO_CONFIG_GTW_ASCII_ERROR_DESC 0x40
604 #define CO_CONFIG_GTW_ASCII_PRINT_HELP 0x80
605 #define CO_CONFIG_GTW_ASCII_PRINT_LEDS 0x100
606 
614 #ifdef CO_DOXYGEN
615 #define CO_CONFIG_GTW_BLOCK_DL_LOOP 1
616 #endif
617 
624 #ifdef CO_DOXYGEN
625 #define CO_CONFIG_GTWA_COMM_BUF_SIZE 200
626 #endif
627 
631 #ifdef CO_DOXYGEN
632 #define CO_CONFIG_GTWA_LOG_BUF_SIZE 2000
633 #endif
634  /* CO_STACK_CONFIG_GATEWAY */
635 
636 
649 #ifdef CO_DOXYGEN
650 #define CO_CONFIG_CRC16 (0)
651 #endif
652 #define CO_CONFIG_CRC16_ENABLE 0x01
653 #define CO_CONFIG_CRC16_EXTERNAL 0x02
654  /* CO_STACK_CONFIG_CRC16 */
655 
656 
683 #ifdef CO_DOXYGEN
684 #define CO_CONFIG_FIFO (0)
685 #endif
686 #define CO_CONFIG_FIFO_ENABLE 0x01
687 #define CO_CONFIG_FIFO_ALT_READ 0x02
688 #define CO_CONFIG_FIFO_CRC16_CCITT 0x04
689 #define CO_CONFIG_FIFO_ASCII_COMMANDS 0x08
690 #define CO_CONFIG_FIFO_ASCII_DATATYPES 0x10
691  /* CO_STACK_CONFIG_FIFO */
692 
693 
707 #ifdef CO_DOXYGEN
708 #define CO_CONFIG_TRACE (0)
709 #endif
710 #define CO_CONFIG_TRACE_ENABLE 0x01
711 #define CO_CONFIG_TRACE_OWN_INTTYPES 0x02
712  /* CO_STACK_CONFIG_TRACE */
713 
714 
731 #ifdef CO_DOXYGEN
732 #define CO_CONFIG_DEBUG (0)
733 #endif
734 #define CO_CONFIG_DEBUG_COMMON 0x01
735 #define CO_CONFIG_DEBUG_SDO_CLIENT 0x02
736 #define CO_CONFIG_DEBUG_SDO_SERVER 0x04
737  /* CO_STACK_CONFIG_DEBUG */
738  /* CO_STACK_CONFIG */
740 
741 #ifdef __cplusplus
742 }
743 #endif /* __cplusplus */
744 
745 #endif /* CO_CONFIG_FLAGS_H */