arch/arm/src/samd2l2/sam_serial.c: Add missing RS-485 DIR pin write to sam_serial.c

This commit is contained in:
Alan Carvalho de Assis 2019-01-22 17:37:26 -06:00 committed by Gregory Nutt
parent ff00fc3a92
commit 795e880ff6

View file

@ -882,6 +882,14 @@ static bool sam_rxavailable(struct uart_dev_s *dev)
static void sam_send(struct uart_dev_s *dev, int ch)
{
struct sam_dev_s *priv = (struct sam_dev_s *)dev->priv;
#ifdef HAVE_RS485
if (priv->rs485_dir_gpio != 0)
{
sam_portwrite(priv->rs485_dir_gpio, priv->rs485_dir_polarity);
}
#endif
sam_serialout16(priv, SAM_USART_DATA_OFFSET, (uint16_t)ch);
}