Skip to content

LPC55S69: fix serial_set_flow_control #11775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,10 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi

case FlowControlCTS:
/* Do not use RTS, configure pin to GPIO input */
gpio_init(&gpio, rxflow);
gpio_dir(&gpio, PIN_INPUT);
if (rxflow != NC) {
gpio_init(&gpio, rxflow);
gpio_dir(&gpio, PIN_INPUT);
}

pinmap_pinout(txflow, PinMap_UART_CTS);
uart_addrs[obj->index]->CFG |= USART_CFG_CTSEN_MASK;
Expand All @@ -413,8 +415,10 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi

case FlowControlNone:
/* Do not use RTS, configure pin to GPIO input */
gpio_init(&gpio, rxflow);
gpio_dir(&gpio, PIN_INPUT);
if (rxflow != NC) {
gpio_init(&gpio, rxflow);
gpio_dir(&gpio, PIN_INPUT);
}

uart_addrs[obj->index]->CFG &= ~USART_CFG_CTSEN_MASK;
break;
Expand Down