X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/061e654cba197b09f58c6297e7d76d4527742885..aa276d72956b9c9938dd8d34529276d7f1631b93:/irmp.h diff --git a/irmp.h b/irmp.h index c7de844..fd027b9 100644 --- a/irmp.h +++ b/irmp.h @@ -1,9 +1,9 @@ /*--------------------------------------------------------------------------------------------------------------------------------------------------- * irmp.h * - * Copyright (c) 2009-2014 Frank Meyer - frank(at)fli4l.de + * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de * - * $Id: irmp.h,v 1.90 2015/01/19 10:54:37 fm Exp $ + * $Id: irmp.h,v 1.98 2015/11/10 08:39:27 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 @@ -21,7 +21,19 @@ # include "irmpconfig.h" #endif -#if defined (ATMEL_AVR) +#if defined (__AVR_XMEGA__) +# define _CONCAT(a,b) a##b +# define CONCAT(a,b) _CONCAT(a,b) +# define IRMP_PORT_PRE CONCAT(PORT, IRMP_PORT_LETTER) +# define IRMP_DDR_PRE CONCAT(PORT, IRMP_PORT_LETTER) +# define IRMP_PIN_PRE CONCAT(PORT, IRMP_PORT_LETTER) +# define IRMP_PORT IRMP_PORT_PRE.OUT +# define IRMP_DDR IRMP_DDR_PRE.DIR +# define IRMP_PIN IRMP_PIN_PRE.IN +# define IRMP_BIT IRMP_BIT_NUMBER +# define input(x) ((x) & (1 << IRMP_BIT)) + +#elif defined (ATMEL_AVR) # define _CONCAT(a,b) a##b # define CONCAT(a,b) _CONCAT(a,b) # define IRMP_PORT CONCAT(PORT, IRMP_PORT_LETTER) @@ -29,10 +41,10 @@ # define IRMP_PIN CONCAT(PIN, IRMP_PORT_LETTER) # define IRMP_BIT IRMP_BIT_NUMBER # define input(x) ((x) & (1 << IRMP_BIT)) -#elif defined (PIC_C18) -# define input(x) (x) -#elif defined (PIC_CCS) + +#elif defined (PIC_C18) || defined (PIC_CCS) # define input(x) (x) + #elif defined (ARM_STM32) # define _CONCAT(a,b) a##b # define CONCAT(a,b) _CONCAT(a,b) @@ -50,6 +62,7 @@ # ifndef USE_STDPERIPH_DRIVER # warning The STM32 port of IRMP uses the ST standard peripheral drivers which are not enabled in your build configuration. # endif + #elif defined (STELLARIS_ARM_CORTEX_M4) # define _CONCAT(a,b) a##b # define CONCAT(a,b) _CONCAT(a,b) @@ -59,36 +72,33 @@ # define IRMP_PIN IRMP_PORT_PIN # define input(x) ((uint8_t)(ROM_GPIOPinRead(IRMP_PORT_BASE, IRMP_PORT_PIN))) # define sei() IntMasterEnable() + +#elif defined(__SDCC_stm8) +# define _CONCAT(a,b) a##b +# define CONCAT(a,b) _CONCAT(a,b) +# define IRMP_GPIO_STRUCT CONCAT(GPIO, IRMP_PORT_LETTER) +# define IRMP_BIT IRMP_BIT_NUMBER +# define input(x) ((x) & (1 << IRMP_BIT)) + #endif -#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && (IRMP_SUPPORT_RUWIDO_PROTOCOL == 1 || IRMP_SUPPORT_SIEMENS_PROTOCOL == 1) -# warning DENON protocol conflicts wih RUWIDO/SIEMENS, please enable only one of both protocols -# warning RUWIDO protocol disabled -# warning SIEMENS protocol disabled -# warning DENON protocol stays enabled -# undef IRMP_SUPPORT_RUWIDO_PROTOCOL -# define IRMP_SUPPORT_RUWIDO_PROTOCOL 0 -# undef IRMP_SUPPORT_SIEMENS_PROTOCOL -# define IRMP_SUPPORT_SIEMENS_PROTOCOL 0 +#if IRMP_SUPPORT_TECHNICS_PROTOCOL == 1 +# undef IRMP_SUPPORT_MATSUSHITA_PROTOCOL +# define IRMP_SUPPORT_MATSUSHITA_PROTOCOL 1 #endif -#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && (IRMP_SUPPORT_RUWIDO_PROTOCOL == 1 || IRMP_SUPPORT_SIEMENS_PROTOCOL == 1) -# warning MERLIN protocol conflicts wih RUWIDO/SIEMENS, please enable only one of both protocols +#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && IRMP_SUPPORT_RUWIDO_PROTOCOL == 1 +# warning DENON protocol conflicts wih RUWIDO, please enable only one of both protocols # warning RUWIDO protocol disabled -# warning SIEMENS protocol disabled -# warning MERLIN protocol stays enabled # undef IRMP_SUPPORT_RUWIDO_PROTOCOL # define IRMP_SUPPORT_RUWIDO_PROTOCOL 0 -# undef IRMP_SUPPORT_SIEMENS_PROTOCOL -# define IRMP_SUPPORT_SIEMENS_PROTOCOL 0 #endif -#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && IRMP_SUPPORT_A1TVBOX_PROTOCOL == 1 -# warning MERLIN protocol conflicts wih A1TVBOX, please enable only one of both protocols -# warning A1TVBOX protocol disabled -# warning MERLIN protocol stays enabled -# undef IRMP_SUPPORT_A1TVBOX_PROTOCOL -# define IRMP_SUPPORT_A1TVBOX_PROTOCOL 0 +#if IRMP_SUPPORT_DENON_PROTOCOL == 1 && IRMP_SUPPORT_ACP24_PROTOCOL == 1 +# warning DENON protocol conflicts wih ACP24, please enable only one of both protocols +# warning ACP24 protocol disabled +# undef IRMP_SUPPORT_ACP24_PROTOCOL +# define IRMP_SUPPORT_ACP24_PROTOCOL 0 #endif #if IRMP_SUPPORT_RC6_PROTOCOL == 1 && IRMP_SUPPORT_ROOMBA_PROTOCOL == 1 @@ -105,6 +115,20 @@ # define IRMP_SUPPORT_ORTEK_PROTOCOL 0 #endif +#if IRMP_SUPPORT_RC5_PROTOCOL == 1 && IRMP_SUPPORT_S100_PROTOCOL == 1 +# warning RC5 protocol conflicts wih S100, please enable only one of both protocols +# warning S100 protocol disabled +# undef IRMP_SUPPORT_S100_PROTOCOL +# define IRMP_SUPPORT_S100_PROTOCOL 0 +#endif + +#if IRMP_SUPPORT_NUBERT_PROTOCOL == 1 && IRMP_SUPPORT_FAN_PROTOCOL == 1 +# warning NUBERT protocol conflicts wih FAN, please enable only one of both protocols +# warning FAN protocol disabled +# undef IRMP_SUPPORT_FAN_PROTOCOL +# define IRMP_SUPPORT_FAN_PROTOCOL 0 +#endif + #if IRMP_SUPPORT_FDC_PROTOCOL == 1 && IRMP_SUPPORT_ORTEK_PROTOCOL == 1 # warning FDC protocol conflicts wih ORTEK, please enable only one of both protocols # warning ORTEK protocol disabled @@ -195,7 +219,6 @@ extern void irmp_init (void); extern uint_fast8_t irmp_get_data (IRMP_DATA *); -extern uint_fast8_t irmp_is_busy (void); extern uint_fast8_t irmp_ISR (void); #if IRMP_PROTOCOL_NAMES == 1