/*---------------------------------------------------------------------------------------------------------------------------------------------------\r
* irmp.h\r
*\r
- * Copyright (c) 2009-2014 Frank Meyer - frank(at)fli4l.de\r
+ * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de\r
*\r
- * $Id: irmp.h,v 1.90 2015/01/19 10:54:37 fm Exp $\r
+ * $Id: irmp.h,v 1.93 2015/02/26 15:42:53 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
# include "irmpconfig.h"\r
#endif\r
\r
-#if defined (ATMEL_AVR)\r
+#if defined (__AVR_XMEGA__)\r
+# define _CONCAT(a,b) a##b\r
+# define CONCAT(a,b) _CONCAT(a,b)\r
+# define IRMP_PORT_PRE CONCAT(PORT, IRMP_PORT_LETTER)\r
+# define IRMP_DDR_PRE CONCAT(DDR, IRMP_PORT_LETTER)\r
+# define IRMP_PIN_PRE CONCAT(PIN, IRMP_PORT_LETTER)\r
+# define IRMP_PORT IRMP_PORT_PRE.OUT\r
+# define IRMP_DDR IRMP_DDR_PRE.DIR\r
+# define IRMP_PIN IRMP_PIN_PRE.IN\r
+# define IRMP_BIT IRMP_BIT_NUMBER\r
+# define input(x) ((x) & (1 << IRMP_BIT))\r
+\r
+#elif defined (ATMEL_AVR)\r
# define _CONCAT(a,b) a##b\r
# define CONCAT(a,b) _CONCAT(a,b)\r
# define IRMP_PORT CONCAT(PORT, IRMP_PORT_LETTER)\r
# define IRMP_PIN CONCAT(PIN, IRMP_PORT_LETTER)\r
# define IRMP_BIT IRMP_BIT_NUMBER\r
# define input(x) ((x) & (1 << IRMP_BIT))\r
-#elif defined (PIC_C18)\r
-# define input(x) (x)\r
-#elif defined (PIC_CCS)\r
+\r
+#elif defined (PIC_C18) || defined (PIC_CCS)\r
# define input(x) (x)\r
+\r
#elif defined (ARM_STM32)\r
# define _CONCAT(a,b) a##b\r
# define CONCAT(a,b) _CONCAT(a,b)\r
# ifndef USE_STDPERIPH_DRIVER\r
# warning The STM32 port of IRMP uses the ST standard peripheral drivers which are not enabled in your build configuration.\r
# endif\r
+\r
#elif defined (STELLARIS_ARM_CORTEX_M4)\r
# define _CONCAT(a,b) a##b\r
# define CONCAT(a,b) _CONCAT(a,b)\r
# define IRMP_PIN IRMP_PORT_PIN\r
# define input(x) ((uint8_t)(ROM_GPIOPinRead(IRMP_PORT_BASE, IRMP_PORT_PIN)))\r
# define sei() IntMasterEnable()\r
-#endif\r
\r
-#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && (IRMP_SUPPORT_RUWIDO_PROTOCOL == 1 || IRMP_SUPPORT_SIEMENS_PROTOCOL == 1)\r
-# warning DENON protocol conflicts wih RUWIDO/SIEMENS, please enable only one of both protocols\r
-# warning RUWIDO protocol disabled\r
-# warning SIEMENS protocol disabled\r
-# warning DENON protocol stays enabled\r
-# undef IRMP_SUPPORT_RUWIDO_PROTOCOL\r
-# define IRMP_SUPPORT_RUWIDO_PROTOCOL 0\r
-# undef IRMP_SUPPORT_SIEMENS_PROTOCOL\r
-# define IRMP_SUPPORT_SIEMENS_PROTOCOL 0\r
#endif\r
\r
-#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && (IRMP_SUPPORT_RUWIDO_PROTOCOL == 1 || IRMP_SUPPORT_SIEMENS_PROTOCOL == 1)\r
-# warning MERLIN protocol conflicts wih RUWIDO/SIEMENS, please enable only one of both protocols\r
+#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && IRMP_SUPPORT_RUWIDO_PROTOCOL == 1\r
+# warning DENON protocol conflicts wih RUWIDO, please enable only one of both protocols\r
# warning RUWIDO protocol disabled\r
-# warning SIEMENS protocol disabled\r
-# warning MERLIN protocol stays enabled\r
# undef IRMP_SUPPORT_RUWIDO_PROTOCOL\r
# define IRMP_SUPPORT_RUWIDO_PROTOCOL 0\r
-# undef IRMP_SUPPORT_SIEMENS_PROTOCOL\r
-# define IRMP_SUPPORT_SIEMENS_PROTOCOL 0\r
-#endif\r
-\r
-#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && IRMP_SUPPORT_A1TVBOX_PROTOCOL == 1\r
-# warning MERLIN protocol conflicts wih A1TVBOX, please enable only one of both protocols\r
-# warning A1TVBOX protocol disabled\r
-# warning MERLIN protocol stays enabled\r
-# undef IRMP_SUPPORT_A1TVBOX_PROTOCOL\r
-# define IRMP_SUPPORT_A1TVBOX_PROTOCOL 0\r
#endif\r
\r
#if IRMP_SUPPORT_RC6_PROTOCOL == 1 && IRMP_SUPPORT_ROOMBA_PROTOCOL == 1\r
\r
extern void irmp_init (void);\r
extern uint_fast8_t irmp_get_data (IRMP_DATA *);\r
-extern uint_fast8_t irmp_is_busy (void);\r
extern uint_fast8_t irmp_ISR (void);\r
\r
#if IRMP_PROTOCOL_NAMES == 1\r