diff --git a/components/free_rtos/ethernet_industry/eth_ecat_api.cpp b/components/free_rtos/ethernet_industry/eth_ecat_api.cpp index f95bc9b..2c042cf 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_api.cpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_api.cpp @@ -11,9 +11,11 @@ namespace free_rtos { Eth *EthEcatApi::eth_{nullptr}; -bool EthEcatApi::init(Eth& eth, TEthMacPorts port_id, uint16_t address_base) { +void EthEcatApi::init(Eth& eth) { eth_ = ð +} +bool EthEcatApi::config_init(TEthMacPorts port_id, uint16_t address_base) { bool status = false; get_ecat().Init(port_id); diff --git a/components/free_rtos/ethernet_industry/eth_ecat_api.hpp b/components/free_rtos/ethernet_industry/eth_ecat_api.hpp index 67e3270..42c68c8 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_api.hpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_api.hpp @@ -20,7 +20,8 @@ namespace free_rtos { class EthEcatApi { public: - static bool init(Eth& eth, TEthMacPorts port_id, uint16_t address_base); + static void init(Eth& eth); + static bool config_init(TEthMacPorts port_id, uint16_t address_base); static void process(); // Внутри бесконечный цикл. Запускать в отдельном потоке static std::vector& get_ecat_pdo_map();