Passing variables between Objects
Good day all on the forum.
I've got a problem swapping (on the fly) what pins are assigned for SDA and SCL in I2C PASM Driver v1.80d.spin written by Chris Gadd. The PCB has two I2C buses but I need to use only one instance of the I2C PASM driver (no more cogs!) !
So, instead of having to stop/start the cog with new values each time I have to change the BUS, I wanted to add the function to update the the variables SCL_mask and SDA_mask in the object from the main spin cog.
Firstly, is it possible and secondly ..... how?
Any help would be much appreciated