Lines Matching refs:uart_buf
121 if ((cfg->uart_buf[0] != MODBUS_ASCII_START_FRAME_CHAR) || in modbus_ascii_rx_adu()
122 (cfg->uart_buf[rx_size - 2] != MODBUS_ASCII_END_FRAME_CHAR1) || in modbus_ascii_rx_adu()
123 (cfg->uart_buf[rx_size - 1] != MODBUS_ASCII_END_FRAME_CHAR2)) { in modbus_ascii_rx_adu()
131 pmsg = &cfg->uart_buf[1]; in modbus_ascii_rx_adu()
161 calc_lrc = modbus_ascii_get_lrc(&cfg->uart_buf[1], in modbus_ascii_rx_adu()
193 cfg->uart_buf[0] = MODBUS_ASCII_START_FRAME_CHAR; in modbus_ascii_tx_adu()
196 pbuf = &cfg->uart_buf[1]; in modbus_ascii_tx_adu()
215 lrc = modbus_ascii_get_lrc(&cfg->uart_buf[1], (tx_bytes - 1) / 2); in modbus_ascii_tx_adu()
225 cfg->uart_buf_ptr = &cfg->uart_buf[0]; in modbus_ascii_tx_adu()
257 ctx->rx_adu.unit_id = cfg->uart_buf[0]; in modbus_rtu_rx_adu()
258 ctx->rx_adu.fc = cfg->uart_buf[1]; in modbus_rtu_rx_adu()
259 data_ptr = &cfg->uart_buf[2]; in modbus_rtu_rx_adu()
267 ctx->rx_adu.crc = sys_get_le16(&cfg->uart_buf[crc_idx]); in modbus_rtu_rx_adu()
269 calc_crc = crc16_ansi(&cfg->uart_buf[0], in modbus_rtu_rx_adu()
286 cfg->uart_buf[0] = ctx->tx_adu.unit_id; in rtu_tx_adu()
287 cfg->uart_buf[1] = ctx->tx_adu.fc; in rtu_tx_adu()
289 data_ptr = &cfg->uart_buf[2]; in rtu_tx_adu()
293 ctx->tx_adu.crc = crc16_ansi(&cfg->uart_buf[0], ctx->tx_adu.length + 2); in rtu_tx_adu()
295 &cfg->uart_buf[ctx->tx_adu.length + 2]); in rtu_tx_adu()
299 cfg->uart_buf_ptr = &cfg->uart_buf[0]; in rtu_tx_adu()
301 LOG_HEXDUMP_DBG(cfg->uart_buf, cfg->uart_buf_ctr, "uart_buf"); in rtu_tx_adu()
326 cfg->uart_buf_ptr = &cfg->uart_buf[0]; in cb_handler_rx()
380 cfg->uart_buf_ptr = &cfg->uart_buf[0]; in cb_handler_tx()
534 cfg->uart_buf_ptr = &cfg->uart_buf[0]; in modbus_serial_rx_adu()
596 cfg->uart_buf_ptr = &cfg->uart_buf[0]; in modbus_serial_init()