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

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
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

Post by knight_hu »

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: 31
Joined: Fri Dec 11, 2009 9:33 am

Post by MuellerNick »

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
Post Reply