arch/arm/src/samd2l2/sam_serial.c: Add missing RS-485 DIR pin write to sam_serial.c
This commit is contained in:
parent
ff00fc3a92
commit
795e880ff6
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue