* ATmega164, ATmega324, ATmega644, ATmega644P, ATmega1284, ATmega1284P\r
* ATmega88, ATmega88P, ATmega168, ATmega168P, ATmega328P\r
*\r
- * $Id: irsnd.c,v 1.84 2015/02/26 15:42:53 fm Exp $\r
+ * $Id: irsnd.c,v 1.85 2015/04/23 12:46:13 fm Exp $\r
*\r
* This program is free software; you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License as published by\r
#define ROOMBA_0_PAUSE_LEN (uint8_t)(F_INTERRUPTS * ROOMBA_0_PAUSE_TIME + 0.5)\r
#define ROOMBA_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * ROOMBA_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t!\r
\r
+#define PENTAX_START_BIT_PULSE_LEN (uint8_t)(F_INTERRUPTS * PENTAX_START_BIT_PULSE_TIME + 0.5)\r
+#define PENTAX_START_BIT_PAUSE_LEN (uint8_t)(F_INTERRUPTS * PENTAX_START_BIT_PAUSE_TIME + 0.5)\r
+#define PENTAX_REPEAT_START_BIT_PAUSE_LEN (uint8_t)(F_INTERRUPTS * PENTAX_REPEAT_START_BIT_PAUSE_TIME + 0.5)\r
+#define PENTAX_PULSE_LEN (uint8_t)(F_INTERRUPTS * PENTAX_PULSE_TIME + 0.5)\r
+#define PENTAX_1_PAUSE_LEN (uint8_t)(F_INTERRUPTS * PENTAX_1_PAUSE_TIME + 0.5)\r
+#define PENTAX_0_PAUSE_LEN (uint8_t)(F_INTERRUPTS * PENTAX_0_PAUSE_TIME + 0.5)\r
+#define PENTAX_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * PENTAX_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t!\r
+\r
static volatile uint8_t irsnd_busy = 0;\r
static volatile uint8_t irsnd_protocol = 0;\r
static volatile uint8_t irsnd_buffer[6] = {0};\r
#if IRSND_SUPPORT_ROOMBA_PROTOCOL == 1\r
case IRMP_ROOMBA_PROTOCOL:\r
{\r
-\r
irsnd_buffer[0] = (irmp_data_p->command & 0x7F) << 1; // CCCCCCC.\r
irsnd_busy = TRUE;\r
break;\r
}\r
#endif\r
+#if IRSND_SUPPORT_PENTAX_PROTOCOL == 1\r
+ case IRMP_PENTAX_PROTOCOL:\r
+ {\r
+ irsnd_buffer[0] = (irmp_data_p->command & 0x3F) << 2; // CCCCCC..\r
+ irsnd_busy = TRUE;\r
+ break;\r
+ }\r
+#endif\r
+\r
default:\r
{\r
break;\r
irsnd_set_freq (IRSND_FREQ_38_KHZ);\r
break;\r
}\r
+#endif\r
+#if IRSND_SUPPORT_PENTAX_PROTOCOL == 1\r
+ case IRMP_PENTAX_PROTOCOL:\r
+ {\r
+ startbit_pulse_len = PENTAX_START_BIT_PULSE_LEN;\r
+ startbit_pause_len = PENTAX_START_BIT_PAUSE_LEN;\r
+ complete_data_len = PENTAX_COMPLETE_DATA_LEN;\r
+ pulse_1_len = PENTAX_PULSE_LEN;\r
+ pause_1_len = PENTAX_1_PAUSE_LEN - 1;\r
+ pulse_0_len = PENTAX_PULSE_LEN;\r
+ pause_0_len = PENTAX_0_PAUSE_LEN - 1;\r
+ has_stop_bit = PENTAX_STOP_BIT;\r
+ n_auto_repetitions = 1; // 1 frame\r
+ auto_repetition_pause_len = 0;\r
+ repeat_frame_pause_len = PENTAX_FRAME_REPEAT_PAUSE_LEN;\r
+ irsnd_set_freq (IRSND_FREQ_38_KHZ);\r
+ break;\r
+ }\r
#endif\r
default:\r
{\r
#if IRSND_SUPPORT_ROOMBA_PROTOCOL == 1\r
case IRMP_ROOMBA_PROTOCOL:\r
#endif\r
+#if IRSND_SUPPORT_PENTAX_PROTOCOL == 1\r
+ case IRMP_PENTAX_PROTOCOL:\r
+#endif\r
\r
#if IRSND_SUPPORT_SIRCS_PROTOCOL == 1 || IRSND_SUPPORT_NEC_PROTOCOL == 1 || IRSND_SUPPORT_NEC16_PROTOCOL == 1 || IRSND_SUPPORT_NEC42_PROTOCOL == 1 || \\r
IRSND_SUPPORT_LGAIR_PROTOCOL == 1 || IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1 || IRSND_SUPPORT_MATSUSHITA_PROTOCOL == 1 || \\r
IRSND_SUPPORT_KASEIKYO_PROTOCOL == 1 || IRSND_SUPPORT_RECS80_PROTOCOL == 1 || IRSND_SUPPORT_RECS80EXT_PROTOCOL == 1 || IRSND_SUPPORT_DENON_PROTOCOL == 1 || \\r
IRSND_SUPPORT_NUBERT_PROTOCOL == 1 || IRSND_SUPPORT_SPEAKER_PROTOCOL == 1 || IRSND_SUPPORT_BANG_OLUFSEN_PROTOCOL == 1 || IRSND_SUPPORT_FDC_PROTOCOL == 1 || IRSND_SUPPORT_RCCAR_PROTOCOL == 1 || \\r
IRSND_SUPPORT_JVC_PROTOCOL == 1 || IRSND_SUPPORT_NIKON_PROTOCOL == 1 || IRSND_SUPPORT_LEGO_PROTOCOL == 1 || IRSND_SUPPORT_THOMSON_PROTOCOL == 1 || \\r
- IRSND_SUPPORT_ROOMBA_PROTOCOL == 1 || IRSND_SUPPORT_TELEFUNKEN_PROTOCOL == 1\r
+ IRSND_SUPPORT_ROOMBA_PROTOCOL == 1 || IRSND_SUPPORT_TELEFUNKEN_PROTOCOL == 1 || IRSND_SUPPORT_PENTAX_PROTOCOL == 1\r
{\r
#if IRSND_SUPPORT_DENON_PROTOCOL == 1\r
if (irsnd_protocol == IRMP_DENON_PROTOCOL)\r