1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Fix board wedging if motor DMA is undefined for Dshot.

This commit is contained in:
mikeller 2019-08-11 21:16:16 +12:00
parent b310f9b348
commit a77f658b22
5 changed files with 35 additions and 25 deletions

View file

@ -205,7 +205,7 @@ static void motor_DMA_IRQHandler(dmaChannelDescriptor_t *descriptor)
}
}
void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, motorPwmProtocolTypes_e pwmProtocolType, uint8_t output)
bool pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, motorPwmProtocolTypes_e pwmProtocolType, uint8_t output)
{
#ifdef USE_DSHOT_TELEMETRY
#define OCINIT motor->ocInitStruct
@ -247,7 +247,7 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
#endif
if (dmaRef == NULL) {
return;
return false;
}
motorDmaOutput_t * const motor = &dmaMotors[motorIndex];
@ -423,6 +423,8 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
}
#endif
motor->configured = true;
return true;
}
#endif