spell errors, modernize preprocessor

Thiefmaster fixed some problems regarding typos in varaible names and expanded the buffer size checks to the other uarts

Raffaello modernized the preprocessor directives to a better readable format.