\r
#else\r
\r
-#ifndef CODEVISION\r
-\r
#ifdef PIC_CCS_COMPILER\r
\r
#include <string.h>\r
#include <avr/pgmspace.h>\r
\r
#endif // PIC_CCS_COMPILER\r
-#endif // CODEVISION\r
\r
#endif // windows\r
#endif // unix\r
#define ANALYZE_NEWLINE()\r
#endif\r
\r
+/*---------------------------------------------------------------------------------------------------------------------------------------------------\r
+ * Protocol names\r
+ *---------------------------------------------------------------------------------------------------------------------------------------------------\r
+ */\r
+#if IRMP_PROTOCOL_NAMES == 1\r
+char *\r
+irmp_protocol_names[IRMP_N_PROTOCOLS + 1] =\r
+{\r
+ "UNKNOWN",\r
+ "SIRCS",\r
+ "NEC",\r
+ "SAMSUNG",\r
+ "MATSUSH",\r
+ "KASEIKYO",\r
+ "RECS80",\r
+ "RC5",\r
+ "DENON",\r
+ "RC6",\r
+ "SAMSG32",\r
+ "APPLE",\r
+ "RECS80EX",\r
+ "NUBERT",\r
+ "BANG OLU",\r
+ "GRUNDIG",\r
+ "NOKIA",\r
+ "SIEMENS",\r
+ "FDC",\r
+ "RCCAR",\r
+ "JVC",\r
+ "RC6A",\r
+ "NIKON",\r
+ "RUWIDO",\r
+ "IR60",\r
+ "KATHREIN",\r
+ "NETBOX",\r
+ "NEC16",\r
+ "NEC42",\r
+ "LEGO",\r
+ "THOMSON",\r
+ "MERLIN"\r
+};\r
+#endif\r
+\r
+/*---------------------------------------------------------------------------------------------------------------------------------------------------\r
+ * Logging\r
+ *---------------------------------------------------------------------------------------------------------------------------------------------------\r
+ */\r
#if IRMP_LOGGING == 1\r
#define BAUD 9600L\r
#include <util/setbaud.h>\r
static volatile uint16_t irmp_command;\r
static volatile uint16_t irmp_id; // only used for SAMSUNG protocol\r
static volatile uint8_t irmp_flags;\r
+// static volatile uint8_t irmp_busy_flag;\r
\r
#ifdef ANALYZE\r
static uint8_t IRMP_PIN;\r
return rtc;\r
}\r
\r
+// uint8_t\r
+// irmp_is_busy (void)\r
+// {\r
+// return irmp_busy_flag;\r
+// }\r
+\r
// these statics must not be volatile, because they are only used by irmp_store_bit(), which is called by irmp_ISR()\r
static uint16_t irmp_tmp_address; // ir address\r
static uint16_t irmp_tmp_command; // ir command\r
{ // no...\r
if (! irmp_input) // receiving burst?\r
{ // yes...\r
+// irmp_busy_flag = TRUE;\r
#ifdef ANALYZE\r
if (! irmp_pulse_time)\r
{\r
ANALYZE_PRINTF ("%8d error 1: pause after start bit pulse %d too long: %d\n", time_counter, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
}\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags, let's wait for another start bit\r
irmp_pulse_time = 0;\r
irmp_pause_time = 0;\r
\r
{\r
ANALYZE_PRINTF ("protocol = UNKNOWN\n");\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // wait for another start bit...\r
}\r
\r
{\r
ANALYZE_PRINTF ("error: stop bit timing wrong\n");\r
\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // wait for another start bit...\r
irmp_pulse_time = 0;\r
irmp_pause_time = 0;\r
ANALYZE_PRINTF ("error 2: pause %d after data bit %d too long\n", irmp_pause_time, irmp_bit);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // wait for another start bit...\r
irmp_pulse_time = 0;\r
irmp_pause_time = 0;\r
ANALYZE_NEWLINE ();\r
ANALYZE_PRINTF ("error 3 manchester: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
{ // timing incorrect!\r
ANALYZE_PRINTF ("error 3 Samsung: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
{ // timing incorrect!\r
ANALYZE_PRINTF ("error 3a B&O: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
{ // timing incorrect!\r
ANALYZE_PRINTF ("error 3b B&O: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
{ // timing incorrect!\r
ANALYZE_PRINTF ("error 3c B&O: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
{ // timing incorrect!\r
ANALYZE_PRINTF ("error 3d B&O: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
{ // timing incorrect!\r
ANALYZE_PRINTF ("error 3: timing not correct: data bit %d, pulse: %d, pause: %d\n", irmp_bit, irmp_pulse_time, irmp_pause_time);\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // reset flags and wait for next start bit\r
irmp_pause_time = 0;\r
}\r
ANALYZE_ONLY_NORMAL_PUTCHAR ('\n');\r
}\r
\r
+// irmp_busy_flag = FALSE;\r
irmp_start_bit_detected = 0; // and wait for next start bit\r
irmp_tmp_command = 0;\r
irmp_pulse_time = 0;\r