I have a SPIN/PASM application with 4 nearly identical cogs. The cogs are adapted from Full Duplex Serial, but know the trigger input and serial protocol. They transmit on trigger and retry autonomously on receivce failures. The cogs differ only by a VERSION line at the end of each one (thanks to Tracy Allen). My SPIN top level has about 10 functions like this:
I'm up against memory limits and could use a more compact syntax like <MOD>.rxflush, but SPIN doesn't seem to let me assign a MOD value like UidTid to a variable. I would vastly prefer to do something like:
mod_p := UidTid
A jump table would also work. Am I right in thinking SPIN doesn't provide either?