mirror of https://github.com/ARMmbed/mbed-os.git
LPC55S69: fix serial_set_flow_control
parent
419556b84a
commit
96a1c1ae8f
|
@ -398,8 +398,10 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
||||||
|
|
||||||
case FlowControlCTS:
|
case FlowControlCTS:
|
||||||
/* Do not use RTS, configure pin to GPIO input */
|
/* Do not use RTS, configure pin to GPIO input */
|
||||||
gpio_init(&gpio, rxflow);
|
if (rxflow != NC) {
|
||||||
gpio_dir(&gpio, PIN_INPUT);
|
gpio_init(&gpio, rxflow);
|
||||||
|
gpio_dir(&gpio, PIN_INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
pinmap_pinout(txflow, PinMap_UART_CTS);
|
pinmap_pinout(txflow, PinMap_UART_CTS);
|
||||||
uart_addrs[obj->index]->CFG |= USART_CFG_CTSEN_MASK;
|
uart_addrs[obj->index]->CFG |= USART_CFG_CTSEN_MASK;
|
||||||
|
@ -413,8 +415,10 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
||||||
|
|
||||||
case FlowControlNone:
|
case FlowControlNone:
|
||||||
/* Do not use RTS, configure pin to GPIO input */
|
/* Do not use RTS, configure pin to GPIO input */
|
||||||
gpio_init(&gpio, rxflow);
|
if (rxflow != NC) {
|
||||||
gpio_dir(&gpio, PIN_INPUT);
|
gpio_init(&gpio, rxflow);
|
||||||
|
gpio_dir(&gpio, PIN_INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
uart_addrs[obj->index]->CFG &= ~USART_CFG_CTSEN_MASK;
|
uart_addrs[obj->index]->CFG &= ~USART_CFG_CTSEN_MASK;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue