Hi. I have a class that incorporates port manipulation. I want to be able to create multiple objects within a project using the same class, but be able to assign the port at the point of object creation.
So to create my object, I’m looking for something along the lines of...
But I’m not sure what data type I can assign to port to then use within the class object to assign a port of my manipulation steps, if that makes sense?!?
For MyObject 1, I might want to call PORTB, but in MyObject 2 it might be PORTD...
Any ideas how best to pass the port name into the class object effectively?
All of the stuff within the class I’m sorted on in terms of what happens to the port within the class functions, but just getting the port name into the object is the bit I’m struggling with.