diff --git a/soes/esc_coe.h b/soes/esc_coe.h index 6223909..fb128e1 100644 --- a/soes/esc_coe.h +++ b/soes/esc_coe.h @@ -12,6 +12,7 @@ #define __esc_coe__ #include +#include "options.h" typedef struct @@ -133,6 +134,11 @@ extern uint32_t ESC_upload_pre_objecthandler (uint16_t index, size_t *size, uint16_t flags); extern uint32_t ESC_upload_post_objecthandler (uint16_t index, uint8_t subindex, uint16_t flags); + +#if USE_CONST_OBJECTLIST extern const _objectlist SDOobjects[]; +#else +extern _objectlist SDOobjects[]; +#endif #endif diff --git a/soes/options.h b/soes/options.h index 3415e07..033aa5f 100644 --- a/soes/options.h +++ b/soes/options.h @@ -9,6 +9,11 @@ /* User-defined options, Options defined here will override default values */ #include "ecat_options.h" +/* SDOobjects to be provided as const */ +#ifndef USE_CONST_OBJECTLIST +#define USE_CONST_OBJECTLIST 1 +#endif + /* FoE support */ #ifndef USE_FOE #define USE_FOE 1