Starting an infinite loop from another cog
I want to send a command from one cog to another that will start an infinite loop in the second cog. example< I am reading an mcp3208 adc in a cog(2 actually as 1 is running a PASM routine to actually read the adc) I want to send a command from COG 0 to the mcp cog with the address of a buffer where to put the results of continuous reads of the adc. I will use the contents of the buffer in my main cog. IF the mcp cog has something like this:
when I call mcp.main will my cog 0 continue to run serving up the contents of ibuff or will it go off and loop forever in the mcp cog?
PUB main(@ibuff) Repeat ibuff == average(1) ibuff == average(2) ... ibuf == average(8)