From 89e8cafb0e967ba2c2941c813219aebd8a561e91 Mon Sep 17 00:00:00 2001 From: ukw Date: Mon, 21 Feb 2011 15:06:54 +0000 Subject: [PATCH] version 1.9.4: added IR60 protocol git-svn-id: svn://mikrocontroller.net/irmp@56 aeb2e35e-bfc4-4214-b83c-9e8de998ed28 --- IR-Data/irc-15kHz.txt | 69 ++++++++++++++++++++ IR-Data/test-suite.sh | 1 + README.txt | 2 +- irmp.c | 143 ++++++++++++++++++++++++++---------------- irmp.h | 22 ++++--- irmpconfig.h | 7 ++- irsnd.c | 38 +++++------ 7 files changed, 199 insertions(+), 83 deletions(-) create mode 100644 IR-Data/irc-15kHz.txt diff --git a/IR-Data/irc-15kHz.txt b/IR-Data/irc-15kHz.txt new file mode 100644 index 0000000..1ee9d16 --- /dev/null +++ b/IR-Data/irc-15kHz.txt @@ -0,0 +1,69 @@ +#1 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111111111111100000000111111100000000111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111000000000000000001111111111111100000000111111100000000011111100000000000000000111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111100000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111111111111000000000111111100000000111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000001111110000000000000000111111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111100000000000000001111111111111100000000011111100000000011111100000000000000000111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000001111110000000000000000011111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111100000000000000001111111111111100000000011111100000000011111110000000000000000111111111111110000000001111111111111111 + +#2 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111000000000111111100000000000000001111111111111100000000011111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000111111000000000000000001111111111111100000000111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111000000000000000001111111111111100000000111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000000000011111111111111100000000111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000000000011111111111111000000000111111100000000000000001111111111111100000000011111111111111111 + +#3 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000000000011111110000000001111111111111100000000111111100000000000000001111111111111110000000011111111111111111 +0000000011111111111111111111111111111111111111111111100000000011111100000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111110000000011111111111111000000000111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111110000000011111111111111100000000111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111000000000000000001111110000000001111111111111100000000011111100000000000000000111111111111110000000011111111111111111 +0000000011111111111111111111111111111111111111111111100000000011111100000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111110000000011111111111111000000000111111100000000000000001111111111111100000000011111111111111111 + +#4 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000001111111100000000000000001111111111111100000000000000001111111111111110000000011111111111111111 +0000000011111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000111111000000000000000011111111111111100000000000000011111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000111111110000000000000000111111000000000111111100000000111111100000000111111100000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000001111111000000000000000011111111111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000111111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111000000000111111100000000000000011111111111111100000000000000001111111111111110000000011111111111111111 +0000000011111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000111111000000000000000011111111111111100000000000000001111111111111100000000111111111111111111 + +#5 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111111111111100000000000000001111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111111111111100000000000000001111111111111100000000000000001111111111111100000000011111111111111111 +000000000111111111111111111111111111111111111111111110000000001111111000000000000000011111110000000011111110000000011111110000000001111110000000001111111111111111 +0000000001111111111111111111111111111111111111111111110000000001111110000000000000000011111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111100000000000000001111111111111100000000000000001111111111111110000000000000000111111111111110000000001111111111111111 +0000000001111111111111111111111111111111111111111111110000000001111110000000000000000111111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111000000000000000001111111111111100000000000000001111111111111100000000000000000111111111111110000000011111111111111111 + +#6 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111100000000000000011111110000000001111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111000000000000000001111110000000011111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000011111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111100000000000000001111110000000001111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000111111000000000000000011111110000000001111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111000000000000000001111110000000001111111111111100000000000000001111111111111110000000011111111111111111 + +#7 +0000000001111111111111111111111111111111111111111111110000000001111110000000000000000111111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111100000000000000001111110000000001111111000000001111111111111100000000000000000111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111100000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111110000000011111110000000011111111111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000000000011111110000000001111110000000001111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000000000011111110000000001111110000000011111111111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111110000000011111110000000011111111111111100000000000000001111111111111100000000011111111111111111 + +#8 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000111111000000000111111100000000000000001111110000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111000000000111111100000000111111100000000000000001111111000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000111111000000000111111100000000111111100000000000000001111111000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000111111000000000111111100000000000000001111110000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000111111000000000111111100000000111111100000000000000001111111000000001111111111111110000000011111111111111111 + +#9 +0000000001111111111111111111111111111111111111111111110000000001111110000000000000000111111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111100000000000000001111111111111100000000011111100000000000000001111111000000000111111111111110000000001111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000000000011111111111111100000000111111100000000000000001111111000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000001111111100000000111111100000000111111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111111111111000000000111111100000000000000001111110000000001111111111111100000000111111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111111111111111111111111000000000000000011111111111111100000000111111100000000000000001111111000000001111111111111110000000011111111111111111 +0000000011111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000000000011111111111111000000000111111000000000000000001111110000000011111111111111100000000111111111111111111 + +#0 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000001111111100000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000111111000000000111111000000000111111100000000111111100000000000000001111111111111100000000011111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000011111100000000011111100000000011111110000000011111110000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000011111111111111111111111111111111111111111111100000000111111100000000111111100000000011111100000000011111110000000000000000111111111111110000000001111111111111111 +0000000001111111111111111111111111111111111111111111110000000011111110000000000000000111111100000000111111100000000011111100000000011111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000000111111000000000111111100000000111111100000000111111100000000000000001111111111111110000000011111111111111111 +0000000001111111111111111111111111111111111111111111100000000011111110000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000000111111000000001111111100000000111111100000000000000001111111111111100000000011111111111111111 +0000000011111111111111111111111111111111111111111111100000000011111100000000000000000111111000000000111111100000000111111100000000111111100000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111111111111111111111111000000001111111000000001111111000000000111111000000000111111100000000000000001111111111111100000000011111111111111111 diff --git a/IR-Data/test-suite.sh b/IR-Data/test-suite.sh index e749b0a..c3c9200 100644 --- a/IR-Data/test-suite.sh +++ b/IR-Data/test-suite.sh @@ -80,6 +80,7 @@ for j in \ Siemens-Gigaset-M740AV-15kHz.txt \ bo_beolink1000-15kHz.txt \ denon-15kHz.txt \ + irc-15kHz.txt \ t-home-mediareceiver-15kHz.txt \ xbox360-15kHz.txt do diff --git a/README.txt b/README.txt index 8e9ead2..e7690a6 100644 --- a/README.txt +++ b/README.txt @@ -1,7 +1,7 @@ IRMP - Infrared Multi Protocol Decoder -------------------------------------- -Version IRMP: 1.9.3 21.02.2010 +Version IRMP: 1.9.4 21.02.2010 Version IRSND: 1.9.1 25.01.2010 Dokumentation: diff --git a/irmp.c b/irmp.c index f44ef99..89bfd91 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.90 2011/02/21 11:49:37 fm Exp $ + * $Id: irmp.c,v 1.92 2011/02/21 15:05:40 fm Exp $ * * ATMEGA88 @ 8 MHz * @@ -338,10 +338,10 @@ typedef unsigned int16 uint16_t; #endif #include "irmp.h" -#if IRMP_SUPPORT_GRUNDIG_PROTOCOL == 1 || IRMP_SUPPORT_NOKIA_PROTOCOL == 1 -#define IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL 1 +#if IRMP_SUPPORT_GRUNDIG_PROTOCOL == 1 || IRMP_SUPPORT_NOKIA_PROTOCOL == 1 || IRMP_SUPPORT_IR60_PROTOCOL == 1 +#define IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL 1 #else -#define IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL 0 +#define IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL 0 #endif #if IRMP_SUPPORT_SIEMENS_PROTOCOL == 1 || IRMP_SUPPORT_RUWIDO_PROTOCOL == 1 @@ -352,8 +352,9 @@ typedef unsigned int16 uint16_t; #if IRMP_SUPPORT_RC5_PROTOCOL == 1 || \ IRMP_SUPPORT_RC6_PROTOCOL == 1 || \ - IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL == 1 || \ - IRMP_SUPPORT_SIEMENS_OR_RUWIDO_PROTOCOL == 1 + IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL == 1 || \ + IRMP_SUPPORT_SIEMENS_OR_RUWIDO_PROTOCOL == 1 || \ + IRMP_SUPPORT_IR60_PROTOCOL #define IRMP_SUPPORT_MANCHESTER 1 #else #define IRMP_SUPPORT_MANCHESTER 0 @@ -553,31 +554,32 @@ typedef unsigned int16 uint16_t; #define BANG_OLUFSEN_TRAILER_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * BANG_OLUFSEN_TRAILER_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) #define BANG_OLUFSEN_TRAILER_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * BANG_OLUFSEN_TRAILER_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define GRUNDIG_OR_NOKIA_START_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_BIT_TIME * MIN_TOLERANCE_20 + 0.5) - 1) -#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) - -#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME_2 * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME_2 * MAX_TOLERANCE_10 + 0.5) + 1) -#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME_2 * MIN_TOLERANCE_10 + 0.5) - 1) -#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME_2 * MAX_TOLERANCE_10 + 0.5) + 1) +#define IR60_TIMEOUT_LEN ((uint8_t)(F_INTERRUPTS * IR60_TIMEOUT_TIME * 0.5)) +#define GRUNDIG_NOKIA_IR60_START_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_BIT_TIME * MIN_TOLERANCE_20 + 0.5) - 1) +#define GRUNDIG_NOKIA_IR60_START_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_BIT_TIME * MAX_TOLERANCE_20 + 0.5) + 1) +#define GRUNDIG_NOKIA_IR60_BIT_LEN_MIN ((uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_BIT_TIME * MIN_TOLERANCE_20 + 0.5) - 1) +#define GRUNDIG_NOKIA_IR60_BIT_LEN_MAX ((uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_BIT_TIME * MAX_TOLERANCE_20 + 0.5) + 1) +#define GRUNDIG_NOKIA_IR60_BIT_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * GRUNDIG_NOKIA_IR60_BIT_TIME * MIN_TOLERANCE_20 + 0.5) - 1) +#define GRUNDIG_NOKIA_IR60_BIT_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * GRUNDIG_NOKIA_IR60_BIT_TIME * MAX_TOLERANCE_20 + 0.5) + 1) +#define GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_PRE_PAUSE_TIME * MIN_TOLERANCE_20 + 0.5) + 1) +#define GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_PRE_PAUSE_TIME * MAX_TOLERANCE_20 + 0.5) + 1) + +#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * 2 * SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MIN ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MAX ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME_2 * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_BIT_PULSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PULSE_TIME_2 * MAX_TOLERANCE_10 + 0.5) + 1) +#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MIN_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME_2 * MIN_TOLERANCE_10 + 0.5) - 1) +#define SIEMENS_OR_RUWIDO_BIT_PAUSE_LEN_MAX_2 ((uint8_t)(F_INTERRUPTS * SIEMENS_OR_RUWIDO_BIT_PAUSE_TIME_2 * MAX_TOLERANCE_10 + 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) @@ -1156,29 +1158,31 @@ static PROGMEM IRMP_PARAMETER bang_olufsen_param = #endif -#if IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL == 1 +#if IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL == 1 + +static uint8_t first_bit; static PROGMEM IRMP_PARAMETER grundig_param = { IRMP_GRUNDIG_PROTOCOL, // protocol: ir protocol - 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_NOKIA_IR60_BIT_LEN_MIN, // pulse_1_len_min: here: minimum length of short pulse + GRUNDIG_NOKIA_IR60_BIT_LEN_MAX, // pulse_1_len_max: here: maximum length of short pulse + GRUNDIG_NOKIA_IR60_BIT_LEN_MIN, // pause_1_len_min: here: minimum length of short pause + GRUNDIG_NOKIA_IR60_BIT_LEN_MAX, // pause_1_len_max: here: maximum length of short pause + GRUNDIG_NOKIA_IR60_BIT_LEN_MIN_2, // pulse_0_len_min: here: minimum length of long pulse + GRUNDIG_NOKIA_IR60_BIT_LEN_MAX_2, // pulse_0_len_max: here: maximum length of long pulse + GRUNDIG_NOKIA_IR60_BIT_LEN_MIN_2, // pause_0_len_min: here: minimum length of long pause + GRUNDIG_NOKIA_IR60_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 GRUNDIG_COMMAND_OFFSET + GRUNDIG_COMMAND_LEN + 1, // command_end: end of command (USE 1 bit MORE to STORE NOKIA DATA!) NOKIA_COMPLETE_DATA_LEN, // complete_len: complete length of frame, here: NOKIA instead of GRUNDIG! - GRUNDIG_OR_NOKIA_STOP_BIT, // stop_bit: flag: frame has stop bit - GRUNDIG_OR_NOKIA_LSB, // lsb_first: flag: LSB first - GRUNDIG_OR_NOKIA_FLAGS // flags: some flags + GRUNDIG_NOKIA_IR60_STOP_BIT, // stop_bit: flag: frame has stop bit + GRUNDIG_NOKIA_IR60_LSB, // lsb_first: flag: LSB first + GRUNDIG_NOKIA_IR60_FLAGS // flags: some flags }; #endif @@ -1373,6 +1377,14 @@ irmp_get_data (IRMP_DATA * irmp_data_p) } break; #endif +#if IRMP_SUPPORT_IR60_PROTOCOL == 1 + case IRMP_IR60_PROTOCOL: + if (irmp_command != 0x007d) // 0x007d (== 62<<1 + 1) is start instruction frame + { + rtc = TRUE; + } + break; +#endif #if IRMP_SUPPORT_RCCAR_PROTOCOL == 1 case IRMP_RCCAR_PROTOCOL: // frame in irmp_data: @@ -1436,6 +1448,13 @@ static uint8_t irmp_bit; static void irmp_store_bit (uint8_t value) { +#if IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL == 1 + if (irmp_bit == 0 && irmp_param.protocol == IRMP_GRUNDIG_PROTOCOL) + { + first_bit = value; + } + else +#endif if (irmp_bit >= irmp_param.address_offset && irmp_bit < irmp_param.address_end) { @@ -1891,19 +1910,19 @@ irmp_ISR (void) else #endif // IRMP_SUPPORT_BANG_OLUFSEN_PROTOCOL == 1 -#if IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL == 1 - if (irmp_pulse_time >= GRUNDIG_OR_NOKIA_START_BIT_LEN_MIN && irmp_pulse_time <= GRUNDIG_OR_NOKIA_START_BIT_LEN_MAX && - irmp_pause_time >= GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MIN && irmp_pause_time <= GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MAX) +#if IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL == 1 + if (irmp_pulse_time >= GRUNDIG_NOKIA_IR60_START_BIT_LEN_MIN && irmp_pulse_time <= GRUNDIG_NOKIA_IR60_START_BIT_LEN_MAX && + irmp_pause_time >= GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MIN && irmp_pause_time <= GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MAX) { // it's GRUNDIG ANALYZE_PRINTF ("protocol = GRUNDIG, pre bit timings: pulse: %3d - %3d, pause: %3d - %3d\n", - GRUNDIG_OR_NOKIA_START_BIT_LEN_MIN, GRUNDIG_OR_NOKIA_START_BIT_LEN_MAX, - GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MIN, GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MAX); + GRUNDIG_NOKIA_IR60_START_BIT_LEN_MIN, GRUNDIG_NOKIA_IR60_START_BIT_LEN_MAX, + GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MIN, GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MAX); irmp_param_p = (IRMP_PARAMETER *) &grundig_param; last_pause = irmp_pause_time; last_value = 1; } else -#endif // IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL == 1 +#endif // IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL == 1 #if IRMP_SUPPORT_SIEMENS_OR_RUWIDO_PROTOCOL == 1 if (((irmp_pulse_time >= SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MIN && irmp_pulse_time <= SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MAX) || @@ -1946,6 +1965,7 @@ irmp_ISR (void) } else #endif // IRMP_SUPPORT_RCCAR_PROTOCOL == 1 + { ANALYZE_PRINTF ("protocol = UNKNOWN\n"); irmp_start_bit_detected = 0; // wait for another start bit... @@ -2108,10 +2128,26 @@ irmp_ISR (void) } else #endif -#if IRMP_SUPPORT_GRUNDIG_OR_NOKIA_PROTOCOL == 1 +#if IRMP_SUPPORT_GRUNDIG_NOKIA_IR60_PROTOCOL == 1 if (irmp_param.protocol == IRMP_GRUNDIG_PROTOCOL && !irmp_param.stop_bit) { - if (irmp_pause_time > irmp_param.pause_0_len_max && irmp_bit >= GRUNDIG_COMPLETE_DATA_LEN - 2) + if (irmp_pause_time > IR60_TIMEOUT_LEN && irmp_bit == 6) + { + ANALYZE_PRINTF ("Switching to IR60 protocol\n"); + got_light = TRUE; // this is a lie, but generates a stop bit ;-) + irmp_param.stop_bit = TRUE; // set flag + + irmp_param.protocol = IRMP_IR60_PROTOCOL; // change protocol + irmp_param.complete_len = IR60_COMPLETE_DATA_LEN; // correct complete len + irmp_param.address_offset = IR60_ADDRESS_OFFSET; + irmp_param.address_end = IR60_ADDRESS_OFFSET + IR60_ADDRESS_LEN; + irmp_param.command_offset = IR60_COMMAND_OFFSET; + irmp_param.command_end = IR60_COMMAND_OFFSET + IR60_COMMAND_LEN; + + irmp_tmp_command <<= 1; + irmp_tmp_command |= first_bit; + } + else 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 ;-) @@ -2899,8 +2935,9 @@ print_timings (void) BANG_OLUFSEN_PULSE_LEN_MIN, BANG_OLUFSEN_PULSE_LEN_MAX, BANG_OLUFSEN_1_PAUSE_LEN_MIN, BANG_OLUFSEN_1_PAUSE_LEN_MAX); printf ("GRUNDIG/NOKIA 1 %3d - %3d %3d - %3d %3d - %3d\n", - GRUNDIG_OR_NOKIA_START_BIT_LEN_MIN, GRUNDIG_OR_NOKIA_START_BIT_LEN_MAX, GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MIN, GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN_MAX, - GRUNDIG_OR_NOKIA_BIT_LEN_MIN, GRUNDIG_OR_NOKIA_BIT_LEN_MAX); + GRUNDIG_NOKIA_IR60_START_BIT_LEN_MIN, GRUNDIG_NOKIA_IR60_START_BIT_LEN_MAX, + GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MIN, GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN_MAX, + GRUNDIG_NOKIA_IR60_BIT_LEN_MIN, GRUNDIG_NOKIA_IR60_BIT_LEN_MAX); printf ("SIEMENS/RUWIDO 1 %3d - %3d %3d - %3d %3d - %3d %3d - %3d %3d - %3d %3d - %3d\n", SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MIN, SIEMENS_OR_RUWIDO_START_BIT_PULSE_LEN_MAX, diff --git a/irmp.h b/irmp.h index d16da60..acd1ab2 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.49 2011/02/21 11:49:37 fm Exp $ + * $Id: irmp.h,v 1.51 2011/02/21 15:05:40 fm Exp $ * * ATMEGA88 @ 8 MHz * @@ -71,6 +71,7 @@ typedef uint8_t PAUSE_LEN; #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) // some flags of struct IRMP_PARAMETER: #define IRMP_PARAM_FLAG_IS_MANCHESTER 0x01 @@ -279,12 +280,12 @@ typedef uint8_t PAUSE_LEN; #define BANG_OLUFSEN_LSB 0 // MSB...LSB #define BANG_OLUFSEN_FLAGS 0 // flags -#define GRUNDIG_OR_NOKIA_BIT_TIME 528.0e-6 // 528 usec pulse/pause -#define GRUNDIG_OR_NOKIA_PRE_PAUSE_TIME 2639.0e-6 // 2639 usec pause after pre bit -#define GRUNDIG_OR_NOKIA_FRAME_REPEAT_PAUSE_TIME 117.76e-3 // info frame repeat after 117.76 ms -#define GRUNDIG_OR_NOKIA_STOP_BIT 0 // has no stop bit -#define GRUNDIG_OR_NOKIA_LSB 1 // MSB...LSB -#define GRUNDIG_OR_NOKIA_FLAGS (IRMP_PARAM_FLAG_IS_MANCHESTER | IRMP_PARAM_FLAG_1ST_PULSE_IS_1) // flags +#define GRUNDIG_NOKIA_IR60_BIT_TIME 528.0e-6 // 528 usec pulse/pause +#define GRUNDIG_NOKIA_IR60_PRE_PAUSE_TIME 2639.0e-6 // 2639 usec pause after pre bit +#define GRUNDIG_NOKIA_IR60_FRAME_REPEAT_PAUSE_TIME 117.76e-3 // info frame repeat after 117.76 ms +#define GRUNDIG_NOKIA_IR60_STOP_BIT 0 // has no stop bit +#define GRUNDIG_NOKIA_IR60_LSB 1 // MSB...LSB +#define GRUNDIG_NOKIA_IR60_FLAGS (IRMP_PARAM_FLAG_IS_MANCHESTER | IRMP_PARAM_FLAG_1ST_PULSE_IS_1) // flags #define GRUNDIG_FRAMES 2 // GRUNDIG sends each frame 1+1 times #define GRUNDIG_AUTO_REPETITION_PAUSE_TIME 20.0e-3 // repetition after 20ms @@ -302,6 +303,13 @@ typedef uint8_t PAUSE_LEN; #define NOKIA_COMMAND_LEN 8 // read 8 command bits #define NOKIA_COMPLETE_DATA_LEN 17 // complete length: 1 start bit + 8 address bits + 8 command bits +#define IR60_TIMEOUT_TIME 5000.0e-6 // timeout grundig frame, switch to IR60 +#define IR60_ADDRESS_OFFSET 0 // skip 1 bits +#define IR60_ADDRESS_LEN 0 // read 0 address bits +#define IR60_COMMAND_OFFSET 0 // skip 1 bit (start bit after pre bit, always 1) +#define IR60_COMMAND_LEN 7 // read 6 command bits +#define IR60_COMPLETE_DATA_LEN 7 // complete length + #define SIEMENS_OR_RUWIDO_START_BIT_PULSE_TIME 275.0e-6 // 275 usec pulse #define SIEMENS_OR_RUWIDO_START_BIT_PAUSE_TIME 550.0e-6 // 550 usec pause #define SIEMENS_OR_RUWIDO_BIT_PULSE_TIME 275.0e-6 // 275 usec short pulse diff --git a/irmpconfig.h b/irmpconfig.h index 64d4184..8159b9a 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.51 2011/02/21 12:00:46 fm Exp $ + * $Id: irmpconfig.h,v 1.52 2011/02/21 14:59:15 fm Exp $ * * ATMEGA88 @ 8 MHz * @@ -52,8 +52,9 @@ #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 0 // Grundig >= 10000 ~150 bytes -#define IRMP_SUPPORT_NOKIA_PROTOCOL 0 // Nokia >= 10000 ~150 bytes +#define IRMP_SUPPORT_IR60_PROTOCOL 1 // IR60 (SAB2008) >= 10000 ~250 bytes +#define IRMP_SUPPORT_GRUNDIG_PROTOCOL 1 // Grundig >= 10000 ~150 bytes +#define IRMP_SUPPORT_NOKIA_PROTOCOL 1 // 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 diff --git a/irsnd.c b/irsnd.c index 0c8c8a3..ee8e657 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.30 2011/02/08 08:46:22 fm Exp $ + * $Id: irsnd.c,v 1.31 2011/02/21 14:59:15 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 @@ -153,11 +153,11 @@ typedef uint8_t IRSND_PAUSE_LEN; #define BANG_OLUFSEN_TRAILER_BIT_PAUSE_LEN (uint8_t)(F_INTERRUPTS * BANG_OLUFSEN_TRAILER_BIT_PAUSE_TIME + 0.5) #define BANG_OLUFSEN_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * BANG_OLUFSEN_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t! -#define GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN (uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_PRE_PAUSE_TIME + 0.5) -#define GRUNDIG_OR_NOKIA_BIT_LEN (uint8_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_BIT_TIME + 0.5) +#define GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN (uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_PRE_PAUSE_TIME + 0.5) +#define GRUNDIG_NOKIA_IR60_BIT_LEN (uint8_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_BIT_TIME + 0.5) #define GRUNDIG_AUTO_REPETITION_PAUSE_LEN (uint16_t)(F_INTERRUPTS * GRUNDIG_AUTO_REPETITION_PAUSE_TIME + 0.5) // use uint16_t! #define NOKIA_AUTO_REPETITION_PAUSE_LEN (uint16_t)(F_INTERRUPTS * NOKIA_AUTO_REPETITION_PAUSE_TIME + 0.5) // use uint16_t! -#define GRUNDIG_OR_NOKIA_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * GRUNDIG_OR_NOKIA_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t! +#define GRUNDIG_NOKIA_IR60_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * GRUNDIG_NOKIA_IR60_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t! #define SIEMENS_START_BIT_LEN (uint8_t)(F_INTERRUPTS * SIEMENS_BIT_TIME + 0.5) #define SIEMENS_BIT_LEN (uint8_t)(F_INTERRUPTS * SIEMENS_BIT_TIME + 0.5) @@ -1050,15 +1050,15 @@ irsnd_ISR (void) #if IRSND_SUPPORT_GRUNDIG_PROTOCOL == 1 case IRMP_GRUNDIG_PROTOCOL: { - startbit_pulse_len = GRUNDIG_OR_NOKIA_BIT_LEN; - startbit_pause_len = GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN - 1; - pulse_len = GRUNDIG_OR_NOKIA_BIT_LEN; - pause_len = GRUNDIG_OR_NOKIA_BIT_LEN; - has_stop_bit = GRUNDIG_OR_NOKIA_STOP_BIT; + startbit_pulse_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + startbit_pause_len = GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN - 1; + pulse_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + pause_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + has_stop_bit = GRUNDIG_NOKIA_IR60_STOP_BIT; complete_data_len = GRUNDIG_COMPLETE_DATA_LEN; n_auto_repetitions = GRUNDIG_FRAMES; // 2 frames auto_repetition_pause_len = GRUNDIG_AUTO_REPETITION_PAUSE_LEN; // 20m sec pause - repeat_frame_pause_len = GRUNDIG_OR_NOKIA_FRAME_REPEAT_PAUSE_LEN; // 117 msec pause + repeat_frame_pause_len = GRUNDIG_NOKIA_IR60_FRAME_REPEAT_PAUSE_LEN; // 117 msec pause irsnd_set_freq (IRSND_FREQ_38_KHZ); break; @@ -1067,15 +1067,15 @@ irsnd_ISR (void) #if IRSND_SUPPORT_NOKIA_PROTOCOL == 1 case IRMP_NOKIA_PROTOCOL: { - startbit_pulse_len = GRUNDIG_OR_NOKIA_BIT_LEN; - startbit_pause_len = GRUNDIG_OR_NOKIA_PRE_PAUSE_LEN - 1; - pulse_len = GRUNDIG_OR_NOKIA_BIT_LEN; - pause_len = GRUNDIG_OR_NOKIA_BIT_LEN; - has_stop_bit = GRUNDIG_OR_NOKIA_STOP_BIT; + startbit_pulse_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + startbit_pause_len = GRUNDIG_NOKIA_IR60_PRE_PAUSE_LEN - 1; + pulse_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + pause_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + has_stop_bit = GRUNDIG_NOKIA_IR60_STOP_BIT; complete_data_len = NOKIA_COMPLETE_DATA_LEN; n_auto_repetitions = NOKIA_FRAMES; // 2 frames auto_repetition_pause_len = NOKIA_AUTO_REPETITION_PAUSE_LEN; // 20 msec pause - repeat_frame_pause_len = GRUNDIG_OR_NOKIA_FRAME_REPEAT_PAUSE_LEN; // 117 msec pause + repeat_frame_pause_len = GRUNDIG_NOKIA_IR60_FRAME_REPEAT_PAUSE_LEN; // 117 msec pause irsnd_set_freq (IRSND_FREQ_38_KHZ); break; } @@ -1419,7 +1419,7 @@ irsnd_ISR (void) if (repeat_counter > 0) { // set 117 msec pause time - auto_repetition_pause_len = GRUNDIG_OR_NOKIA_FRAME_REPEAT_PAUSE_LEN; + auto_repetition_pause_len = GRUNDIG_NOKIA_IR60_FRAME_REPEAT_PAUSE_LEN; } if (repeat_counter < n_repeat_frames) // tricky: repeat n info frames per auto repetition before sending last stop frame @@ -1464,8 +1464,8 @@ irsnd_ISR (void) } else // send n'th bit { - pulse_len = GRUNDIG_OR_NOKIA_BIT_LEN; - pause_len = GRUNDIG_OR_NOKIA_BIT_LEN; + pulse_len = GRUNDIG_NOKIA_IR60_BIT_LEN; + pause_len = GRUNDIG_NOKIA_IR60_BIT_LEN; first_pulse = (irsnd_buffer[current_bit / 8] & (1<<(7-(current_bit % 8)))) ? TRUE : FALSE; } } -- 2.39.2