X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/7365350cfc3f5406c68411a2eafe97dadaa08444..9004ddf5192fdd2442dc2cbb0158f042c981702e:/irmp.h?ds=sidebyside diff --git a/irmp.h b/irmp.h index ded7e80..c0b3c18 100644 --- a/irmp.h +++ b/irmp.h @@ -63,6 +63,16 @@ # warning The STM32 port of IRMP uses the ST standard peripheral drivers which are not enabled in your build configuration. # endif +#elif defined (LIBOPENCM3) +# define _CONCAT(a,b) a##b +# define CONCAT(a,b) _CONCAT(a,b) +# define IRMP_PORT CONCAT(GPIO, IRMP_PORT_LETTER) +# define IRMP_PORT_RCC CONCAT(RCC_GPIO, IRMP_PORT_LETTER) + +# define IRMP_BIT CONCAT(GPIO, IRMP_BIT_NUMBER) +# define IRMP_PIN IRMP_PORT // for use with input(x) below +# define input(x) ((GPIO_IDR(x) & IRMP_BIT) != 0) + #elif defined (STELLARIS_ARM_CORTEX_M4) # define _CONCAT(a,b) a##b # define CONCAT(a,b) _CONCAT(a,b)