- stm_moder_set(LED_PORT, bit, STM_MODER_OUTPUT);
- stm_otyper_set(LED_PORT, bit, STM_OTYPER_PUSH_PULL);
+#ifdef LED_PORT
+ init_led_pin(LED_PORT, bit);
+#else
+#ifdef LED_PORT_0
+ if (LED_PORT_0_MASK & (1 << bit))
+ init_led_pin(LED_PORT_0, bit + LED_PORT_0_SHIFT);
+#endif
+#ifdef LED_PORT_1
+ if (LED_PORT_1_MASK & (1 << bit))
+ init_led_pin(LED_PORT_1, bit + LED_PORT_1_SHIFT);
+#endif
+#endif