summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorukw2011-02-08 08:48:41 +0000
committerukw2011-02-08 08:48:41 +0000
commit1aee56bc62cbb8c7983eb5449ad075d94aaca5e1 (patch)
tree2670f4a21075f08cfc1b0e69d5456559a245cea8
parent779fbc81da759376eaf8eeb8fb0fda639e376c55 (diff)
downloadirmp-1aee56bc62cbb8c7983eb5449ad075d94aaca5e1.zip
version 1.9.2: added RUWIDO protocol, for T-Home Mediareceiver
git-svn-id: svn://mikrocontroller.net/irmp@53 aeb2e35e-bfc4-4214-b83c-9e8de998ed28
-rw-r--r--IR-Data/t-home-mediareceiver.txt69
-rw-r--r--IR-Data/test-suite.sh1
-rw-r--r--README.txt2
-rw-r--r--irmp.c175
-rw-r--r--irmp.h20
-rw-r--r--irmpconfig.h13
-rw-r--r--irsnd.c2
7 files changed, 224 insertions, 58 deletions
diff --git a/IR-Data/t-home-mediareceiver.txt b/IR-Data/t-home-mediareceiver.txt
new file mode 100644
index 0000000..7731dcf
--- /dev/null
+++ b/IR-Data/t-home-mediareceiver.txt
@@ -0,0 +1,69 @@
+# T-Home Mediareceiver (Ruwido)
+#1
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111110000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000011111110000000011111110000000000000000111111111111110000000011111111111111111111
+00000000011111111111111000000000111111000000000000000011111110000000011111111111111000000000111111000000000000000011111111111111000000000000000011111111111111000000001111111000000001111111000000001111111000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111111000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000011111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000000111111000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000011111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000001111100000000001111111111111000000000111111000000000000000011111111111111000000000000000011111111111111000000000111110000000000111110000000000111110000000000111110000000001111110000000000000000011111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000001111110000000000000000111111111111110000000001111111111111111111
+
+#2
+000000000111111111111110000000011111110000000000000000111111000000000111111111111110000000011111100000000000000001111111111111100000000000000001111111111111100000000011111100000000011111100000000011111100000000011111100000000000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111100000000001111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000011111100000000011111100000000000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111100000000001111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000011111100000000011111100000000000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000011111100000000000000001111111000000001111111111111100000000011111100000000000000001111111111111100000000000000001111111111111100000000111111100000000111111100000000111111100000000111111100000000000000001111111111111100000000000000011111111111111111111
+000000000111111111111100000000001111100000000000000000111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000011111100000000011111000000000000000001111111111111000000000000000001111111111111111111
+#3
+00000000011111111111111000000000111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000001111110000000000000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111111000000000000000011111111111110000000001111110000000001111110000000001111110000000001111110000000000000000111111100000000111111111111110000000001111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111110000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000001111110000000000000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111111000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000001111110000000000000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000001111110000000000000000111111000000000111111111111110000000011111111111111111111
+#4
+000000000111111111111110000000011111110000000000000000111111000000001111111111111100000000011111100000000000000001111111111111100000000000000001111111111111100000000011111100000000111111100000000111111100000000000000001111111111111100000000111111100000000000000001111111111111111111
+000000000111111111111110000000011111100000000000000001111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000111111100000000000000001111111111111100000000111111000000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111110000000011111110000000000000000111111111111110000000000000000111111111111110000000001111100000000011111100000000001111100000000000000000111111111111100000000011111100000000000000000111111111111111111
+000000000111111111111110000000011111100000000000000001111111000000001111111111111100000000011111100000000000000001111111111111100000000000000001111111111111100000000111111100000000111111100000000111111100000000000000001111111111111100000000111111000000000000000011111111111111111111
+000000000111111111111110000000011111110000000000000000111111000000000111111111111100000000011111100000000000000001111111111111100000000000000001111111111111100000000011111100000000011111100000000111111100000000000000001111111111111100000000111111100000000000000001111111111111111111
+#5
+00000000011111111111111000000000111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111111000000000000000011111111111111000000001111110000000001111110000000001111110000000000000000111111111111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000001111100000000001111111111111000000000111111000000000000000011111111111111000000000000000011111111111111000000000111110000000000111110000000000111110000000000000000011111111111110000000000000000011111111111110000000001111111111111111111
+00000000011111111111111000000001111111000000000000000111111100000000111111111111110000000001111110000000000000000111111111111110000000000000000111111111111110000000011111110000000011111110000000011111110000000000000000111111111111110000000000000000111111111111100000000011111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111111000000000000000011111111111111000000001111110000000001111110000000001111110000000000000000111111111111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000001111110000000001111111111111000000000111111000000000000000001111111111111000000000000000011111111111111000000000111111000000000111111000000000111110000000000000000011111111111110000000000000000011111111111110000000001111111111111111111
+#6
+000000000111111111111110000000001111110000000000000000111111000000000111111111111110000000011111110000000000000000111111111111110000000000000000111111111111100000000011111100000000011111100000000011111100000000000000001111111000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111110000000011111110000000000000000111111111111110000000000000000111111111111110000000011111100000000011111100000000011111100000000000000001111111000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000011111110000000000000001111111000000001111111111111100000000011111100000000000000001111111111111100000000000000001111111111111100000000111111100000000111111100000000111111100000000000000001111110000000001111111111111100000000000000011111111111111111111
+000000000111111111111110000000011111110000000000000000111111000000000111111111111100000000001111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000011111100000000000000001111110000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000011111100000000000000000111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000011111100000000000000001111110000000001111111111111000000000000000001111111111111111111
+#7
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111110000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000000000000111111000000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000000111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000000000000111111100000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000000000000111111000000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111110000000001111110000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000001111110000000000000000111111000000000111111000000000111111111111110000000011111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000111111111111110000000001111110000000000000000111111111111110000000000000000111111111111110000000001111110000000011111110000000011111110000000000000000111111000000000111111000000000111111111111110000000011111111111111111111
+#8
+000000000111111111111110000000001111100000000000000000111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000111111100000000000000001111111111111100000000011111100000000011111000000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000000000001111111111111100000000011111100000000011111100000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000000000001111111111111100000000011111100000000011111100000000000000001111111111111111111
+000000000111111111111110000000001111100000000000000000111111000000000111111111111100000000011111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000000000001111111111111100000000011111100000000011111000000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111100000000001111100000000000000000111111111111100000000000000000111111111111100000000011111100000000011111100000000000000001111111111111100000000011111100000000011111100000000000000001111111111111111111
+#9
+00000000011111111111111000000000111111000000000000000011111100000000011111111111111000000001111111000000000000000011111111111111000000000000000011111111111110000000001111110000000001111110000000000000000111111111111110000000001111110000000000000000111111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000011111110000000011111111111111000000000111111000000000000000001111111111111000000000000000011111111111111000000000111111000000000111111000000000000000011111111111110000000000111110000000000000000011111111111110000000001111111111111111111
+00000000011111111111111000000000111111000000000000000001111100000000001111111111111000000000111111000000000000000011111111111111000000000000000011111111111110000000000111110000000000111110000000000000000011111111111110000000001111110000000000000000011111111111110000000001111111111111111111
+00000000011111111111111000000001111111000000000000000011111100000000011111111111110000000001111110000000000000000111111111111110000000000000000111111111111110000000001111110000000001111110000000000000000111111111111110000000011111110000000000000000111111111111110000000011111111111111111111
+00000000011111111111111000000000111111000000000000000001111100000000001111111111111000000000111111000000000000000011111111111111000000000000000011111111111111000000000111110000000000111110000000000000000011111111111110000000001111110000000000000000011111111111110000000001111111111111111111
+#0
+000000000111111111111110000000001111110000000000000000111111100000000111111111111110000000001111110000000000000000111111111111110000000000000000111111111111110000000011111110000000011111100000000000000001111111111111100000000000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000011111110000000000000000111111000000000111111111111110000000011111110000000000000000111111111111100000000000000001111111111111100000000011111100000000011111100000000000000001111111111111100000000000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000001111110000000000000000111111100000000111111111111110000000001111110000000000000000111111111111110000000000000000111111111111110000000011111110000000011111110000000000000001111111111111100000000000000001111111111111100000000000000001111111111111111111
+000000000111111111111110000000011111100000000000000001111111000000001111111111111100000000011111100000000000000001111111111111100000000000000001111111111111100000000111111100000000111111100000000000000001111111111111100000000000000001111111111111000000000000000011111111111111111111
+000000000111111111111110000000001111110000000000000000111111000000000111111111111110000000011111110000000000000000111111111111110000000000000000111111111111100000000011111100000000011111100000000000000001111111111111100000000000000001111111111111100000000000000001111111111111111111
diff --git a/IR-Data/test-suite.sh b/IR-Data/test-suite.sh
index 8b6a223..7148cc2 100644
--- a/IR-Data/test-suite.sh
+++ b/IR-Data/test-suite.sh
@@ -63,6 +63,7 @@ for j in \
rc5x.txt \
rc6-hold.txt \
rc6.txt \
+ t-home-mediareceiver.txt \
sharp-denon.txt \
sharp-denon2.txt \
xbox360-10kHz.txt
diff --git a/README.txt b/README.txt
index 41362d1..b04bff6 100644
--- a/README.txt
+++ b/README.txt
@@ -1,7 +1,7 @@
IRMP - Infrared Multi Protocol Decoder
--------------------------------------
-Version IRMP: 1.9.1 25.01.2010
+Version IRMP: 1.9.2 08.02.2010
Version IRSND: 1.9.1 25.01.2010
Dokumentation:
diff --git a/irmp.c b/irmp.c
index 3b49646..7bbb6f8 100644
--- a/irmp.c
+++ b/irmp.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2009-2010 Frank Meyer - frank(at)fli4l.de
*
- * $Id: irmp.c,v 1.87 2011/01/18 13:02:15 fm Exp $
+ * $Id: irmp.c,v 1.88 2011/02/08 08:40:27 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -459,8 +459,12 @@ typedef unsigned int16 uint16_t;
#define RC5_START_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * RC5_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
#define RC5_START_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * RC5_BIT_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
+#define RC5_START_BIT_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * RC5_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RC5_START_BIT_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * RC5_BIT_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
#define RC5_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * RC5_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
#define RC5_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * RC5_BIT_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
+#define RC5_BIT_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * RC5_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RC5_BIT_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * RC5_BIT_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
#define DENON_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * DENON_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
#define DENON_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * DENON_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
@@ -480,6 +484,11 @@ typedef unsigned int16 uint16_t;
#define RC6_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RC6_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1) // pauses: 300 - 600
#define RC6_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * RC6_BIT_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
+#define RC6_BIT_PULSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * RC6_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RC6_BIT_PULSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * RC6_BIT_TIME * MAX_TOLERANCE_30 + 0.5) + 1) // pulses: 600 - 1400
+#define RC6_BIT_PAUSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * RC6_BIT_TIME * MIN_TOLERANCE_10 + 0.5) - 1) // pauses: 600 - 1200
+#define RC6_BIT_PAUSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * RC6_BIT_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
+
#define RECS80EXT_START_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RECS80EXT_START_BIT_PULSE_TIME * MIN_TOLERANCE_00 + 0.5) - 1)
#define RECS80EXT_START_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * RECS80EXT_START_BIT_PULSE_TIME * MAX_TOLERANCE_00 + 0.5) + 1)
#define RECS80EXT_START_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RECS80EXT_START_BIT_PAUSE_TIME * MIN_TOLERANCE_05 + 0.5) - 1)
@@ -535,6 +544,8 @@ typedef unsigned int16 uint16_t;
#define GRUNDIG_OR_NOKIA_START_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_BIT_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
#define GRUNDIG_OR_NOKIA_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_BIT_TIME * MIN_TOLERANCE_20 + 0.5) - 1)
#define GRUNDIG_OR_NOKIA_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_BIT_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
+#define GRUNDIG_OR_NOKIA_BIT_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * GRUNDIG_OR_NOKIA_BIT_TIME * MIN_TOLERANCE_20 + 0.5) - 1)
+#define GRUNDIG_OR_NOKIA_BIT_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * GRUNDIG_OR_NOKIA_BIT_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
#define GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_PRE_PAUSE_TIME * MIN_TOLERANCE_20 + 0.5) + 1)
#define GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_PRE_PAUSE_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
@@ -542,6 +553,8 @@ typedef unsigned int16 uint16_t;
#define SIEMENS_START_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_BIT_TIME * 1 + 0.5) + 1)
#define SIEMENS_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_BIT_TIME * 1 + 0.5) - 1)
#define SIEMENS_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_BIT_TIME * 1 + 0.5) + 1)
+#define SIEMENS_BIT_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_BIT_TIME * 1 + 0.5) - 1)
+#define SIEMENS_BIT_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_BIT_TIME * 1 + 0.5) + 1)
#define FDC_START_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * FDC_START_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
#define FDC_START_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * FDC_START_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
@@ -596,6 +609,19 @@ typedef unsigned int16 uint16_t;
#define NIKON_0_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * NIKON_0_PAUSE_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
#define NIKON_FRAME_REPEAT_PAUSE_LEN_MAX (uint16_t)(F_INTERRUPTS * NIKON_FRAME_REPEAT_PAUSE_TIME * MAX_TOLERANCE_20 + 0.5)
+#define RUWIDO_START_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RUWIDO_START_BIT_PULSE_TIME * MIN_TOLERANCE_20 + 0.5) - 1)
+#define RUWIDO_START_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * RUWIDO_START_BIT_PULSE_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
+#define RUWIDO_START_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RUWIDO_START_BIT_PAUSE_TIME * MIN_TOLERANCE_20 + 0.5) - 1)
+#define RUWIDO_START_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * RUWIDO_START_BIT_PAUSE_TIME * MAX_TOLERANCE_20 + 0.5) + 1)
+#define RUWIDO_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RUWIDO_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
+#define RUWIDO_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RUWIDO_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1)
+#define RUWIDO_BIT_PULSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PULSE_TIME_2 * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RUWIDO_BIT_PULSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PULSE_TIME_2 * MAX_TOLERANCE_10 + 0.5) + 1)
+#define RUWIDO_BIT_PAUSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PAUSE_TIME_2 * MIN_TOLERANCE_10 + 0.5) - 1)
+#define RUWIDO_BIT_PAUSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * RUWIDO_BIT_PAUSE_TIME_2 * MAX_TOLERANCE_10 + 0.5) + 1)
+
#define AUTO_FRAME_REPETITION_LEN (uint16_t)(F_INTERRUPTS * AUTO_FRAME_REPETITION_TIME + 0.5) // use uint16_t!
#ifdef ANALYZE
@@ -974,14 +1000,14 @@ static PROGMEM IRMP_PARAMETER recs80_param =
static PROGMEM IRMP_PARAMETER rc5_param =
{
IRMP_RC5_PROTOCOL, // protocol: ir protocol
- RC5_BIT_LEN_MIN, // pulse_1_len_min: minimum length of pulse with bit value 1
- RC5_BIT_LEN_MAX, // pulse_1_len_max: maximum length of pulse with bit value 1
- RC5_BIT_LEN_MIN, // pause_1_len_min: minimum length of pause with bit value 1
- RC5_BIT_LEN_MAX, // pause_1_len_max: maximum length of pause with bit value 1
- 1, // tricky: use this as stop bit length // pulse_0_len_min: minimum length of pulse with bit value 0
- 1, // pulse_0_len_max: maximum length of pulse with bit value 0
- 1, // pause_0_len_min: minimum length of pause with bit value 0
- 1, // pause_0_len_max: maximum length of pause with bit value 0
+ RC5_BIT_LEN_MIN, // pulse_1_len_min: here: minimum length of short pulse
+ RC5_BIT_LEN_MAX, // pulse_1_len_max: here: maximum length of short pulse
+ RC5_BIT_LEN_MIN, // pause_1_len_min: here: minimum length of short pause
+ RC5_BIT_LEN_MAX, // pause_1_len_max: here: maximum length of short pause
+ RC5_BIT_LEN_MIN_2, // pulse_0_len_min: here: minimum length of long pulse
+ RC5_BIT_LEN_MAX_2, // pulse_0_len_max: here: maximum length of long pulse
+ RC5_BIT_LEN_MIN_2, // pause_0_len_min: here: minimum length of long pause
+ RC5_BIT_LEN_MAX_2, // pause_0_len_max: here: maximum length of long pause
RC5_ADDRESS_OFFSET, // address_offset: address offset
RC5_ADDRESS_OFFSET + RC5_ADDRESS_LEN, // address_end: end of address
RC5_COMMAND_OFFSET, // command_offset: command offset
@@ -1024,14 +1050,15 @@ static PROGMEM IRMP_PARAMETER denon_param =
static PROGMEM IRMP_PARAMETER rc6_param =
{
IRMP_RC6_PROTOCOL, // protocol: ir protocol
- RC6_BIT_PULSE_LEN_MIN, // pulse_1_len_min: minimum length of pulse with bit value 1
- RC6_BIT_PULSE_LEN_MAX, // pulse_1_len_max: maximum length of pulse with bit value 1
- RC6_BIT_PAUSE_LEN_MIN, // pause_1_len_min: minimum length of pause with bit value 1
- RC6_BIT_PAUSE_LEN_MAX, // pause_1_len_max: maximum length of pause with bit value 1
- 1, // tricky: use this as stop bit length // pulse_0_len_min: minimum length of pulse with bit value 0
- 1, // pulse_0_len_max: maximum length of pulse with bit value 0
- 1, // pause_0_len_min: minimum length of pause with bit value 0
- 1, // pause_0_len_max: maximum length of pause with bit value 0
+
+ RC6_BIT_PULSE_LEN_MIN, // pulse_1_len_min: here: minimum length of short pulse
+ RC6_BIT_PULSE_LEN_MAX, // pulse_1_len_max: here: maximum length of short pulse
+ RC6_BIT_PAUSE_LEN_MIN, // pause_1_len_min: here: minimum length of short pause
+ RC6_BIT_PAUSE_LEN_MAX, // pause_1_len_max: here: maximum length of short pause
+ RC6_BIT_PULSE_LEN_MIN_2, // pulse_0_len_min: here: minimum length of long pulse
+ RC6_BIT_PULSE_LEN_MAX_2, // pulse_0_len_max: here: maximum length of long pulse
+ RC6_BIT_PAUSE_LEN_MIN_2, // pause_0_len_min: here: minimum length of long pause
+ RC6_BIT_PAUSE_LEN_MAX_2, // pause_0_len_max: here: maximum length of long pause
RC6_ADDRESS_OFFSET, // address_offset: address offset
RC6_ADDRESS_OFFSET + RC6_ADDRESS_LEN, // address_end: end of address
RC6_COMMAND_OFFSET, // command_offset: command offset
@@ -1124,14 +1151,16 @@ static PROGMEM IRMP_PARAMETER bang_olufsen_param =
static PROGMEM IRMP_PARAMETER grundig_param =
{
IRMP_GRUNDIG_PROTOCOL, // protocol: ir protocol
- GRUNDIG_OR_NOKIA_BIT_LEN_MIN, // pulse_1_len_min: minimum length of pulse with bit value 1
- GRUNDIG_OR_NOKIA_BIT_LEN_MAX, // pulse_1_len_max: maximum length of pulse with bit value 1
- GRUNDIG_OR_NOKIA_BIT_LEN_MIN, // pause_1_len_min: minimum length of pause with bit value 1
- GRUNDIG_OR_NOKIA_BIT_LEN_MAX, // pause_1_len_max: maximum length of pause with bit value 1
- 1, // tricky: use this as stop bit length // pulse_0_len_min: minimum length of pulse with bit value 0
- 1, // pulse_0_len_max: maximum length of pulse with bit value 0
- 1, // pause_0_len_min: minimum length of pause with bit value 0
- 1, // pause_0_len_max: maximum length of pause with bit value 0
+
+ GRUNDIG_OR_NOKIA_BIT_LEN_MIN, // pulse_1_len_min: here: minimum length of short pulse
+ GRUNDIG_OR_NOKIA_BIT_LEN_MAX, // pulse_1_len_max: here: maximum length of short pulse
+ GRUNDIG_OR_NOKIA_BIT_LEN_MIN, // pause_1_len_min: here: minimum length of short pause
+ GRUNDIG_OR_NOKIA_BIT_LEN_MAX, // pause_1_len_max: here: maximum length of short pause
+ GRUNDIG_OR_NOKIA_BIT_LEN_MIN_2, // pulse_0_len_min: here: minimum length of long pulse
+ GRUNDIG_OR_NOKIA_BIT_LEN_MAX_2, // pulse_0_len_max: here: maximum length of long pulse
+ GRUNDIG_OR_NOKIA_BIT_LEN_MIN_2, // pause_0_len_min: here: minimum length of long pause
+ GRUNDIG_OR_NOKIA_BIT_LEN_MAX_2, // pause_0_len_max: here: maximum length of long pause
+
GRUNDIG_ADDRESS_OFFSET, // address_offset: address offset
GRUNDIG_ADDRESS_OFFSET + GRUNDIG_ADDRESS_LEN, // address_end: end of address
GRUNDIG_COMMAND_OFFSET, // command_offset: command offset
@@ -1149,14 +1178,14 @@ static PROGMEM IRMP_PARAMETER grundig_param =
static PROGMEM IRMP_PARAMETER siemens_param =
{
IRMP_SIEMENS_PROTOCOL, // protocol: ir protocol
- SIEMENS_BIT_LEN_MIN, // pulse_1_len_min: minimum length of pulse with bit value 1
- SIEMENS_BIT_LEN_MAX, // pulse_1_len_max: maximum length of pulse with bit value 1
- SIEMENS_BIT_LEN_MIN, // pause_1_len_min: minimum length of pause with bit value 1
- SIEMENS_BIT_LEN_MAX, // pause_1_len_max: maximum length of pause with bit value 1
- 1, // tricky: use this as stop bit length // pulse_0_len_min: minimum length of pulse with bit value 0
- 1, // pulse_0_len_max: maximum length of pulse with bit value 0
- 1, // pause_0_len_min: minimum length of pause with bit value 0
- 1, // pause_0_len_max: maximum length of pause with bit value 0
+ SIEMENS_BIT_LEN_MIN, // pulse_1_len_min: here: minimum length of short pulse
+ SIEMENS_BIT_LEN_MAX, // pulse_1_len_max: here: maximum length of short pulse
+ SIEMENS_BIT_LEN_MIN, // pause_1_len_min: here: minimum length of short pause
+ SIEMENS_BIT_LEN_MAX, // pause_1_len_max: here: maximum length of short pause
+ SIEMENS_BIT_LEN_MIN_2, // pulse_0_len_min: here: minimum length of long pulse
+ SIEMENS_BIT_LEN_MAX_2, // pulse_0_len_max: here: maximum length of long pulse
+ SIEMENS_BIT_LEN_MIN_2, // pause_0_len_min: here: minimum length of long pause
+ SIEMENS_BIT_LEN_MAX_2, // pause_0_len_max: here: maximum length of long pause
SIEMENS_ADDRESS_OFFSET, // address_offset: address offset
SIEMENS_ADDRESS_OFFSET + SIEMENS_ADDRESS_LEN, // address_end: end of address
SIEMENS_COMMAND_OFFSET, // command_offset: command offset
@@ -1244,6 +1273,31 @@ static PROGMEM IRMP_PARAMETER nikon_param =
#endif
+#if IRMP_SUPPORT_RUWIDO_PROTOCOL == 1
+
+static PROGMEM IRMP_PARAMETER ruwido_param =
+{
+ IRMP_RUWIDO_PROTOCOL, // protocol: ir protocol
+ RUWIDO_BIT_PULSE_LEN_MIN, // pulse_1_len_min: here: minimum length of short pulse
+ RUWIDO_BIT_PULSE_LEN_MAX, // pulse_1_len_max: here: maximum length of short pulse
+ RUWIDO_BIT_PAUSE_LEN_MIN, // pause_1_len_min: here: minimum length of short pause
+ RUWIDO_BIT_PAUSE_LEN_MAX, // pause_1_len_max: here: maximum length of short pause
+ RUWIDO_BIT_PULSE_LEN_MIN_2, // pulse_0_len_min: here: minimum length of long pulse
+ RUWIDO_BIT_PULSE_LEN_MAX_2, // pulse_0_len_max: here: maximum length of long pulse
+ RUWIDO_BIT_PAUSE_LEN_MIN_2, // pause_0_len_min: here: minimum length of long pause
+ RUWIDO_BIT_PAUSE_LEN_MAX_2, // pause_0_len_max: here: maximum length of long pause
+ RUWIDO_ADDRESS_OFFSET, // address_offset: address offset
+ RUWIDO_ADDRESS_OFFSET + RUWIDO_ADDRESS_LEN, // address_end: end of address
+ RUWIDO_COMMAND_OFFSET, // command_offset: command offset
+ RUWIDO_COMMAND_OFFSET + RUWIDO_COMMAND_LEN, // command_end: end of command
+ RUWIDO_COMPLETE_DATA_LEN, // complete_len: complete length of frame
+ RUWIDO_STOP_BIT, // stop_bit: flag: frame has stop bit
+ RUWIDO_LSB, // lsb_first: flag: LSB first
+ RUWIDO_FLAGS // flags: some flags
+};
+
+#endif
+
static uint8_t irmp_bit; // current bit position
static IRMP_PARAMETER irmp_param;
@@ -1715,10 +1769,10 @@ irmp_ISR (void)
#endif // IRMP_SUPPORT_RECS80_PROTOCOL == 1
#if IRMP_SUPPORT_RC5_PROTOCOL == 1
- if (((irmp_pulse_time >= RC5_START_BIT_LEN_MIN && irmp_pulse_time <= RC5_START_BIT_LEN_MAX) ||
- (irmp_pulse_time >= 2 * RC5_START_BIT_LEN_MIN && irmp_pulse_time <= 2 * RC5_START_BIT_LEN_MAX)) &&
- ((irmp_pause_time >= RC5_START_BIT_LEN_MIN && irmp_pause_time <= RC5_START_BIT_LEN_MAX) ||
- (irmp_pause_time >= 2 * RC5_START_BIT_LEN_MIN && irmp_pause_time <= 2 * RC5_START_BIT_LEN_MAX)))
+ if (((irmp_pulse_time >= RC5_START_BIT_LEN_MIN && irmp_pulse_time <= RC5_START_BIT_LEN_MAX) ||
+ (irmp_pulse_time >= RC5_START_BIT_LEN_MIN_2 && irmp_pulse_time <= RC5_START_BIT_LEN_MAX_2)) &&
+ ((irmp_pause_time >= RC5_START_BIT_LEN_MIN && irmp_pause_time <= RC5_START_BIT_LEN_MAX) ||
+ (irmp_pause_time >= RC5_START_BIT_LEN_MIN_2 && irmp_pause_time <= RC5_START_BIT_LEN_MAX_2)))
{ // it's RC5
#if IRMP_SUPPORT_FDC_PROTOCOL == 1
if (irmp_pulse_time >= FDC_START_BIT_PULSE_LEN_MIN && irmp_pulse_time <= FDC_START_BIT_PULSE_LEN_MAX &&
@@ -1751,16 +1805,18 @@ irmp_ISR (void)
else
#endif // IRMP_SUPPORT_RCCAR_PROTOCOL == 1
{
- ANALYZE_PRINTF ("protocol = RC5, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n",
+ ANALYZE_PRINTF ("protocol = RC5, start bit timings: pulse: %3d - %3d, pause: %3d - %3d or pulse: %3d - %3d, pause: %3d - %3d\n",
RC5_START_BIT_LEN_MIN, RC5_START_BIT_LEN_MAX,
- RC5_START_BIT_LEN_MIN, RC5_START_BIT_LEN_MAX);
+ RC5_START_BIT_LEN_MIN_2, RC5_START_BIT_LEN_MAX_2,
+ RC5_START_BIT_LEN_MIN, RC5_START_BIT_LEN_MAX,
+ RC5_START_BIT_LEN_MIN_2, RC5_START_BIT_LEN_MAX_2);
}
irmp_param_p = (IRMP_PARAMETER *) &rc5_param;
last_pause = irmp_pause_time;
- if ((irmp_pulse_time > RC5_START_BIT_LEN_MAX && irmp_pulse_time <= 2 * RC5_START_BIT_LEN_MAX) ||
- (irmp_pause_time > RC5_START_BIT_LEN_MAX && irmp_pause_time <= 2 * RC5_START_BIT_LEN_MAX))
+ if ((irmp_pulse_time > RC5_START_BIT_LEN_MAX && irmp_pulse_time <= RC5_START_BIT_LEN_MAX_2) ||
+ (irmp_pause_time > RC5_START_BIT_LEN_MAX && irmp_pause_time <= RC5_START_BIT_LEN_MAX_2))
{
last_value = 0;
rc5_cmd_bit6 = 1<<6;
@@ -1899,6 +1955,23 @@ irmp_ISR (void)
}
else
#endif // IRMP_SUPPORT_RCCAR_PROTOCOL == 1
+#if IRMP_SUPPORT_RUWIDO_PROTOCOL == 1
+ if ((irmp_pulse_time >= RUWIDO_START_BIT_PULSE_LEN_MIN && irmp_pulse_time <= RUWIDO_START_BIT_PULSE_LEN_MAX) &&
+ (irmp_pause_time >= RUWIDO_START_BIT_PAUSE_LEN_MIN && irmp_pause_time <= RUWIDO_START_BIT_PAUSE_LEN_MAX))
+ { // it's RUWIDO
+ {
+ ANALYZE_PRINTF ("protocol = RUWIDO, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n",
+ RUWIDO_START_BIT_PULSE_LEN_MIN, RUWIDO_START_BIT_PULSE_LEN_MAX,
+ RUWIDO_START_BIT_PAUSE_LEN_MIN, RUWIDO_START_BIT_PAUSE_LEN_MAX);
+ }
+
+ irmp_param_p = (IRMP_PARAMETER *) &ruwido_param;
+ last_pause = irmp_pause_time;
+
+ last_value = 1;
+ }
+ else
+#endif // IRMP_SUPPORT_RCCAR_PROTOCOL == 1
{
ANALYZE_PRINTF ("protocol = UNKNOWN\n");
irmp_start_bit_detected = 0; // wait for another start bit...
@@ -1917,9 +1990,9 @@ irmp_ISR (void)
else
{
ANALYZE_PRINTF ("pulse: %3d - %3d or %3d - %3d\n", irmp_param.pulse_1_len_min, irmp_param.pulse_1_len_max,
- irmp_param.pulse_1_len_max + 1, 2 * irmp_param.pulse_1_len_max);
+ irmp_param.pulse_0_len_max + 1, irmp_param.pulse_0_len_max);
ANALYZE_PRINTF ("pause: %3d - %3d or %3d - %3d\n", irmp_param.pause_1_len_min, irmp_param.pause_1_len_max,
- irmp_param.pause_1_len_max + 1, 2 * irmp_param.pause_1_len_max);
+ irmp_param.pause_0_len_max + 1, 2 * irmp_param.pause_0_len_max);
}
#if IRMP_SUPPORT_RC5_PROTOCOL == 1 && (IRMP_SUPPORT_FDC_PROTOCOL == 1 || IRMP_SUPPORT_RCCAR_PROTOCOL == 1)
@@ -1966,7 +2039,7 @@ irmp_ISR (void)
#if IRMP_SUPPORT_MANCHESTER == 1
if ((irmp_param.flags & IRMP_PARAM_FLAG_IS_MANCHESTER) && irmp_param.protocol != IRMP_RC6_PROTOCOL) // Manchester, but not RC6
{
- if (irmp_pause_time > irmp_param.pulse_1_len_max && irmp_pause_time <= 2 * irmp_param.pulse_1_len_max)
+ if (irmp_pause_time > irmp_param.pulse_1_len_max && irmp_pause_time <= irmp_param.pulse_0_len_max)
{
ANALYZE_PRINTF ("%8d [bit %2d: pulse = %3d, pause = %3d] ", time_counter, irmp_bit, irmp_pulse_time, irmp_pause_time);
ANALYZE_PUTCHAR ((irmp_param.flags & IRMP_PARAM_FLAG_1ST_PULSE_IS_1) ? '0' : '1');
@@ -2022,7 +2095,8 @@ irmp_ISR (void)
{ // yes...
if (irmp_bit == irmp_param.complete_len && irmp_param.stop_bit == 1)
{
- if (irmp_pulse_time >= irmp_param.pulse_0_len_min && irmp_pulse_time <= irmp_param.pulse_0_len_max)
+ if ((irmp_param.flags & IRMP_PARAM_FLAG_IS_MANCHESTER) ||
+ (irmp_pulse_time >= irmp_param.pulse_0_len_min && irmp_pulse_time <= irmp_param.pulse_0_len_max))
{
#ifdef ANALYZE
if (! (irmp_param.flags & IRMP_PARAM_FLAG_IS_MANCHESTER))
@@ -2061,7 +2135,7 @@ irmp_ISR (void)
#if IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL == 1
if (irmp_param.protocol == IRMP_GRUNDIG_PROTOCOL && !irmp_param.stop_bit)
{
- if (irmp_pause_time > 2 * irmp_param.pause_1_len_max && irmp_bit >= GRUNDIG_COMPLETE_DATA_LEN - 2)
+ if (irmp_pause_time > irmp_param.pause_0_len_max && irmp_bit >= GRUNDIG_COMPLETE_DATA_LEN - 2)
{ // special manchester decoder
irmp_param.complete_len = GRUNDIG_COMPLETE_DATA_LEN; // correct complete len
got_light = TRUE; // this is a lie, but generates a stop bit ;-)
@@ -2087,7 +2161,7 @@ irmp_ISR (void)
#endif
#if IRMP_SUPPORT_MANCHESTER == 1
if ((irmp_param.flags & IRMP_PARAM_FLAG_IS_MANCHESTER) &&
- irmp_pause_time > 2 * irmp_param.pause_1_len_max && irmp_bit >= irmp_param.complete_len - 2 && !irmp_param.stop_bit)
+ irmp_pause_time > irmp_param.pause_0_len_max && irmp_bit >= irmp_param.complete_len - 2 && !irmp_param.stop_bit)
{ // special manchester decoder
got_light = TRUE; // this is a lie, but generates a stop bit ;-)
irmp_param.stop_bit = TRUE; // set flag
@@ -2136,7 +2210,7 @@ irmp_ISR (void)
#if IRMP_SUPPORT_MANCHESTER == 1
if ((irmp_param.flags & IRMP_PARAM_FLAG_IS_MANCHESTER)) // Manchester
{
- if (irmp_pulse_time > irmp_param.pulse_1_len_max /* && irmp_pulse_time <= 2 * irmp_param.pulse_1_len_max */)
+ if (irmp_pulse_time > irmp_param.pulse_1_len_max /* && irmp_pulse_time <= irmp_param.pulse_0_len_max */)
{
#if IRMP_SUPPORT_RC6_PROTOCOL == 1
if (irmp_param.protocol == IRMP_RC6_PROTOCOL && irmp_bit == 4 && irmp_pulse_time > RC6_TOGGLE_BIT_LEN_MIN) // RC6 toggle bit
@@ -2166,7 +2240,7 @@ irmp_ISR (void)
ANALYZE_PUTCHAR ('T');
irmp_store_bit (1);
- if (irmp_pause_time > 2 * irmp_param.pause_1_len_max)
+ if (irmp_pause_time > irmp_param.pause_0_len_max)
{
last_value = 0;
}
@@ -2195,7 +2269,7 @@ irmp_ISR (void)
{
uint8_t manchester_value;
- if (last_pause > irmp_param.pause_1_len_max && last_pause <= 2 * irmp_param.pause_1_len_max)
+ if (last_pause > irmp_param.pause_1_len_max && last_pause <= irmp_param.pause_0_len_max)
{
manchester_value = last_value ? 0 : 1;
last_value = manchester_value;
@@ -2840,7 +2914,6 @@ print_timings (void)
NIKON_START_BIT_PULSE_LEN_MIN, NIKON_START_BIT_PULSE_LEN_MAX, NIKON_START_BIT_PAUSE_LEN_MIN, NIKON_START_BIT_PAUSE_LEN_MAX,
NIKON_PULSE_LEN_MIN, NIKON_PULSE_LEN_MAX, NIKON_0_PAUSE_LEN_MIN, NIKON_0_PAUSE_LEN_MAX,
NIKON_PULSE_LEN_MIN, NIKON_PULSE_LEN_MAX, NIKON_1_PAUSE_LEN_MIN, NIKON_1_PAUSE_LEN_MAX);
-
}
void
diff --git a/irmp.h b/irmp.h
index 5ee4571..4e6629e 100644
--- a/irmp.h
+++ b/irmp.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2009-2010 Frank Meyer - frank(at)fli4l.de
*
- * $Id: irmp.h,v 1.45 2011/01/18 13:02:15 fm Exp $
+ * $Id: irmp.h,v 1.47 2011/02/08 08:46:22 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -70,6 +70,7 @@ typedef uint8_t PAUSE_LEN;
#define IRMP_JVC_PROTOCOL 20 // JVC
#define IRMP_RC6A_PROTOCOL 21 // RC6A, e.g. Kathrein, XBOX
#define IRMP_NIKON_PROTOCOL 22 // Nikon
+#define IRMP_RUWIDO_PROTOCOL 23 // Ruwido, e.g. T-Home Mediareceiver
// some flags of struct IRMP_PARAMETER:
#define IRMP_PARAM_FLAG_IS_MANCHESTER 0x01
@@ -182,6 +183,7 @@ typedef uint8_t PAUSE_LEN;
#define RC5_BIT_TIME 889.0e-6 // 889 usec pulse/pause
#define RC5_FRAME_REPEAT_PAUSE_TIME 45.0e-3 // frame repeat after 45ms
+
#define RC5_ADDRESS_OFFSET 2 // skip 2 bits (2nd start + 1 toggle)
#define RC5_ADDRESS_LEN 5 // read 5 address bits
#define RC5_COMMAND_OFFSET 7 // skip 5 bits (2nd start + 1 toggle + 5 address)
@@ -371,6 +373,22 @@ typedef uint8_t PAUSE_LEN;
#define NIKON_LSB 0 // LSB...MSB
#define NIKON_FLAGS 0 // flags
+#define RUWIDO_START_BIT_PULSE_TIME 889.0e-6 // 900 usec pulse
+#define RUWIDO_START_BIT_PAUSE_TIME 1400.0e-6 // 1400 usec pause
+#define RUWIDO_BIT_PULSE_TIME 889.0e-6 // 889 usec short pulse
+#define RUWIDO_BIT_PULSE_TIME_2 1622.0e-6 // 1622 usec long pulse
+#define RUWIDO_BIT_PAUSE_TIME 611.0e-6 // 611 usec short pause
+#define RUWIDO_BIT_PAUSE_TIME_2 1361.0e-6 // 1361 usec long pause
+#define RUWIDO_FRAME_REPEAT_PAUSE_TIME 45.0e-3 // frame repeat after 45ms
+#define RUWIDO_ADDRESS_OFFSET 2 // skip 2 start bits
+#define RUWIDO_ADDRESS_LEN 8 // read 8 address bits
+#define RUWIDO_COMMAND_OFFSET 10 // skip 10 bits (2 start + 8 address)
+#define RUWIDO_COMMAND_LEN 7 // read 7 command bits, ignore last parity bit
+#define RUWIDO_COMPLETE_DATA_LEN 18 // complete length
+#define RUWIDO_STOP_BIT 0 // has no stop bit
+#define RUWIDO_LSB 0 // MSB...LSB
+#define RUWIDO_FLAGS (IRMP_PARAM_FLAG_IS_MANCHESTER | IRMP_PARAM_FLAG_1ST_PULSE_IS_1) // flags
+
#define AUTO_FRAME_REPETITION_TIME 80.0e-3 // SIRCS/SAMSUNG32/NUBERT: automatic repetition after 25-50ms
// KASEIKYO: automatic repetition after 75ms
diff --git a/irmpconfig.h b/irmpconfig.h
index 4ef052d..dda7273 100644
--- a/irmpconfig.h
+++ b/irmpconfig.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de
*
- * $Id: irmpconfig.h,v 1.47 2011/01/18 13:02:15 fm Exp $
+ * $Id: irmpconfig.h,v 1.48 2011/02/08 08:40:27 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -51,9 +51,10 @@
#define IRMP_SUPPORT_DENON_PROTOCOL 1 // DENON, Sharp >= 10000 ~250 bytes
#define IRMP_SUPPORT_JVC_PROTOCOL 1 // JVC >= 10000 ~250 bytes
#define IRMP_SUPPORT_RC5_PROTOCOL 1 // RC5 >= 10000 ~250 bytes
-#define IRMP_SUPPORT_RC6_PROTOCOL 1 // RC6 & RC6A >= 10000 ~200 bytes
-#define IRMP_SUPPORT_GRUNDIG_PROTOCOL 1 // Grundig >= 10000 ~150 bytes
-#define IRMP_SUPPORT_NOKIA_PROTOCOL 1 // Nokia >= 10000 ~150 bytes
+#define IRMP_SUPPORT_RC6_PROTOCOL 0 // RC6 & RC6A >= 10000 ~200 bytes
+#define IRMP_SUPPORT_RUWIDO_PROTOCOL 0 // RUWIDO, T-Home >= 10000 ~250 bytes
+#define IRMP_SUPPORT_GRUNDIG_PROTOCOL 0 // Grundig >= 10000 ~150 bytes
+#define IRMP_SUPPORT_NOKIA_PROTOCOL 0 // Nokia >= 10000 ~150 bytes
#define IRMP_SUPPORT_NUBERT_PROTOCOL 0 // NUBERT >= 10000 ~50 bytes
#define IRMP_SUPPORT_BANG_OLUFSEN_PROTOCOL 0 // Bang & Olufsen >= 10000 ~200 bytes
#define IRMP_SUPPORT_NIKON_PROTOCOL 0 // NIKON >= 10000 ~250 bytes
@@ -89,6 +90,10 @@
#define IRMP_LOGGING 0 // 1: log IR signal (scan), 0: do not (default)
#endif
+/*---------------------------------------------------------------------------------------------------------------------------------------------------
+ * DO NOT CHANGE THE FOLLOWING LINES !
+ *---------------------------------------------------------------------------------------------------------------------------------------------------
+ */
#if IRMP_SUPPORT_SIEMENS_PROTOCOL == 1 && F_INTERRUPTS < 15000
#warning F_INTERRUPTS too low, SIEMENS protocol disabled (should be at least 15000)
#undef IRMP_SUPPORT_SIEMENS_PROTOCOL
diff --git a/irsnd.c b/irsnd.c
index da09960..0c8c8a3 100644
--- a/irsnd.c
+++ b/irsnd.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de
*
- * $Id: irsnd.c,v 1.29 2011/01/18 13:02:15 fm Exp $
+ * $Id: irsnd.c,v 1.30 2011/02/08 08:46:22 fm Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by