Does anyone understand the Gaureded section of the XMOS Programming manual? Can you please explain in grave detail, cause the manual is useless on this topic.
Here is a specific issue I am running into.
My gorgeous ERRORS!
C:/Users/Steve/workspace/module_avb_flash/src/spi.xc:54: error: select does not select on function `command_status' of interface `spi_interface' which is not marked as [[guarded]]
C:/Users/Steve/workspace/module_avb_flash/src/spi.xc:54: error: select does not select on function `command_address_status' of interface `spi_interface' which is not marked as [[guarded]]
C:/Users/Steve/workspace/module_avb_flash/src/spi.xc:54: error: select does not select on function `send_spi_irq' of interface `spi_interface' which is not marked as [[guarded]]
The example in the programming manual:
/***************************************/
interface if1 {
void f();
[[ guarded ]] void g(); // this function may be guarded in the program
}
..
select {
case i.f():
...
break ;
case e => i.g():
...
break ;
}
/***************************************/
int periodic_enabled ;
timer tmr ;
uint32_t t;
...
select {
case periodic_enabled => tmr when timerafter (t) :> void :
..
break ;
case ...
}
/***************************************/
How do you handle guarding the case statment if it is an interface connection such as below?
i1.fA(int x):
break;