How Can I use port array in one particular Function?

New to XMOS and XCore? Get started here.
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

How Can I use port array in one particular Function?

Postby TonyXiao » Wed Jun 17, 2020 10:50 am

Hi all

here i want using port array parameter for one function.
such as : void fun(port_arry[index])
i defined : port port_array[4] = on tile[2]: {XS1_PORT_1G,XS1_PORT_1H,XS1_PORT_1I,XS1_PORT_1J};
by changing the port array index, different port are function.
but the error report: error: only local variables of type chan or interface are allowed in a multi-tile main.

how can i solve it?
dongore
Junior Member
Posts: 4
Joined: Mon Aug 12, 2019 1:40 pm

Postby dongore » Fri Jul 31, 2020 6:22 pm

I'm having a very similar problem. Did you solve yours?

Who is online

Users browsing this forum: No registered users and 3 guests