diff --git a/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp b/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp index 48fd35b..843891e 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp @@ -97,7 +97,8 @@ uint8_t* EcatTelegram::unpack(uint8_t *raw) { } void EcatTelegram::transfer() { - bool stat = eth_stack_.send_pkt(port_id_, ETH_PROT_ECAT_LE, 1); + //bool stat = eth_stack_.send_pkt(port_id_, ETH_PROT_ECAT_LE, 1); + bool stat = tx_flow_.send(port_id_, this, 1); if(stat == false) { DebugP_log((char*)"telegram transfer error !\r\n"); diff --git a/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp b/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp index 1ecf80f..319591c 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp @@ -20,6 +20,7 @@ class EcatTelegram : public Handler { public: EcatTelegram(Eth& eth) : eth_{eth} + , tx_flow_{*eth.getTxFlowPtr()} , eth_stack_{*eth.getEthStackPtr()} { } virtual int32_t Process(uint8_t *p_data, uint32_t len) override; @@ -35,6 +36,7 @@ public: private: Eth& eth_; + EthTxFlowIface& tx_flow_; EthStackIface& eth_stack_; TEthMacPorts port_id_;