-#if defined(__IMAGECRAFT__)\r
-#pragma interrupt_handler usart_rx_handler:iv_USART0_RXC\r
-void usart_rx_handler(void)\r
-#else\r
-ISR(USART_RX_vect)\r
+INLINE_FUNC_DECLARE(static void UartStoreRx (uint8_t rx));\r
+static inline void UartStoreRx (uint8_t rx) {\r
+ unsigned char 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