summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorukw2011-03-10 12:32:30 +0000
committerukw2011-03-10 12:32:30 +0000
commit3521380001b19527424f9da3312b365948dfbc42 (patch)
treea699f5a976953c84c1267364556a74d26e9737bb
parentca2a1d9fe525095e2cf2391614d8fb2c9ab418b7 (diff)
downloadirmp-3521380001b19527424f9da3312b365948dfbc42.zip
version 2.0.0-pre1: added NEC42 protocol
git-svn-id: svn://mikrocontroller.net/irmp@67 aeb2e35e-bfc4-4214-b83c-9e8de998ed28
-rw-r--r--IR-Data/universal-15kHz.txt8
-rw-r--r--README.txt4
-rw-r--r--irmp.c97
-rw-r--r--irmp.h18
-rw-r--r--irmpconfig.h31
5 files changed, 117 insertions, 41 deletions
diff --git a/IR-Data/universal-15kHz.txt b/IR-Data/universal-15kHz.txt
index 98be82c..de4a9d4 100644
--- a/IR-Data/universal-15kHz.txt
+++ b/IR-Data/universal-15kHz.txt
@@ -31,7 +31,7 @@
# 16
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111110000000001111111100000000011111111000000000111111100000000011111111000000000111111100000000001111111000000000011111110000000001111111000000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111100000000011111110000000001111111100000000011111111000000000111111111111111111111111000000000111111111111111111111111000000000011111110000000000111111100000000011111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111110000000001111111111111111
# 17
-### 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111000000000111111110000000001111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111100000000011111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111100000000011111111000000000111111111111111111111111000000000011111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111000000000111111111111111111111111000000000111111111111111111111111100000000011111110000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111
+0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111110000000001111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111000000000011111110000000001111111100000000011111111000000000111111110000000001111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111110000000001111111100000000011111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111000000000111111110000000001111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111111111111111111110000000000111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111111111111111
# 18
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111111111111111111110000000001111111111111111111111111000000000111111100000000011111111000000000111111100000000001111111111111111111111110000000001111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111100000000011111110000000001111111111111111111111111000000000111111100000000001111111000000000011111110000000001111111000000000011111110000000000111111111111111111111111000000000111111111111111111111111000000000111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111000000000111111100000000011111111000000000111111111111111111111111000000000011111110000000000111111111111111111111111000000000111111100000000001111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111100000000011111110000000001111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111000000000111111110000000001111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111000000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111100000000011111111111111111111111100000000001111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111000000000011111110000000000111111111111111111111111000000000111111100000000001111111000000000111111110000000001111111100000000011111110000000001111111111111111111111111000000000111111111111111111111111000000000011111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
# 19
@@ -39,7 +39,7 @@
# 20
000000000000001111111111111000000000000000000000000001111111111111111111111111000000000000000000000000000111111111111111111111111100000000000000000000000000011111111111100000000000000111111111111000000000000001111111111110000000000000011111111111111111111111110000000000000011111111111100000000000000000000000000011111111111100000000000000111111111111111
# 21
-### 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111100000000001111111000000000011111110000000000111111100000000011111111000000000111111110000000001111111100000000011111110000000000111111100000000001111111111111111111111110000000001111111100000000011111111000000000111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111000000000011111110000000001111111100000000011111111000000000111111110000000001111111100000000011111111000000000111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111110000000000111111100000000001111111000000000011111110000000001111111100000000011111111000000000111111110000000001111111000000000011111110000000000111111111111111111111111000000000111111110000000001111111100000000011111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111000000000111111110000000001111111100000000011111111000000000111111110000000001111111100000000011111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111
# 22
000000000000000000000000000000000000000001111111111111000000011111111111100000001111110000001111110000000000000000000011111111111111111100000001111110000000111111000000011111100000001111100000000000000111111111111000000011111100000011111100000001111110000000111111000000011111000000000000001111110000001111111111111000000011111000000001111111111111111111
# 23
@@ -167,7 +167,7 @@
# 84
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111100000000011111110000000001111111100000000011111111000000000111111100000000001111111000000000111111110000000001111111000000000111111110000000001111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111110000000001111111000000000111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111000000000011111110000000000111111100000000011111110000000000111111111111111111111111000000000111111111111111111111111100000000011111110000000001111111100000000011111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111110000000001111111111111111
# 85
-### 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111100000000001111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111110000000001111111100000000011111111000000000111111110000000001111111000000000011111110000000001111111111111111111111111000000000111111110000000001111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111000000000011111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111000000000111111110000000001111111111111111111111111000000000111111110000000001111111000000000111111111111111111111111100000000011111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000011111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111110000000000111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111100000000011111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111100000000011111111000000000111111100000000001111111000000000111111111111111111111111100000000011111111000000000111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111100000000001111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111110000000000111111100000000011111111000000000111111111111111111111111100000000011111111000000000111111100000000011111111111111111111111110000000001111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000001111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111100000000011111111111111111111
# 86
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111100000000011111110000000000111111111111111111111111000000000111111111111111111111111000000000011111110000000001111111100000000011111111000000000111111111111111111111111000000000111111110000000001111111111111111111111110000000000111111100000000011111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111110000000001111111000000000011111111111111111111111100000000011111111000000000111111100000000011111111000000000111111110000000001111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111110000000001111111111111111111111110000000001111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111000000000011111110000000001111111100000000011111111111111111111111110000000001111111000000000111111111111111111111111100000000011111110000000001111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111111111111111111110000000000111111100000000011111111000000000111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111100000000011111110000000001111111111111111111111111000000000111111111111111111111111000000000011111110000000001111111100000000011111110000000001111111111111111111111111000000000111111110000000001111111111111111111111110000000001111111100000000011111110000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111110000000001111111000000000111111111111111111111111100000000011111110000000000111111100000000011111111000000000111111100000000011111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
# 87
@@ -175,7 +175,7 @@
# 88
000000000000001111111111110000000000000000000000000001111111111111111111111111000000000000000000000000000111111111111111111111111100000000000000000000000000011111111111100000000000000111111111111000000000000001111111111110000000000000011111111111111111111111110000000000000011111111111100000000000000000000000000011111111111100000000000000111111111111111
# 89
-### 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111000000000011111111111111111111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111100000000011111111000000000111111110000000001111111100000000011111110000000000111111100000000001111111000000000011111110000000001111111100000000011111111111111111111111100000000001111111000000000111111110000000001111111100000000011111111111111111111111100000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111000000000111111110000000001111111100000000011111111000000000111111100000000001111111000000000111111110000000001111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111000000000011111111111111111111
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111100000000001111111111111111111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111000000000011111110000000001111111100000000011111111000000000111111110000000001111111000000000011111110000000000111111100000000001111111000000000111111110000000001111111111111111111111110000000000111111100000000011111111000000000111111110000000001111111111111111111111110000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111100000000011111111000000000111111110000000001111111100000000011111110000000000111111100000000011111111000000000111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111111111111100000000011111111111111111111111110000000001111111111111111111111110000000001111111111111111111111111000000000111111111111111111111111000000000111111111111111
# 90
000000000000000000000000000000000000000001111111111111000000011111111111100000001111100000000111110000000000000000000011111111111111111100000001111110000000111111000000011111000000001111100000000000000111111111111000000011111000000001111100000001111110000000111110000000011111000000000000001111100000000111111111110000000011111000000011111111111111111111
# 91
diff --git a/README.txt b/README.txt
index 05a2a9a..f7c5c5c 100644
--- a/README.txt
+++ b/README.txt
@@ -1,8 +1,8 @@
IRMP - Infrared Multi Protocol Decoder
--------------------------------------
-Version IRMP: 1.9.9 27.02.2010
-Version IRSND: 1.9.1 22.01.2010
+Version IRMP: 2.0.0-pre1 10.03.2010
+Version IRSND: 1.9.1 22.01.2010
Dokumentation:
diff --git a/irmp.c b/irmp.c
index 8c0c6a7..5c35ccf 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.97 2011/02/25 15:24:06 fm Exp $
+ * $Id: irmp.c,v 1.99 2011/03/10 12:29:13 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -176,7 +176,7 @@
* RC6
* ---
*
- * RC6 frame: 1 start bit + 1 bit "1" + 3 mode bits + 1 toggle bit + 16 data bits + 2666 µs pause
+ * RC6 frame: 1 start bit + 1 bit "1" + 3 mode bits + 1 toggle bit + 16 data bits + 2666 us pause
* RC6 data: 8 address bits + 8 command bits
*
* start bit toggle bit "0": toggle bit "1": data/mode "0": data/mode "1":
@@ -957,11 +957,11 @@ static PROGMEM IRMP_PARAMETER nec_rep_param =
#endif
-#if IRMP_SUPPORT_NEC16_PROTOCOL == 1
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1
-static PROGMEM IRMP_PARAMETER nec16_param =
+static PROGMEM IRMP_PARAMETER nec42_param =
{
- IRMP_NEC16_PROTOCOL, // protocol: ir protocol
+ IRMP_NEC42_PROTOCOL, // protocol: ir protocol
NEC_PULSE_LEN_MIN, // pulse_1_len_min: minimum length of pulse with bit value 1
NEC_PULSE_LEN_MAX, // pulse_1_len_max: maximum length of pulse with bit value 1
NEC_1_PAUSE_LEN_MIN, // pause_1_len_min: minimum length of pause with bit value 1
@@ -970,14 +970,14 @@ static PROGMEM IRMP_PARAMETER nec16_param =
NEC_PULSE_LEN_MAX, // pulse_0_len_max: maximum length of pulse with bit value 0
NEC_0_PAUSE_LEN_MIN, // pause_0_len_min: minimum length of pause with bit value 0
NEC_0_PAUSE_LEN_MAX, // pause_0_len_max: maximum length of pause with bit value 0
- NEC16_ADDRESS_OFFSET, // address_offset: address offset
- NEC16_ADDRESS_OFFSET + NEC16_ADDRESS_LEN, // address_end: end of address
- NEC16_COMMAND_OFFSET, // command_offset: command offset
- NEC16_COMMAND_OFFSET + NEC16_COMMAND_LEN, // command_end: end of command
- NEC16_COMPLETE_DATA_LEN, // complete_len: complete length of frame
- NEC16_STOP_BIT, // stop_bit: flag: frame has stop bit
- NEC16_LSB, // lsb_first: flag: LSB first
- NEC16_FLAGS // flags: some flags
+ NEC42_ADDRESS_OFFSET, // address_offset: address offset
+ NEC42_ADDRESS_OFFSET + NEC_ADDRESS_LEN, // address_end: end of address
+ NEC42_COMMAND_OFFSET, // command_offset: command offset
+ NEC42_COMMAND_OFFSET + NEC_COMMAND_LEN, // command_end: end of command
+ NEC42_COMPLETE_DATA_LEN, // complete_len: complete length of frame
+ NEC_STOP_BIT, // stop_bit: flag: frame has stop bit
+ NEC_LSB, // lsb_first: flag: LSB first
+ NEC_FLAGS // flags: some flags
};
#endif
@@ -1609,7 +1609,7 @@ irmp_get_data (IRMP_DATA * irmp_data_p)
static uint16_t irmp_tmp_address; // ir address
static uint16_t irmp_tmp_command; // ir command
-#if IRMP_SUPPORT_RC5_PROTOCOL == 1 && (IRMP_SUPPORT_FDC_PROTOCOL == 1 || IRMP_SUPPORT_RCCAR_PROTOCOL == 1)
+#if IRMP_SUPPORT_RC5_PROTOCOL == 1 && (IRMP_SUPPORT_FDC_PROTOCOL == 1 || IRMP_SUPPORT_RCCAR_PROTOCOL == 1) || IRMP_SUPPORT_NEC42_PROTOCOL == 1
static uint16_t irmp_tmp_address2; // ir address
static uint16_t irmp_tmp_command2; // ir command
#endif
@@ -1666,6 +1666,13 @@ irmp_store_bit (uint8_t value)
}
}
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1
+ else if (irmp_param.protocol == IRMP_NEC42_PROTOCOL && irmp_bit >= 13 && irmp_bit < 26)
+ {
+ irmp_tmp_address2 |= (((uint16_t) (value)) << (irmp_bit - 13)); // CV wants cast
+ }
+#endif
+
#if IRMP_SUPPORT_SAMSUNG_PROTOCOL == 1
else if (irmp_param.protocol == IRMP_SAMSUNG_PROTOCOL && irmp_bit >= SAMSUNG_ID_OFFSET && irmp_bit < SAMSUNG_ID_OFFSET + SAMSUNG_ID_LEN)
{
@@ -1791,7 +1798,7 @@ irmp_ISR (void)
irmp_tmp_command = 0;
irmp_tmp_address = 0;
-#if IRMP_SUPPORT_RC5_PROTOCOL == 1 && (IRMP_SUPPORT_FDC_PROTOCOL == 1 || IRMP_SUPPORT_RCCAR_PROTOCOL == 1)
+#if IRMP_SUPPORT_RC5_PROTOCOL == 1 && (IRMP_SUPPORT_FDC_PROTOCOL == 1 || IRMP_SUPPORT_RCCAR_PROTOCOL == 1) || IRMP_SUPPORT_NEC42_PROTOCOL == 1
irmp_tmp_command2 = 0;
irmp_tmp_address2 = 0;
#endif
@@ -1872,7 +1879,7 @@ irmp_ISR (void)
ANALYZE_PRINTF ("protocol = NEC or JVC repeat frame, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n",
JVC_START_BIT_PULSE_LEN_MIN, JVC_START_BIT_PULSE_LEN_MAX,
JVC_REPEAT_START_BIT_PAUSE_LEN_MIN, JVC_REPEAT_START_BIT_PAUSE_LEN_MAX);
- irmp_param_p = (IRMP_PARAMETER *) &nec_param; // tricky: use nec parameters
+ irmp_param_p = (IRMP_PARAMETER *) &nec_param;
}
else
#endif // IRMP_SUPPORT_JVC_PROTOCOL == 1
@@ -1881,10 +1888,18 @@ irmp_ISR (void)
if (irmp_pulse_time >= NEC_START_BIT_PULSE_LEN_MIN && irmp_pulse_time <= NEC_START_BIT_PULSE_LEN_MAX &&
irmp_pause_time >= NEC_START_BIT_PAUSE_LEN_MIN && irmp_pause_time <= NEC_START_BIT_PAUSE_LEN_MAX)
{
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1
+ ANALYZE_PRINTF ("protocol = NEC42, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n",
+ NEC_START_BIT_PULSE_LEN_MIN, NEC_START_BIT_PULSE_LEN_MAX,
+ NEC_START_BIT_PAUSE_LEN_MIN, NEC_START_BIT_PAUSE_LEN_MAX);
+ irmp_param_p = (IRMP_PARAMETER *) &nec42_param;
+#else
ANALYZE_PRINTF ("protocol = NEC, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n",
NEC_START_BIT_PULSE_LEN_MIN, NEC_START_BIT_PULSE_LEN_MAX,
NEC_START_BIT_PAUSE_LEN_MIN, NEC_START_BIT_PAUSE_LEN_MAX);
irmp_param_p = (IRMP_PARAMETER *) &nec_param;
+#endif
+
}
else if (irmp_pulse_time >= NEC_START_BIT_PULSE_LEN_MIN && irmp_pulse_time <= NEC_START_BIT_PULSE_LEN_MAX &&
irmp_pause_time >= NEC_REPEAT_START_BIT_PAUSE_LEN_MIN && irmp_pause_time <= NEC_REPEAT_START_BIT_PAUSE_LEN_MAX)
@@ -2473,6 +2488,39 @@ irmp_ISR (void)
irmp_start_bit_detected = 1; // tricky: don't wait for another start bit...
}
#endif // IRMP_SUPPORT_JVC_PROTOCOL == 1
+
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1
+#if IRMP_SUPPORT_NEC_PROTOCOL == 1
+ else if (irmp_param.protocol == IRMP_NEC42_PROTOCOL && irmp_bit == 32) // it was a NEC stop bit
+ {
+ ANALYZE_PRINTF ("Switching to NEC protocol\n");
+ irmp_param.stop_bit = TRUE; // set flag
+ irmp_param.protocol = IRMP_NEC_PROTOCOL; // switch protocol
+ irmp_param.complete_len = irmp_bit; // patch length: 16 or 17
+
+ // 0123456789ABC0123456789ABC0123456701234567
+ // NEC42: AAAAAAAAAAAAAaaaaaaaaaaaaaCCCCCCCCcccccccc
+ // NEC: AAAAAAAAaaaaaaaaCCCCCCCCcccccccc
+ irmp_tmp_address |= (irmp_tmp_address2 & 0x0007) << 12;
+ irmp_tmp_command = (irmp_tmp_address2 >> 3) | (irmp_tmp_command << 10);
+ }
+#endif // IRMP_SUPPORT_NEC_PROTOCOL == 1
+#if IRMP_SUPPORT_JVC_PROTOCOL == 1
+ else if (irmp_param.protocol == IRMP_NEC42_PROTOCOL && irmp_bit == 16) // it was a JVC stop bit
+ {
+ ANALYZE_PRINTF ("Switching to JVC protocol\n");
+ irmp_param.stop_bit = TRUE; // set flag
+ irmp_param.protocol = IRMP_JVC_PROTOCOL; // switch protocol
+ irmp_param.complete_len = irmp_bit; // patch length: 16 or 17
+
+ // 0123456789ABC0123456789ABC0123456701234567
+ // NEC42: AAAAAAAAAAAAAaaaaaaaaaaaaaCCCCCCCCcccccccc
+ // JVC: AAAACCCCCCCCCCCC
+ irmp_tmp_command = (irmp_tmp_address >> 4) | (irmp_tmp_address2 << 9); // set command: upper 12 bits are command bits
+ irmp_tmp_address = irmp_tmp_address & 0x000F; // lower 4 bits are address bits
+ }
+#endif // IRMP_SUPPORT_JVC_PROTOCOL == 1
+#endif // IRMP_SUPPORT_NEC42_PROTOCOL == 1
else
{
ANALYZE_PRINTF ("error 2: pause %d after data bit %d too long\n", irmp_pause_time, irmp_bit);
@@ -2770,11 +2818,20 @@ irmp_ISR (void)
#endif // IRMP_SUPPORT_SAMSUNG_PROTOCOL
#if IRMP_SUPPORT_NEC16_PROTOCOL
- if (irmp_param.protocol == IRMP_NEC_PROTOCOL && irmp_bit == 8 &&
- irmp_pause_time >= NEC_START_BIT_PAUSE_LEN_MIN && irmp_pause_time <= NEC_START_BIT_PAUSE_LEN_MAX)
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1
+ if (irmp_param.protocol == IRMP_NEC42_PROTOCOL &&
+#else // IRMP_SUPPORT_NEC_PROTOCOL instead
+ if (irmp_param.protocol == IRMP_NEC_PROTOCOL &&
+#endif // IRMP_SUPPORT_NEC42_PROTOCOL == 1
+ irmp_bit == 8 && irmp_pause_time >= NEC_START_BIT_PAUSE_LEN_MIN && irmp_pause_time <= NEC_START_BIT_PAUSE_LEN_MAX)
{
ANALYZE_PRINTF ("Switching to NEC16 protocol\n");
- memcpy_P (&irmp_param, &nec16_param, sizeof (IRMP_PARAMETER));
+ irmp_param.protocol = IRMP_NEC16_PROTOCOL;
+ irmp_param.address_offset = NEC16_ADDRESS_OFFSET;
+ irmp_param.address_end = NEC16_ADDRESS_OFFSET + NEC16_ADDRESS_LEN;
+ irmp_param.command_offset = NEC16_COMMAND_OFFSET;
+ irmp_param.command_end = NEC16_COMMAND_OFFSET + NEC16_COMMAND_LEN;
+ irmp_param.complete_len = NEC16_COMPLETE_DATA_LEN;
wait_for_space = 0;
}
else
@@ -3473,7 +3530,7 @@ get_fdc_key (uint16_t cmd)
case 0x000C: key = '\\'; break;
case 0x001C: key = '~'; break;
case 0x002D: key = '|'; break;
- case 0x0034: key = 'µ'; break;
+ case 0x0034: key = 0xB5; break; // Mu
}
}
else if (state & (STATE_LEFT_CTRL))
diff --git a/irmp.h b/irmp.h
index 5e00092..b123587 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.58 2011/02/25 15:24:06 fm Exp $
+ * $Id: irmp.h,v 1.59 2011/03/10 12:29:14 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -67,14 +67,15 @@ typedef uint8_t PAUSE_LEN;
#define IRMP_SIEMENS_PROTOCOL 17 // Siemens, e.g. Gigaset
#define IRMP_FDC_PROTOCOL 18 // FDC keyboard
#define IRMP_RCCAR_PROTOCOL 19 // RC Car
-#define IRMP_JVC_PROTOCOL 20 // JVC
+#define IRMP_JVC_PROTOCOL 20 // JVC (NEC with 16 bits)
#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
#define IRMP_IR60_PROTOCOL 24 // IR60 (SAB2008)
#define IRMP_KATHREIN_PROTOCOL 25 // Kathrein
#define IRMP_NETBOX_PROTOCOL 26 // Netbox keyboard (bitserial)
-#define IRMP_NEC16_PROTOCOL 27 // NEC with 16 bits
+#define IRMP_NEC16_PROTOCOL 27 // NEC with 16 bits (incl. sync)
+#define IRMP_NEC42_PROTOCOL 28 // NEC with 42 bits
#define IRMP_IMON_PROTOCOL 99 // Imon (bitserial) PROTOTYPE!
// some flags of struct IRMP_PARAMETER:
@@ -116,21 +117,24 @@ typedef uint8_t PAUSE_LEN;
#define NEC_LSB 1 // LSB...MSB
#define NEC_FLAGS 0 // flags
+#define NEC42_ADDRESS_OFFSET 0 // skip 0 bits
+#define NEC42_ADDRESS_LEN 13 // read 13 address bits
+#define NEC42_COMMAND_OFFSET 26 // skip 26 bits (2 x 13 address bits)
+#define NEC42_COMMAND_LEN 8 // read 8 command bits
+#define NEC42_COMPLETE_DATA_LEN 42 // complete length (2 x 13 + 2 x 8)
+
#define NEC16_ADDRESS_OFFSET 0 // skip 0 bits
#define NEC16_ADDRESS_LEN 8 // read 8 address bits
#define NEC16_COMMAND_OFFSET 8 // skip 8 bits (8 address)
#define NEC16_COMMAND_LEN 8 // read 8 bits (8 command)
#define NEC16_COMPLETE_DATA_LEN 16 // complete length
-#define NEC16_STOP_BIT 1 // has stop bit
-#define NEC16_LSB 1 // LSB...MSB
-#define NEC16_FLAGS 0 // flags
#define SAMSUNG_START_BIT_PULSE_TIME 4500.0e-6 // 4500 usec pulse
#define SAMSUNG_START_BIT_PAUSE_TIME 4500.0e-6 // 4500 usec pause
#define SAMSUNG_PULSE_TIME 550.0e-6 // 550 usec pulse
#define SAMSUNG_1_PAUSE_TIME 1450.0e-6 // 1450 usec pause
#define SAMSUNG_0_PAUSE_TIME 450.0e-6 // 450 usec pause
-#define SAMSUNG_FRAME_REPEAT_PAUSE_TIME 45.0e-3 // frame repeat after 45ms
+#define SAMSUNG_FRAME_REPEAT_PAUSE_TIME 25.0e-3 // frame repeat after 25ms
#define SAMSUNG_ADDRESS_OFFSET 0 // skip 0 bits
#define SAMSUNG_ADDRESS_LEN 16 // read 16 address bits
#define SAMSUNG_ID_OFFSET 17 // skip 16 + 1 sync bit
diff --git a/irmpconfig.h b/irmpconfig.h
index af07fb1..4507669 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.61 2011/02/25 15:24:06 fm Exp $
+ * $Id: irmpconfig.h,v 1.63 2011/03/10 12:29:14 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -19,12 +19,12 @@
/*---------------------------------------------------------------------------------------------------------------------------------------------------
* Change F_INTERRUPTS if you change the number of interrupts per second,
- * Normally, F_INTERRUPTS should be in the range from 10000 to 15000.
- * A value above 15000 costs additional program space, absolut maximum value is 20000.
+ * Normally, F_INTERRUPTS should be in the range from 10000 to 15000, typical is 15000
+ * A value above 15000 costs additional program space, absolute maximum value is 20000.
*---------------------------------------------------------------------------------------------------------------------------------------------------
*/
#ifndef F_INTERRUPTS
-#define F_INTERRUPTS 10000 // interrupts per second, min: 10000, max: 20000
+#define F_INTERRUPTS 15000 // interrupts per second, min: 10000, max: 20000, typ: 15000
#endif
/*---------------------------------------------------------------------------------------------------------------------------------------------------
@@ -42,16 +42,19 @@
*---------------------------------------------------------------------------------------------------------------------------------------------------
*/
-// Protocol Enable Remarks F_INTERRUPTS Program Space
+// Typical Protocols, disable here! Enable Remarks F_INTERRUPTS Program Space
#define IRMP_SUPPORT_SIRCS_PROTOCOL 1 // Sony SIRCS >= 10000 ~150 bytes
#define IRMP_SUPPORT_NEC_PROTOCOL 1 // NEC + APPLE >= 10000 ~300 bytes
#define IRMP_SUPPORT_SAMSUNG_PROTOCOL 1 // Samsung + Samsung32 >= 10000 ~300 bytes
#define IRMP_SUPPORT_MATSUSHITA_PROTOCOL 1 // Matsushita >= 10000 ~50 bytes
#define IRMP_SUPPORT_KASEIKYO_PROTOCOL 1 // Kaseikyo >= 10000 ~250 bytes
#define IRMP_SUPPORT_DENON_PROTOCOL 1 // DENON, Sharp >= 10000 ~250 bytes
-#define IRMP_SUPPORT_JVC_PROTOCOL 1 // JVC >= 10000 ~150 bytes
+#define IRMP_SUPPORT_RC5_PROTOCOL 1 // RC5 >= 10000 ~250 bytes
+
+// More Protocols, enable here! Enable Remarks F_INTERRUPTS Program Space
+#define IRMP_SUPPORT_JVC_PROTOCOL 0 // JVC >= 10000 ~150 bytes
#define IRMP_SUPPORT_NEC16_PROTOCOL 0 // NEC16 >= 10000 ~100 bytes
-#define IRMP_SUPPORT_RC5_PROTOCOL 0 // RC5 >= 10000 ~250 bytes
+#define IRMP_SUPPORT_NEC42_PROTOCOL 0 // NEC42 >= 10000 ~100 bytes
#define IRMP_SUPPORT_RC6_PROTOCOL 0 // RC6 & RC6A >= 10000 ~250 bytes
#define IRMP_SUPPORT_IR60_PROTOCOL 0 // IR60 (SAB2008) >= 10000 ~300 bytes
#define IRMP_SUPPORT_GRUNDIG_PROTOCOL 0 // Grundig >= 10000 ~300 bytes
@@ -129,8 +132,20 @@
#define IRMP_SUPPORT_NEC_PROTOCOL 1
#endif
+#if IRMP_SUPPORT_NEC16_PROTOCOL == 1 && IRMP_SUPPORT_NEC_PROTOCOL == 0
+#warning NEC16 protocol needs also NEC protocol, NEC protocol enabled
+#undef IRMP_SUPPORT_NEC_PROTOCOL
+#define IRMP_SUPPORT_NEC_PROTOCOL 1
+#endif
+
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1 && IRMP_SUPPORT_NEC_PROTOCOL == 0
+#warning NEC42 protocol needs also NEC protocol, NEC protocol enabled
+#undef IRMP_SUPPORT_NEC_PROTOCOL
+#define IRMP_SUPPORT_NEC_PROTOCOL 1
+#endif
+
#if F_INTERRUPTS > 20000
-#error F_INTERRUPTS too high (should be not more than 20000)
+#error F_INTERRUPTS too high (should be not greater than 20000)
#endif
#endif /* _WC_IRMPCONFIG_H_ */