As so, I have two functions reading incoming packets on different cores and a demo application that checks both ports and acts accordingly.
My novice question is how can I use a select statement with these two channels carrying buffers to implement a "whichever comes first" situation.
My initial thought was to have something like the code below, however it turns out that xmos doesn't allow channels to be inputed to void. (error: input from channel with unspecified size)
Code: Select all
select{
case rxCircle :> void:
mac_rx(rxCircle, (rxbufCircle,char[]), nbytes, src_port);
break;
case rxTriangle :> void:
mac_rx(rxTriangle, (rxbufTriangle,char[]), nbytes, src_port);
break;
}
Dimitris