how to call interface function in multiple sub-functions in one task

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
knight_hu
Newbie
Posts: 1
Joined: Sun Aug 04, 2019 11:46 am

how to call interface function in multiple sub-functions in one task

Postby knight_hu » Sun Aug 04, 2019 11:53 am

Hello,
We want to make customized ethernet protocol task. This task will connect to ethernet Mac library by means of interface. Inside the customized task will call many kinds of sub functions by a certain steps,in each sub-function we want to call the interface send to Ethernet MAC lib then waiting for the receive from the receive interface. We take a look in many examples from the IDE but not found any useful way. Could you help to tell us how to achieve this? Or any useful example use this kind of technic?
Thank you very much!
MuellerNick
Member++
Posts: 30
Joined: Fri Dec 11, 2009 9:33 am

Postby MuellerNick » Mon Aug 05, 2019 10:18 am

You will have to supply your interfaces when you start your ETH-Task

interface interfaceETH ifETH[3]
par {
  ModifiedETH(ifETH);
  ETHCallback1(ifETH[0]);
  ETHCallBack2(ifETH[1]);
  ETHCallBack3(ifETH[2]);
}
There is an example in the introduction to programming the XMOS (don't know the exact name).

Nick

Who is online

Users browsing this forum: No registered users and 1 guest