+ unsigned char rx, tmphead;\r
+\r
+ if (UCSRA & (1<<FE)) {\r
+ // framing error. Currrently, this is silently ignored\r
+ // real applications may wish to output information to LCD to indicate\r
+ // erroroneous byte received\r
+ return;\r
+ }\r
+#ifdef HANDLE_DATA_OVER_RUN_ERROR\r
+ if (UCSRA & (1<<DOR)) {\r
+ // some applications may benefit from addind error notification for serial port data overruns\r
+ }\r
+#endif\r
+\r
+ rx = UDR;\r