I need tips to comment embedded program, How do you comment code ? If the good comment is written in the code, Then it becomes a little easier to understand someone's code.
For example I've written two comments for single line in the code. What comments would you recommend ?
How to comment code so that it is easier for someone to understand code?
For example I've written two comments for single line in the code. What comments would you recommend ?
C:
void main(void)
{
TRISAbits.TRISA1 = 1
// Configured Port A Pin 1 to input
// Make Port A Pin 1 to input
TRISBbits.TRISB1 = 0
// Configured Port B Pin 1 to output
// Make Port B Pin 1 to output
while (1)
{
}
}