I am having problems with the following code and I have not idea why. If I change the following code to not use a channel array and to pass the channels individually as parameters the problem goes away. The error is "the reasource is not avaliable".
Code does not work.
Code: Select all
void xc2_firmware_config(chanend config_ch[])
{
while (1) {
select
{
case (int i=0;i<num_config_ch;i++) config_ch[i] :> int cmd:
processCommand(config_ch[i], cmd);
break;
}
}
return;
}
Code: Select all
void xc2_firmware_config(chanend config_ch1, chanend config_ch2)
{
while (1) {
select
{
case config_ch1 :> int cmd:
processCommand(config_ch1, cmd);
break;
case config_ch2:> int cmd:
processCommand(config_ch2, cmd);
break;
}
}
return;
}
Is there something I am missing.
Cheers
Matt