1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

LP-415 Added missing AF remap

This commit is contained in:
Vladimir Zidar 2016-09-28 16:26:38 +02:00
parent 282a187357
commit be03fb2020

View File

@ -95,6 +95,15 @@ extern void PIOS_Servo_Enable()
const struct pios_tim_channel *chan = &servo_cfg->channels[i]; const struct pios_tim_channel *chan = &servo_cfg->channels[i];
GPIO_Init(chan->pin.gpio, &chan->pin.init); GPIO_Init(chan->pin.gpio, &chan->pin.init);
#if defined(STM32F40_41xxx) || defined(STM32F446xx) || defined(STM32F411xE)
GPIO_PinAFConfig(chan->pin.gpio, chan->pin.pin_source, chan->remap);
#elif defined(STM32F10X_MD)
if (chan->remap) {
GPIO_PinRemapConfig(chan->remap, ENABLE);
}
#else
#error Unsupported MCU
#endif
/* Set up for output compare function */ /* Set up for output compare function */
switch (chan->timer_chan) { switch (chan->timer_chan) {