I often use macro to define pins, like
#define output RA5
So that, in the code I could use, like
output = 1;
I do this so that If at any time I need to change the pin, I need to only correct the #define part.
Thats good and everyone seems to do that.
But thats not all of the story.What I am concerned is, you need to set TRIS register as well. So, often I find myself doing
...
TRISA5 = 0;
output = 1;
...
which completely ruins the purpose of defining macro.
What I am searching is something like this
...
#define output A5
...
...
TRISoutput = 0;
Routput = 1;
WPUoutput = 1;
...
... //etc
Of course, it won't work that way, so I am searching for workaround?