Hi.
I am giving something some thought.
I would like to create a header file that will contain all of the information regarding each pin.
Code:
//example
ANSELAbits.ANS1 = 0; //set to digital
TRISAbits.TRISA1 = 0; //set as output
#define LED1 PORTAbits.RA1 //define pin name
I want to do the above for each pin (a 100 pin PIC32) so that they are easier to manage in one place.
I know that i can add #define within the .h file. But im not so sure about the setting of the registers.
Is there a "best practice" for this type of thing?