summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorukw2013-04-09 14:17:52 +0000
committerukw2013-04-09 14:17:52 +0000
commitc9b6916a7fdde31acf9cd221dcc6b5b42f6626f7 (patch)
tree7bd85ca17ba0ae41e7f96587263bc17e3d11d4e6
parent43cd3a71c99dbdd6b80ccba6e1a40cb230c287ff (diff)
downloadirmp-c9b6916a7fdde31acf9cd221dcc6b5b42f6626f7.zip
Version 2.3.10: added ROOMBA protocol in IRSND
git-svn-id: svn://mikrocontroller.net/irmp@120 aeb2e35e-bfc4-4214-b83c-9e8de998ed28
-rw-r--r--README.txt2
-rw-r--r--irsnd.c40
-rw-r--r--irsndconfig.h3
3 files changed, 42 insertions, 3 deletions
diff --git a/README.txt b/README.txt
index 4f1ccde..36bdfee 100644
--- a/README.txt
+++ b/README.txt
@@ -2,7 +2,7 @@ IRMP - Infrared Multi Protocol Decoder
--------------------------------------
Version IRMP: 2.3.10 09.04.2013
-Version IRSND: 2.3.8 12.03.2013
+Version IRSND: 2.3.10 09.04.2013
Dokumentation:
diff --git a/irsnd.c b/irsnd.c
index fd01122..8002cb5 100644
--- a/irsnd.c
+++ b/irsnd.c
@@ -13,7 +13,7 @@
* ATmega164, ATmega324, ATmega644, ATmega644P, ATmega1284, ATmega1284P
* ATmega88, ATmega88P, ATmega168, ATmega168P, ATmega328P
*
- * $Id: irsnd.c,v 1.68 2013/03/12 12:49:59 fm Exp $
+ * $Id: irsnd.c,v 1.69 2013/04/09 14:19:11 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
@@ -357,6 +357,14 @@
#define A1TVBOX_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * A1TVBOX_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t!
#define A1TVBOX_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * A1TVBOX_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t!
+#define ROOMBA_START_BIT_PULSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_START_BIT_PULSE_TIME + 0.5)
+#define ROOMBA_START_BIT_PAUSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_START_BIT_PAUSE_TIME + 0.5)
+#define ROOMBA_1_PULSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_1_PULSE_TIME + 0.5)
+#define ROOMBA_0_PULSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_0_PULSE_TIME + 0.5)
+#define ROOMBA_1_PAUSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_1_PAUSE_TIME + 0.5)
+#define ROOMBA_0_PAUSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_0_PAUSE_TIME + 0.5)
+#define ROOMBA_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * ROOMBA_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t!
+
static volatile uint8_t irsnd_busy = 0;
static volatile uint8_t irsnd_protocol = 0;
static volatile uint8_t irsnd_buffer[6] = {0};
@@ -1106,6 +1114,15 @@ irsnd_send_data (IRMP_DATA * irmp_data_p, uint8_t do_wait)
break;
}
#endif
+#if IRSND_SUPPORT_ROOMBA_PROTOCOL == 1
+ case IRMP_ROOMBA_PROTOCOL:
+ {
+
+ irsnd_buffer[0] = (irmp_data_p->command & 0x7F) << 1; // CCCCCCC.
+ irsnd_busy = TRUE;
+ break;
+ }
+#endif
default:
{
break;
@@ -1761,6 +1778,24 @@ irsnd_ISR (void)
break;
}
#endif
+#if IRSND_SUPPORT_ROOMBA_PROTOCOL == 1
+ case IRMP_ROOMBA_PROTOCOL:
+ {
+ startbit_pulse_len = ROOMBA_START_BIT_PULSE_LEN;
+ startbit_pause_len = ROOMBA_START_BIT_PAUSE_LEN;
+ pulse_1_len = ROOMBA_1_PULSE_LEN;
+ pause_1_len = ROOMBA_1_PAUSE_LEN - 1;
+ pulse_0_len = ROOMBA_0_PULSE_LEN;
+ pause_0_len = ROOMBA_0_PAUSE_LEN - 1;
+ has_stop_bit = ROOMBA_STOP_BIT;
+ complete_data_len = ROOMBA_COMPLETE_DATA_LEN;
+ n_auto_repetitions = 1; // 1 frame
+ auto_repetition_pause_len = 0;
+ repeat_frame_pause_len = ROOMBA_FRAME_REPEAT_PAUSE_LEN;
+ irsnd_set_freq (IRSND_FREQ_38_KHZ);
+ break;
+ }
+#endif
default:
{
irsnd_busy = FALSE;
@@ -1831,6 +1866,9 @@ irsnd_ISR (void)
#if IRSND_SUPPORT_LEGO_PROTOCOL == 1
case IRMP_LEGO_PROTOCOL:
#endif
+#if IRSND_SUPPORT_ROOMBA_PROTOCOL == 1
+ case IRMP_ROOMBA_PROTOCOL:
+#endif
#if IRSND_SUPPORT_SIRCS_PROTOCOL == 1 || IRSND_SUPPORT_NEC_PROTOCOL == 1 || IRSND_SUPPORT_NEC16_PROTOCOL == 1 || IRSND_SUPPORT_NEC42_PROTOCOL == 1 || \
IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1 || IRSND_SUPPORT_MATSUSHITA_PROTOCOL == 1 || \
diff --git a/irsndconfig.h b/irsndconfig.h
index 3d278bc..e5d07cc 100644
--- a/irsndconfig.h
+++ b/irsndconfig.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 2010-2013 Frank Meyer - frank(at)fli4l.de
*
- * $Id: irsndconfig.h,v 1.48 2013/03/12 12:49:59 fm Exp $
+ * $Id: irsndconfig.h,v 1.49 2013/04/09 14:19:11 fm Exp $
*
* ATMEGA88 @ 8 MHz
*
@@ -70,6 +70,7 @@
#define IRSND_SUPPORT_NETBOX_PROTOCOL 0 // Netbox keyboard >= 10000 DON'T CHANGE, NOT SUPPORTED YET!
#define IRSND_SUPPORT_FDC_PROTOCOL 0 // FDC IR keyboard >= 10000 (better 15000) ~150 bytes
#define IRSND_SUPPORT_RCCAR_PROTOCOL 0 // RC CAR >= 10000 (better 15000) ~150 bytes
+#define IRSND_SUPPORT_ROOMBA_PROTOCOL 0 // iRobot Roomba >= 10000 ~150 bytes
#define IRSND_SUPPORT_RUWIDO_PROTOCOL 0 // RUWIDO, T-Home >= 15000 DON'T CHANGE, NOT SUPPORTED YET!
#define IRSND_SUPPORT_A1TVBOX_PROTOCOL 0 // A1 TV BOX >= 15000 (better 20000) ~200 bytes
#define IRSND_SUPPORT_LEGO_PROTOCOL 0 // LEGO Power RC >= 20000 ~150 bytes