]> cloudbase.mooo.com Git - irmp.git/commitdiff
Version 2.5.3: added LGAIR protocol (IRSND)
authorukw <ukw@aeb2e35e-bfc4-4214-b83c-9e8de998ed28>
Mon, 23 Jun 2014 06:58:42 +0000 (06:58 +0000)
committerukw <ukw@aeb2e35e-bfc4-4214-b83c-9e8de998ed28>
Mon, 23 Jun 2014 06:58:42 +0000 (06:58 +0000)
git-svn-id: svn://mikrocontroller.net/irmp@129 aeb2e35e-bfc4-4214-b83c-9e8de998ed28

README.txt
irsnd.c
irsndconfig.h

index 9f50115ff7b0979b18c7a5e04ccd42f8a1ece24c..9af475ef0385f4710c56b9acf83c1bc2e2c39a13 100644 (file)
@@ -2,7 +2,7 @@ IRMP - Infrared Multi Protocol Decoder
 --------------------------------------\r
 \r
 Version IRMP:  2.5.3 05.06.2014\r
-Version IRSND: 2.5.3 05.06.2014\r
+Version IRSND: 2.5.4 23.06.2014\r
 \r
 Dokumentation:\r
  \r
diff --git a/irsnd.c b/irsnd.c
index b3015000dd1357fcf65ea29bcc1a1c8f76d02729..554e264536a8b6405e0b9d9c86f7da2901726f06 100644 (file)
--- a/irsnd.c
+++ b/irsnd.c
@@ -13,7 +13,7 @@
  * ATmega164, ATmega324, ATmega644,  ATmega644P, ATmega1284, ATmega1284P\r
  * ATmega88,  ATmega88P, ATmega168,  ATmega168P, ATmega328P\r
  *\r
- * $Id: irsnd.c,v 1.75 2014/06/03 12:28:41 fm Exp $\r
+ * $Id: irsnd.c,v 1.76 2014/06/23 06:56:00 fm Exp $\r
  *\r
  * This program is free software; you can redistribute it and/or modify\r
  * it under the terms of the GNU General Public License as published by\r
@@ -844,6 +844,23 @@ irsnd_send_data (IRMP_DATA * irmp_data_p, uint8_t do_wait)
             break;\r
         }\r
 #endif\r
+#if IRSND_SUPPORT_LGAIR_PROTOCOL == 1\r
+        case IRMP_LGAIR_PROTOCOL:\r
+        {\r
+            address = irmp_data_p->address;\r
+            command = irmp_data_p->command;\r
+\r
+            irsnd_buffer[0] = ( (address & 0x00FF));                                                            // AAAAAAAA\r
+            irsnd_buffer[1] = ( (command & 0xFF00) >> 8);                                                       // CCCCCCCC\r
+            irsnd_buffer[2] = ( (command & 0x00FF));                                                            // CCCCCCCC\r
+            irsnd_buffer[3] = (( ((command & 0xF000) >> 12) +                                                   // checksum\r
+                                 ((command & 0x0F00) >> 8) +\r
+                                 ((command & 0x00F0) >>4 ) +\r
+                                 ((command & 0x000F))) & 0x000F) << 4;\r
+            irsnd_busy      = TRUE;\r
+            break;\r
+        }\r
+#endif\r
 #if IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1\r
         case IRMP_SAMSUNG_PROTOCOL:\r
         {\r
@@ -1426,6 +1443,24 @@ irsnd_ISR (void)
                         break;\r
                     }\r
 #endif\r
