Lines Matching refs:rs485
36 struct serial_rs485 *rs485) in lpc18xx_rs485_config() argument
43 if (rs485->flags & SER_RS485_ENABLED) in lpc18xx_rs485_config()
44 memset(rs485->padding, 0, sizeof(rs485->padding)); in lpc18xx_rs485_config()
46 memset(rs485, 0, sizeof(*rs485)); in lpc18xx_rs485_config()
48 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | in lpc18xx_rs485_config()
51 if (rs485->flags & SER_RS485_ENABLED) { in lpc18xx_rs485_config()
55 if (rs485->flags & SER_RS485_RTS_ON_SEND) { in lpc18xx_rs485_config()
57 rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; in lpc18xx_rs485_config()
59 rs485->flags |= SER_RS485_RTS_AFTER_SEND; in lpc18xx_rs485_config()
63 if (rs485->delay_rts_after_send) { in lpc18xx_rs485_config()
65 rs485_dly_reg = DIV_ROUND_UP(rs485->delay_rts_after_send in lpc18xx_rs485_config()
72 rs485->delay_rts_after_send = (rs485_dly_reg * MSEC_PER_SEC) in lpc18xx_rs485_config()
77 rs485->delay_rts_before_send = 0; in lpc18xx_rs485_config()
82 port->rs485 = *rs485; in lpc18xx_rs485_config()