X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/43c535be41b070573e3fced6cce8ba290c7af060..95b27043614a5578c29432ab88bec145479bc25c:/irmp.h?ds=sidebyside diff --git a/irmp.h b/irmp.h index 232f531..eec62de 100644 --- a/irmp.h +++ b/irmp.h @@ -3,7 +3,7 @@ * * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de * - * $Id: irmp.h,v 1.96 2015/06/15 10:30:09 fm Exp $ + * $Id: irmp.h,v 1.100 2015/11/17 13:51:45 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 @@ -73,6 +73,24 @@ # 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)) + +#elif defined (TEENSY_ARM_CORTEX_M4) +# define input(x) ((uint8_t)(digitalReadFast(x))) + +#elif defined(__xtensa__) +# define IRMP_BIT IRMP_BIT_NUMBER +# define input(x) GPIO_INPUT_GET(IRMP_BIT_NUMBER) +#endif + +#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 @@ -82,11 +100,18 @@ # define IRMP_SUPPORT_RUWIDO_PROTOCOL 0 #endif +#if IRMP_SUPPORT_KASEIKYO_PROTOCOL == 1 && IRMP_SUPPORT_PANASONIC_PROTOCOL == 1 +# warning KASEIKYO protocol conflicts wih PANASONIC, please enable only one of both protocols +# warning PANASONIC protocol disabled +# undef IRMP_SUPPORT_PANASONIC_PROTOCOL +# define IRMP_SUPPORT_PANASONIC_PROTOCOL 0 +#endif + #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 +# define IRMP_SUPPORT_ACP24_PROTOCOL 0 #endif #if IRMP_SUPPORT_RC6_PROTOCOL == 1 && IRMP_SUPPORT_ROOMBA_PROTOCOL == 1 @@ -205,6 +230,11 @@ #define IRMP_FLAG_REPETITION 0x01 +#ifdef __cplusplus +extern "C" +{ +#endif + extern void irmp_init (void); extern uint_fast8_t irmp_get_data (IRMP_DATA *); extern uint_fast8_t irmp_ISR (void); @@ -217,4 +247,8 @@ extern const char * const irmp_protocol_names[IRMP_N_PROTOCOLS + 1 extern void irmp_set_callback_ptr (void (*cb)(uint_fast8_t)); #endif // IRMP_USE_CALLBACK == 1 +#ifdef __cplusplus +} +#endif + #endif /* _IRMP_H_ */