mirror of https://github.com/ARMmbed/mbed-os.git
FIX: fix a bug introduced by static pinmap
parent
88472095e6
commit
dafa66b2a3
|
@ -424,8 +424,10 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
|
||||||
|
|
||||||
case FlowControlCTS:
|
case FlowControlCTS:
|
||||||
/* Do not use RTS, configure pin to GPIO input */
|
/* Do not use RTS, configure pin to GPIO input */
|
||||||
|
if (pinmap->rx_flow_pin != NC) {
|
||||||
gpio_init(&gpio, pinmap->rx_flow_pin);
|
gpio_init(&gpio, pinmap->rx_flow_pin);
|
||||||
gpio_dir(&gpio, PIN_INPUT);
|
gpio_dir(&gpio, PIN_INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
pin_function(pinmap->tx_flow_pin, pinmap->tx_flow_function);
|
pin_function(pinmap->tx_flow_pin, pinmap->tx_flow_function);
|
||||||
pin_mode(pinmap->tx_flow_pin, PullNone);
|
pin_mode(pinmap->tx_flow_pin, PullNone);
|
||||||
|
@ -442,8 +444,10 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
|
||||||
|
|
||||||
case FlowControlNone:
|
case FlowControlNone:
|
||||||
/* Do not use RTS, configure pin to GPIO input */
|
/* Do not use RTS, configure pin to GPIO input */
|
||||||
|
if (pinmap->rx_flow_pin != NC) {
|
||||||
gpio_init(&gpio, pinmap->rx_flow_pin);
|
gpio_init(&gpio, pinmap->rx_flow_pin);
|
||||||
gpio_dir(&gpio, PIN_INPUT);
|
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