+#if IRSND_SUPPORT_LGAIR_PROTOCOL == 1\r
+                    case IRMP_LGAIR_PROTOCOL:\r
+                    {\r
+                        startbit_pulse_len          = NEC_START_BIT_PULSE_LEN;\r
+                        startbit_pause_len          = NEC_START_BIT_PAUSE_LEN - 1;\r
+                        pulse_1_len                 = NEC_PULSE_LEN;\r
+                        pause_1_len                 = NEC_1_PAUSE_LEN - 1;\r
+                        pulse_0_len                 = NEC_PULSE_LEN;\r
+                        pause_0_len                 = NEC_0_PAUSE_LEN - 1;\r
+                        has_stop_bit                = NEC_STOP_BIT;\r
+                        complete_data_len           = LGAIR_COMPLETE_DATA_LEN;\r
+                        n_auto_repetitions          = 1;                                            // 1 frame\r
+                        auto_repetition_pause_len   = 0;\r
+                        repeat_frame_pause_len      = NEC_FRAME_REPEAT_PAUSE_LEN;\r
+                        irsnd_set_freq (IRSND_FREQ_38_KHZ);\r
+                        break;\r
+                    }\r
+#endif\r
 #if IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1\r
                     case IRMP_SAMSUNG_PROTOCOL:\r
                     {\r
@@ -1926,6 +1961,9 @@ irsnd_ISR (void)
 #if IRSND_SUPPORT_NEC42_PROTOCOL == 1\r
                 case IRMP_NEC42_PROTOCOL:\r
 #endif\r
+#if IRSND_SUPPORT_LGAIR_PROTOCOL == 1\r
+                case IRMP_LGAIR_PROTOCOL:\r
+#endif\r
 #if IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1\r
                 case IRMP_SAMSUNG_PROTOCOL:\r
                 case IRMP_SAMSUNG32_PROTOCOL:\r
@@ -1980,7 +2018,7 @@ irsnd_ISR (void)
 #endif\r
 \r
 #if IRSND_SUPPORT_SIRCS_PROTOCOL == 1  || IRSND_SUPPORT_NEC_PROTOCOL == 1 || IRSND_SUPPORT_NEC16_PROTOCOL == 1 || IRSND_SUPPORT_NEC42_PROTOCOL == 1 || \\r
-    IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1 || IRSND_SUPPORT_MATSUSHITA_PROTOCOL == 1 ||   \\r
+    IRSND_SUPPORT_LGAIR_PROTOCOL == 1 || IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1 || IRSND_SUPPORT_MATSUSHITA_PROTOCOL == 1 ||   \\r
     IRSND_SUPPORT_KASEIKYO_PROTOCOL == 1 || IRSND_SUPPORT_RECS80_PROTOCOL == 1 || IRSND_SUPPORT_RECS80EXT_PROTOCOL == 1 || IRSND_SUPPORT_DENON_PROTOCOL == 1 || \\r
     IRSND_SUPPORT_NUBERT_PROTOCOL == 1 || IRSND_SUPPORT_SPEAKER_PROTOCOL == 1 || IRSND_SUPPORT_BANG_OLUFSEN_PROTOCOL == 1 || IRSND_SUPPORT_FDC_PROTOCOL == 1 || IRSND_SUPPORT_RCCAR_PROTOCOL == 1 ||   \\r
     IRSND_SUPPORT_JVC_PROTOCOL == 1 || IRSND_SUPPORT_NIKON_PROTOCOL == 1 || IRSND_SUPPORT_LEGO_PROTOCOL == 1 || IRSND_SUPPORT_THOMSON_PROTOCOL == 1 || \\r
index 654dc0c1663491bb7c11ea0de22680d406e56862..6360ba80fc0cb0ccf77fc50f63c6e73731549859 100644 (file)
@@ -5,7 +5,7 @@
  *\r
  * Copyright (c) 2010-2013 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irsndconfig.h,v 1.57 2014/06/03 12:28:41 fm Exp $\r
+ * $Id: irsndconfig.h,v 1.58 2014/06/23 06:56:00 fm Exp $\r
  *\r
  * ATMEGA88 @ 8 MHz\r
  *\r
@@ -77,6 +77,8 @@
 #define IRSND_SUPPORT_RUWIDO_PROTOCOL           0       // RUWIDO, T-Home       >= 15000                 ~250 bytes\r
 #define IRSND_SUPPORT_A1TVBOX_PROTOCOL          0       // A1 TV BOX            >= 15000 (better 20000)  ~200 bytes\r
 #define IRSND_SUPPORT_LEGO_PROTOCOL             0       // LEGO Power RC        >= 20000                 ~150 bytes\r
+#define IRSND_SUPPORT_RCMM_PROTOCOL             0       // RCMM 12,24, or 32    >= 20000                 DON'T CHANGE, NOT SUPPORTED YET!\r
+#define IRSND_SUPPORT_LGAIR_PROTOCOL            0       // LG Air Condition     >= 10000                 ~150 bytes.\r
 \r
 /*---------------------------------------------------------------------------------------------------------------------------------------------------\r
  * AVR section:\r