Code: Select all
case p_spi_irq when pinsneq(spi_irq_current_val) :> spi_irq_current_val:
When I moved this to a separate task which listened for that pin (same code) then it it was picked up. It then signalled on a channel that then replaced the code line above. It was of course also only taken when the code evaluated the select.
Could I have used a buffered input port for this and kept the original code (and saved a thread and a two chanends)? I can't find the exact code pattern in 6.9 Using a buffered port in XMOS-Programming-Guide-_documentation_F. If yes, how would the code be?-)