CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
301
CO_config.h
Go to the documentation of this file.
1
21
#ifndef CO_CONFIG_FLAGS_H
22
#define CO_CONFIG_FLAGS_H
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
72
#define CO_CONFIG_FLAG_CALLBACK_PRE 0x1000
73
82
#define CO_CONFIG_FLAG_TIMERNEXT 0x2000
83
94
#define CO_CONFIG_FLAG_OD_DYNAMIC 0x4000
95
98
#ifdef CO_DOXYGEN
99
#define CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE (0)
100
#endif
101
104
#ifdef CO_DOXYGEN
105
#define CO_CONFIG_GLOBAL_RT_FLAG_CALLBACK_PRE (0)
106
#endif
107
109
#ifdef CO_DOXYGEN
110
#define CO_CONFIG_GLOBAL_FLAG_TIMERNEXT (0)
111
#endif
112
114
#ifdef CO_DOXYGEN
115
#define CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC CO_CONFIG_FLAG_OD_DYNAMIC
116
#endif
117
/* CO_STACK_CONFIG_COMMON */
118
138
#ifdef CO_DOXYGEN
139
#define CO_CONFIG_NMT (CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE | CO_CONFIG_GLOBAL_FLAG_TIMERNEXT)
140
#endif
141
#define CO_CONFIG_NMT_CALLBACK_CHANGE 0x01
142
#define CO_CONFIG_NMT_MASTER 0x02
143
171
#ifdef CO_DOXYGEN
172
#define CO_CONFIG_HB_CONS \
173
(CO_CONFIG_HB_CONS_ENABLE | CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE | CO_CONFIG_GLOBAL_FLAG_TIMERNEXT \
174
| CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC)
175
#endif
176
#define CO_CONFIG_HB_CONS_ENABLE 0x01
177
#define CO_CONFIG_HB_CONS_CALLBACK_CHANGE 0x02
178
#define CO_CONFIG_HB_CONS_CALLBACK_MULTI 0x04
179
#define CO_CONFIG_HB_CONS_QUERY_FUNCT 0x08
180
/* CO_STACK_CONFIG_NMT_HB */
181
196
#ifdef CO_DOXYGEN
197
#define CO_CONFIG_NODE_GUARDING (0)
198
#endif
199
#define CO_CONFIG_NODE_GUARDING_SLAVE_ENABLE 0x01
200
#define CO_CONFIG_NODE_GUARDING_MASTER_ENABLE 0x02
201
205
#ifdef CO_DOXYGEN
206
#define CO_CONFIG_NODE_GUARDING_MASTER_COUNT 0x7F
207
#endif
208
/* CO_STACK_CONFIG_NODE_GUARDING */
209
235
#ifdef CO_DOXYGEN
236
#define CO_CONFIG_EM \
237
(CO_CONFIG_EM_PRODUCER | CO_CONFIG_EM_HISTORY | CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE \
238
| CO_CONFIG_GLOBAL_FLAG_TIMERNEXT)
239
#endif
240
#define CO_CONFIG_EM_PRODUCER 0x01
241
#define CO_CONFIG_EM_PROD_CONFIGURABLE 0x02
242
#define CO_CONFIG_EM_PROD_INHIBIT 0x04
243
#define CO_CONFIG_EM_HISTORY 0x08
244
#define CO_CONFIG_EM_STATUS_BITS 0x10
245
#define CO_CONFIG_EM_CONSUMER 0x20
246
254
#ifdef CO_DOXYGEN
255
#define CO_CONFIG_EM_ERR_STATUS_BITS_COUNT (10 * 8)
256
#endif
257
272
#ifdef CO_DOXYGEN
273
#define CO_CONFIG_ERR_CONDITION_GENERIC (em->errorStatusBits[5] != 0)
274
#endif
275
281
#ifdef CO_DOXYGEN
282
#define CO_CONFIG_ERR_CONDITION_CURRENT
283
#endif
284
290
#ifdef CO_DOXYGEN
291
#define CO_CONFIG_ERR_CONDITION_VOLTAGE
292
#endif
293
299
#ifdef CO_DOXYGEN
300
#define CO_CONFIG_ERR_CONDITION_TEMPERATURE
301
#endif
302
310
#ifdef CO_DOXYGEN
311
#define CO_CONFIG_ERR_CONDITION_COMMUNICATION (em->errorStatusBits[2] || em->errorStatusBits[3])
312
#endif
313
319
#ifdef CO_DOXYGEN
320
#define CO_CONFIG_ERR_CONDITION_DEV_PROFILE
321
#endif
322
330
#ifdef CO_DOXYGEN
331
#define CO_CONFIG_ERR_CONDITION_MANUFACTURER (em->errorStatusBits[8] || em->errorStatusBits[9])
332
#endif
333
/* CO_STACK_CONFIG_EMERGENCY */
334
355
#ifdef CO_DOXYGEN
356
#define CO_CONFIG_SDO_SRV \
357
(CO_CONFIG_SDO_SRV_SEGMENTED | CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE | CO_CONFIG_GLOBAL_FLAG_TIMERNEXT \
358
| CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC)
359
#endif
360
#define CO_CONFIG_SDO_SRV_SEGMENTED 0x02
361
#define CO_CONFIG_SDO_SRV_BLOCK 0x04
362
370
#ifdef CO_DOXYGEN
371
#define CO_CONFIG_SDO_SRV_BUFFER_SIZE 32
372
#endif
373
395
#ifdef CO_DOXYGEN
396
#define CO_CONFIG_SDO_CLI (0)
397
#endif
398
#define CO_CONFIG_SDO_CLI_ENABLE 0x01
399
#define CO_CONFIG_SDO_CLI_SEGMENTED 0x02
400
#define CO_CONFIG_SDO_CLI_BLOCK 0x04
401
#define CO_CONFIG_SDO_CLI_LOCAL 0x08
402
414
#ifdef CO_DOXYGEN
415
#define CO_CONFIG_SDO_CLI_BUFFER_SIZE 32
416
#endif
417
/* CO_STACK_CONFIG_SDO */
418
436
#ifdef CO_DOXYGEN
437
#define CO_CONFIG_TIME (CO_CONFIG_TIME_ENABLE | CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE | CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC)
438
#endif
439
#define CO_CONFIG_TIME_ENABLE 0x01
440
#define CO_CONFIG_TIME_PRODUCER 0x02
441
/* CO_STACK_CONFIG_TIME */
442
461
#ifdef CO_DOXYGEN
462
#define CO_CONFIG_SYNC \
463
(CO_CONFIG_SYNC_ENABLE | CO_CONFIG_SYNC_PRODUCER | CO_CONFIG_GLOBAL_RT_FLAG_CALLBACK_PRE \
464
| CO_CONFIG_GLOBAL_FLAG_TIMERNEXT | CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC)
465
#endif
466
#define CO_CONFIG_SYNC_ENABLE 0x01
467
#define CO_CONFIG_SYNC_PRODUCER 0x02
468
492
#ifdef CO_DOXYGEN
493
#define CO_CONFIG_PDO \
494
(CO_CONFIG_RPDO_ENABLE | CO_CONFIG_TPDO_ENABLE | CO_CONFIG_RPDO_TIMERS_ENABLE | CO_CONFIG_TPDO_TIMERS_ENABLE \
495
| CO_CONFIG_PDO_SYNC_ENABLE | CO_CONFIG_PDO_OD_IO_ACCESS | CO_CONFIG_GLOBAL_RT_FLAG_CALLBACK_PRE \
496
| CO_CONFIG_GLOBAL_FLAG_TIMERNEXT | CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC)
497
#endif
498
#define CO_CONFIG_RPDO_ENABLE 0x01
499
#define CO_CONFIG_TPDO_ENABLE 0x02
500
#define CO_CONFIG_RPDO_TIMERS_ENABLE 0x04
501
#define CO_CONFIG_TPDO_TIMERS_ENABLE 0x08
502
#define CO_CONFIG_PDO_SYNC_ENABLE 0x10
503
#define CO_CONFIG_PDO_OD_IO_ACCESS 0x20
504
/* CO_STACK_CONFIG_SYNC_PDO */
505
517
#ifdef CO_DOXYGEN
518
#define CO_CONFIG_STORAGE (CO_CONFIG_STORAGE_ENABLE)
519
#endif
520
#define CO_CONFIG_STORAGE_ENABLE 0x01
521
/* CO_STACK_CONFIG_STORAGE */
522
536
#ifdef CO_DOXYGEN
537
#define CO_CONFIG_LEDS (CO_CONFIG_LEDS_ENABLE | CO_CONFIG_GLOBAL_FLAG_TIMERNEXT)
538
#endif
539
#define CO_CONFIG_LEDS_ENABLE 0x01
540
/* CO_STACK_CONFIG_LEDS */
541
555
#ifdef CO_DOXYGEN
556
#define CO_CONFIG_GFC (0)
557
#endif
558
#define CO_CONFIG_GFC_ENABLE 0x01
559
#define CO_CONFIG_GFC_CONSUMER 0x02
560
#define CO_CONFIG_GFC_PRODUCER 0x04
561
574
#ifdef CO_DOXYGEN
575
#define CO_CONFIG_SRDO (0)
576
#endif
577
#define CO_CONFIG_SRDO_ENABLE 0x01
578
#define CO_CONFIG_SRDO_CHECK_TX 0x02
579
586
#ifdef CO_DOXYGEN
587
#define CO_CONFIG_SRDO_MINIMUM_DELAY 0
588
#endif
589
/* CO_STACK_CONFIG_SRDO */
590
608
#ifdef CO_DOXYGEN
609
#define CO_CONFIG_LSS (CO_CONFIG_LSS_SLAVE | CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE)
610
#endif
611
#define CO_CONFIG_LSS_SLAVE 0x01
612
#define CO_CONFIG_LSS_SLAVE_FASTSCAN_DIRECT_RESPOND 0x02
613
#define CO_CONFIG_LSS_MASTER 0x10
614
/* CO_STACK_CONFIG_LSS */
615
645
#ifdef CO_DOXYGEN
646
#define CO_CONFIG_GTW (0)
647
#endif
648
#define CO_CONFIG_GTW_MULTI_NET 0x01
649
#define CO_CONFIG_GTW_ASCII 0x02
650
#define CO_CONFIG_GTW_ASCII_SDO 0x04
651
#define CO_CONFIG_GTW_ASCII_NMT 0x08
652
#define CO_CONFIG_GTW_ASCII_LSS 0x10
653
#define CO_CONFIG_GTW_ASCII_LOG 0x20
654
#define CO_CONFIG_GTW_ASCII_ERROR_DESC 0x40
655
#define CO_CONFIG_GTW_ASCII_PRINT_HELP 0x80
656
#define CO_CONFIG_GTW_ASCII_PRINT_LEDS 0x100
657
665
#ifdef CO_DOXYGEN
666
#define CO_CONFIG_GTW_BLOCK_DL_LOOP 1
667
#endif
668
675
#ifdef CO_DOXYGEN
676
#define CO_CONFIG_GTWA_COMM_BUF_SIZE 200
677
#endif
678
682
#ifdef CO_DOXYGEN
683
#define CO_CONFIG_GTWA_LOG_BUF_SIZE 2000
684
#endif
685
/* CO_STACK_CONFIG_GATEWAY */
686
699
#ifdef CO_DOXYGEN
700
#define CO_CONFIG_CRC16 (0)
701
#endif
702
#define CO_CONFIG_CRC16_ENABLE 0x01
703
#define CO_CONFIG_CRC16_EXTERNAL 0x02
704
/* CO_STACK_CONFIG_CRC16 */
705
732
#ifdef CO_DOXYGEN
733
#define CO_CONFIG_FIFO (0)
734
#endif
735
#define CO_CONFIG_FIFO_ENABLE 0x01
736
#define CO_CONFIG_FIFO_ALT_READ 0x02
737
#define CO_CONFIG_FIFO_CRC16_CCITT 0x04
738
#define CO_CONFIG_FIFO_ASCII_COMMANDS 0x08
739
#define CO_CONFIG_FIFO_ASCII_DATATYPES 0x10
740
/* CO_STACK_CONFIG_FIFO */
741
755
#ifdef CO_DOXYGEN
756
#define CO_CONFIG_TRACE (0)
757
#endif
758
#define CO_CONFIG_TRACE_ENABLE 0x01
759
#define CO_CONFIG_TRACE_OWN_INTTYPES 0x02
760
/* CO_STACK_CONFIG_TRACE */
761
778
#ifdef CO_DOXYGEN
779
#define CO_CONFIG_DEBUG (0)
780
#endif
781
#define CO_CONFIG_DEBUG_COMMON 0x01
782
#define CO_CONFIG_DEBUG_SDO_CLIENT 0x02
783
#define CO_CONFIG_DEBUG_SDO_SERVER 0x04
784
/* CO_STACK_CONFIG_DEBUG */
785
786
/* CO_STACK_CONFIG */
787
788
#ifdef __cplusplus
789
}
790
#endif
/* __cplusplus */
791
792
#endif
/* CO_CONFIG_FLAGS_H */
Generated by
1.11.0