]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmp.c
libopencm3: Set PWM duty cycle to 33%. Improve timer handling.
[irmp.git] / irmp.c
diff --git a/irmp.c b/irmp.c
index 150d69fef863829b18a7eb780aa87a9035c38417..c37449cd8564a9e93d52083e5c24888fc29876d8 100644 (file)
--- a/irmp.c
+++ b/irmp.c
@@ -2189,6 +2189,13 @@ irmp_init (void)
 #  endif\r
     GPIO_Init(IRMP_PORT, &GPIO_InitStructure);\r
 \r
+#elif defined (LIBOPENCM3)                                             // STM32 with libopencm3\r
+\r
+    /* GPIOx clock enable */\r
+    rcc_periph_clock_enable(IRMP_PORT_RCC);\r
+    /* GPIO Configuration */\r
+    gpio_set_mode(IRMP_PORT, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, IRMP_BIT);\r
+\r
 #elif defined(STELLARIS_ARM_CORTEX_M4)\r
     // Enable the GPIO port\r
     ROM_SysCtlPeripheralEnable(IRMP_PORT_PERIPH);\r