]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmp.h
Merge branch 'libopencm3' of cu.loc:git/irmp into libopencm3
[irmp.git] / irmp.h
diff --git a/irmp.h b/irmp.h
index 53e16c7c434a4f463bde239ae230574934949d35..c0b3c18cc1c23e22b4fac7ba49f9b203ef465169 100644 (file)
--- a/irmp.h
+++ b/irmp.h
 #    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 (ARM_OPENCM3)\r
+#elif defined (LIBOPENCM3)\r
 #  define _CONCAT(a,b)                          a##b\r
 #  define CONCAT(a,b)                           _CONCAT(a,b)\r
 #  define IRMP_PORT                             CONCAT(GPIO, IRMP_PORT_LETTER)\r
-#  define IRMP_PORT_RCC                        CONCAT(RCC_GPIO, IRMP_PORT_LETTER)\r
+#  define IRMP_PORT_RCC                         CONCAT(RCC_GPIO, IRMP_PORT_LETTER)\r
 \r
-#  define IRMP_BIT                              IRMP_BIT_NUMBER\r
+#  define IRMP_BIT                              CONCAT(GPIO, IRMP_BIT_NUMBER)\r
 #  define IRMP_PIN                              IRMP_PORT   // for use with input(x) below\r
-#  define input(x)                              ((GPIO_IDR(IRMP_PORT) & (1<<IRMP_BIT)) != 0)\r
-//#  define input(x)                              (BBIO_PERIPH(IRMP_PORT+IDR, IRMP_BIT))\r
+#  define input(x)                              ((GPIO_IDR(x) & IRMP_BIT) != 0)\r
 \r
 #elif defined (STELLARIS_ARM_CORTEX_M4)\r
 #  define _CONCAT(a,b)                          a##b\r