Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main/drivers/pwm_mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ static bool checkPwmTimerConflicts(const timerHardware_t *timHw)
{
serialPortPins_t uartPins;

#if defined(USE_UART1)
// MSP is UART1's default next to the VCP and has always given these pins up to the outputs
const serialPortConfig_t *uart1Config = serialFindPortConfiguration(SERIAL_PORT_USART1);
uartGetPortPins(UARTDEV_1, &uartPins);
if (uart1Config && (uart1Config->functionMask & ~FUNCTION_MSP) && (timHw->tag == uartPins.txPin || timHw->tag == uartPins.rxPin)) {
return true;
}
#endif

#if defined(USE_UART2)
uartGetPortPins(UARTDEV_2, &uartPins);
if (doesConfigurationUsePort(SERIAL_PORT_USART2) && (timHw->tag == uartPins.txPin || timHw->tag == uartPins.rxPin)) {
Expand Down
Loading