]> cloudbase.mooo.com Git - irmp.git/blobdiff - main.c
corrected additional bit handling in SIRCS protocol
[irmp.git] / main.c
diff --git a/main.c b/main.c
index 2e05660158704afd1d465800d88f9b4bd37e355c..f28cce9292ac5dac717f05087a586811c05d310b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -3,6 +3,8 @@
  *\r
  * Copyright (c) 2009-2010 Frank Meyer - frank(at)fli4l.de\r
  *\r
+ * $Id: main.c,v 1.8 2010/08/30 15:45:27 fm Exp $\r
+ *\r
  * ATMEGA88 @ 8 MHz\r
  *\r
  * Fuses: lfuse: 0xE2 hfuse: 0xDC efuse: 0xF9\r
@@ -45,6 +47,8 @@
 #include <avr/pgmspace.h>\r
 #include <avr/interrupt.h>\r
 #include "irmp.h"\r
+#include "irmpconfig.h"\r
+\r
 \r
 #endif  // CODEVISION\r
 \r
@@ -68,7 +72,7 @@ timer_init (void)
   TIMSK  = 1 << OCIE1A;                                                     // OCIE1A: Interrupt by timer compare\r
 #else\r
   TIMSK1  = 1 << OCIE1A;                                                    // OCIE1A: Interrupt by timer compare\r
-#endif // __AVR...\r
+#endif  // __AVR...\r
 }\r
 \r
 /*---------------------------------------------------------------------------------------------------------------------------------------------------\r
@@ -82,7 +86,7 @@ interrupt [TIM1_COMPA] void timer1_compa_isr(void)
 ISR(TIMER1_COMPA_vect)\r
 #endif  // CODEVISION\r
 {\r
-  irmp_ISR();                                                           // call irmp ISR\r
+  (void) irmp_ISR();                                                        // call irmp ISR\r
   // call other timer interrupt routines...\r
 }\r
 \r
@@ -104,9 +108,7 @@ main (void)
   #ifdef _OPTIMIZE_SIZE_\r
   #pragma optsize+\r
   #endif\r
-  static uint8_t *Proto[]={"SIRCS","NEC","SAMSUNG","MATSUSH","KASEIKYO","RECS80","RC5(x)","DENON","RC6","SAMSG32","APPLE"};\r
-  #define IRMP_APPLE_ADDRESS 0x77E1 \r
-\r
+  static uint8_t *Proto[]={"SIRCS","NEC","SAMSUNG","MATSUSH","KASEIKYO","RECS80","RC5(x)","DENON","RC6","SAMSG32","APPLE","RECS80X","NUBERT","B&O","GRUNDIG","NOKIA","SIEMENS","FDC","RCCAR","JVC","RC6A"};\r
 \r
   #if IRMP_LOGGING == 0\r
   // USART initialization has to be done here if Logging is off\r
@@ -142,9 +144,7 @@ main (void)
         // irmp_data.address is the address/manufacturer code of ir sender\r
         // irmp_data.command is the command code\r
         #if IRMP_LOGGING != 1\r
-        if((irmp_data.protocol == IRMP_NEC_PROTOCOL) && (irmp_data.address == IRMP_APPLE_ADDRESS))\r
-          printf("Code: Apple\n");\r
-        else printf("Code: %s\n",Proto[irmp_data.protocol-1]);\r
+        printf("Code: %s\n",Proto[irmp_data.protocol-1]);\r
         printf("Address: 0x%.2X\n",irmp_data.address);\r
         printf("Command: 0x%.2X\n\n",irmp_data.command);\r
         #endif\r