- (void) irmp_ISR ();\r
-\r
- if (irmp_get_data (&irmp_data))\r
- {\r
- uint_fast8_t key;\r
-\r
- ANALYZE_ONLY_NORMAL_PUTCHAR (' ');\r
-\r
- if (verbose)\r
- {\r
- printf ("%8.3fms ", (double) (time_counter * 1000) / F_INTERRUPTS);\r
- }\r
-\r
- if (irmp_data.protocol == IRMP_ACP24_PROTOCOL)\r
- {\r
- uint16_t temp = (irmp_data.command & 0x000F) + 15;\r
-\r
- printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, temp=%d",\r
- irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, temp);\r
- }\r
- else if (irmp_data.protocol == IRMP_FDC_PROTOCOL && (key = get_fdc_key (irmp_data.command)) != 0)\r
- {\r
- if ((key >= 0x20 && key < 0x7F) || key >= 0xA0)\r
- {\r
- printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, asc=0x%02x, key='%c'",\r
- irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, key, key);\r
- }\r
- else if (key == '\r' || key == '\t' || key == KEY_ESCAPE || (key >= 0x80 && key <= 0x9F)) // function keys\r
- {\r
- char * p = (char *) NULL;\r
-\r
- switch (key)\r
- {\r
- case '\t' : p = "TAB"; break;\r
- case '\r' : p = "CR"; break;\r
- case KEY_ESCAPE : p = "ESCAPE"; break;\r
- case KEY_MENUE : p = "MENUE"; break;\r
- case KEY_BACK : p = "BACK"; break;\r
- case KEY_FORWARD : p = "FORWARD"; break;\r
- case KEY_ADDRESS : p = "ADDRESS"; break;\r
- case KEY_WINDOW : p = "WINDOW"; break;\r
- case KEY_1ST_PAGE : p = "1ST_PAGE"; break;\r
- case KEY_STOP : p = "STOP"; break;\r
- case KEY_MAIL : p = "MAIL"; break;\r
- case KEY_FAVORITES : p = "FAVORITES"; break;\r
- case KEY_NEW_PAGE : p = "NEW_PAGE"; break;\r
- case KEY_SETUP : p = "SETUP"; break;\r
- case KEY_FONT : p = "FONT"; break;\r
- case KEY_PRINT : p = "PRINT"; break;\r
- case KEY_ON_OFF : p = "ON_OFF"; break;\r
-\r
- case KEY_INSERT : p = "INSERT"; break;\r
- case KEY_DELETE : p = "DELETE"; break;\r
- case KEY_LEFT : p = "LEFT"; break;\r
- case KEY_HOME : p = "HOME"; break;\r
- case KEY_END : p = "END"; break;\r
- case KEY_UP : p = "UP"; break;\r
- case KEY_DOWN : p = "DOWN"; break;\r
- case KEY_PAGE_UP : p = "PAGE_UP"; break;\r
- case KEY_PAGE_DOWN : p = "PAGE_DOWN"; break;\r
- case KEY_RIGHT : p = "RIGHT"; break;\r
- case KEY_MOUSE_1 : p = "KEY_MOUSE_1"; break;\r
- case KEY_MOUSE_2 : p = "KEY_MOUSE_2"; break;\r
- default : p = "<UNKNWON>"; break;\r
- }\r
-\r
- printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, asc=0x%02x, key=%s",\r
- irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, key, p);\r
- }\r
- else\r
- {\r
- printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, asc=0x%02x",\r
- irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, key);\r
- }\r
- }\r
- else\r
- {\r
- printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x",\r
- irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags);\r
- }\r
-\r
- if (do_check_expected_values)\r
- {\r
- if (irmp_data.protocol != expected_protocol ||\r
- irmp_data.address != expected_address ||\r
- irmp_data.command != expected_command)\r
- {\r
- printf ("\nerror 7: expected values differ: p=%2d (%s), a=0x%04x, c=0x%04x\n",\r
- expected_protocol, irmp_protocol_names[expected_protocol], expected_address, expected_command);\r
- }\r
- else\r
- {\r
- printf (" checked!\n");\r
- }\r
- do_check_expected_values = FALSE; // only check 1st frame in a line!\r
- }\r
- else\r
- {\r
- putchar ('\n');\r
- }\r
- }\r
+ (void) irmp_ISR ();\r
+\r
+ if (irmp_get_data (&irmp_data))\r
+ {\r
+ uint_fast8_t key;\r
+\r
+ ANALYZE_ONLY_NORMAL_PUTCHAR (' ');\r
+\r
+ if (verbose)\r
+ {\r
+ printf ("%8.3fms ", (double) (time_counter * 1000) / F_INTERRUPTS);\r
+ }\r
+\r
+ if (irmp_data.protocol == IRMP_ACP24_PROTOCOL)\r
+ {\r
+ uint16_t temp = (irmp_data.command & 0x000F) + 15;\r
+\r
+ printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, temp=%d",\r
+ irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, temp);\r
+ }\r
+ else if (irmp_data.protocol == IRMP_FDC_PROTOCOL && (key = get_fdc_key (irmp_data.command)) != 0)\r
+ {\r
+ if ((key >= 0x20 && key < 0x7F) || key >= 0xA0)\r
+ {\r
+ printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, asc=0x%02x, key='%c'",\r
+ irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, key, key);\r
+ }\r
+ else if (key == '\r' || key == '\t' || key == KEY_ESCAPE || (key >= 0x80 && key <= 0x9F)) // function keys\r
+ {\r
+ char * p = (char *) NULL;\r
+\r
+ switch (key)\r
+ {\r
+ case '\t' : p = "TAB"; break;\r
+ case '\r' : p = "CR"; break;\r
+ case KEY_ESCAPE : p = "ESCAPE"; break;\r
+ case KEY_MENUE : p = "MENUE"; break;\r
+ case KEY_BACK : p = "BACK"; break;\r
+ case KEY_FORWARD : p = "FORWARD"; break;\r
+ case KEY_ADDRESS : p = "ADDRESS"; break;\r
+ case KEY_WINDOW : p = "WINDOW"; break;\r
+ case KEY_1ST_PAGE : p = "1ST_PAGE"; break;\r
+ case KEY_STOP : p = "STOP"; break;\r
+ case KEY_MAIL : p = "MAIL"; break;\r
+ case KEY_FAVORITES : p = "FAVORITES"; break;\r
+ case KEY_NEW_PAGE : p = "NEW_PAGE"; break;\r
+ case KEY_SETUP : p = "SETUP"; break;\r
+ case KEY_FONT : p = "FONT"; break;\r
+ case KEY_PRINT : p = "PRINT"; break;\r
+ case KEY_ON_OFF : p = "ON_OFF"; break;\r
+\r
+ case KEY_INSERT : p = "INSERT"; break;\r
+ case KEY_DELETE : p = "DELETE"; break;\r
+ case KEY_LEFT : p = "LEFT"; break;\r
+ case KEY_HOME : p = "HOME"; break;\r
+ case KEY_END : p = "END"; break;\r
+ case KEY_UP : p = "UP"; break;\r
+ case KEY_DOWN : p = "DOWN"; break;\r
+ case KEY_PAGE_UP : p = "PAGE_UP"; break;\r
+ case KEY_PAGE_DOWN : p = "PAGE_DOWN"; break;\r
+ case KEY_RIGHT : p = "RIGHT"; break;\r
+ case KEY_MOUSE_1 : p = "KEY_MOUSE_1"; break;\r
+ case KEY_MOUSE_2 : p = "KEY_MOUSE_2"; break;\r
+ default : p = "<UNKNWON>"; break;\r
+ }\r
+\r
+ printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, asc=0x%02x, key=%s",\r
+ irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, key, p);\r
+ }\r
+ else\r
+ {\r
+ printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x, asc=0x%02x",\r
+ irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags, key);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ printf ("p=%2d (%s), a=0x%04x, c=0x%04x, f=0x%02x",\r
+ irmp_data.protocol, irmp_protocol_names[irmp_data.protocol], irmp_data.address, irmp_data.command, irmp_data.flags);\r
+ }\r
+\r
+ if (do_check_expected_values)\r
+ {\r
+ if (irmp_data.protocol != expected_protocol ||\r
+ irmp_data.address != expected_address ||\r
+ irmp_data.command != expected_command)\r
+ {\r
+ printf ("\nerror 7: expected values differ: p=%2d (%s), a=0x%04x, c=0x%04x\n",\r
+ expected_protocol, irmp_protocol_names[expected_protocol], expected_address, expected_command);\r
+ }\r
+ else\r
+ {\r
+ printf (" checked!\n");\r
+ }\r
+ do_check_expected_values = FALSE; // only check 1st frame in a line!\r
+ }\r
+ else\r
+ {\r
+ putchar ('\n');\r
+ }\r
+ }\r