New option for HardwareSerial library.

DigitalJohnson:
@MichaelMeissner

I could do that. However, the way it is now, calling Serial.begin(baudrate) without the extra parameter behaves as it normally would. What would be the point of having a #define you don't need to use? I'm not saying it's a bad idea. Being a GOD member I'm sure you've been doing this far longer than I. I always like to learn. So, if it's not to much to ask, what is the benifit of the extra #define?

All a GOD member means is I have made 500 posts since joining the forum. That and $5 will get me a Carmel Macchiato at Starbucks.

I've been in the compiler business for 30+ years now, mostly on GCC for various ports (powerpc right now), but I have also worked on other compilers. I tend to prefer when you have a flags argument, that all of the possibilities are enumerated via defines, as that can tell the reader of the code that you really want both RX and TX values. In your own code, it doesn't matter (except when you come back to the code after being away from it for 6 months or so as I have done at various times over the years). However I would suggest if you are trying to get the code installed as part of the standard software, that you have such an enumeration. After all, somebody may see the need to have a 3rd argument, or more flag bits being set.