add userdata to ec_context

This commit is contained in:
Alex Brinkman 2021-02-13 12:26:38 -08:00
parent 61668c71b7
commit 59821cb410
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules")
project(SOEM C) cmake_policy(SET CMP0048 NEW)
project(SOEM
DESCRIPTION "Simple Open EtherCAT Master"
VERSION 1.4.0
LANGUAGES C)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Default to installing in SOEM source directory # Default to installing in SOEM source directory

View File

@ -426,6 +426,9 @@ struct ecx_context
int (*EOEhook)(ecx_contextt * context, uint16 slave, void * eoembx); int (*EOEhook)(ecx_contextt * context, uint16 slave, void * eoembx);
/** flag to control legacy automatic state change or manual state change */ /** flag to control legacy automatic state change or manual state change */
int manualstatechange; int manualstatechange;
/** userdata, promotes application configuration esp. in EC_VER2 with multiple
* ec_context instances. Note: userdata memory is managed by application, not SOEM */
void *userdata;
}; };
#ifdef EC_VER1 #ifdef EC_VER1