Is there an advantage to set pinmodes via bitmask and register?
Is there an advantage to set pinmodes via bitmask and register?


I can name a few:

1) speed - I benchmarked the arduino pin ops vs. direct register ops here;

2) size - the code size is considerably bigger with the arduino library;

3) portability - the bitmark approach is supported by any C-compiler;

4) convention - i'm used to the bitmask approach and wrote all of my libraries around it;
...

as i'm sure others have their reasons to use the bitmasks.