Lines Matching refs:uart_buf_ctr
108 rx_size = cfg->uart_buf_ctr; in modbus_ascii_rx_adu()
162 (cfg->uart_buf_ctr - 5) / 2); in modbus_ascii_rx_adu()
224 cfg->uart_buf_ctr = tx_bytes; in modbus_ascii_tx_adu()
251 if ((cfg->uart_buf_ctr < MODBUS_RTU_MIN_MSG_SIZE) || in modbus_rtu_rx_adu()
252 (cfg->uart_buf_ctr > CONFIG_MODBUS_BUFFER_SIZE)) { in modbus_rtu_rx_adu()
261 ctx->rx_adu.length = cfg->uart_buf_ctr - 4; in modbus_rtu_rx_adu()
263 crc_idx = cfg->uart_buf_ctr - sizeof(uint16_t); in modbus_rtu_rx_adu()
270 cfg->uart_buf_ctr - sizeof(ctx->rx_adu.crc)); in modbus_rtu_rx_adu()
298 cfg->uart_buf_ctr = tx_bytes; in rtu_tx_adu()
301 LOG_HEXDUMP_DBG(cfg->uart_buf, cfg->uart_buf_ctr, "uart_buf"); in rtu_tx_adu()
327 cfg->uart_buf_ctr = 0; in cb_handler_rx()
330 if (cfg->uart_buf_ctr < CONFIG_MODBUS_BUFFER_SIZE) { in cb_handler_rx()
332 cfg->uart_buf_ctr++; in cb_handler_rx()
342 if (cfg->uart_buf_ctr == CONFIG_MODBUS_BUFFER_SIZE) { in cb_handler_rx()
354 cfg->uart_buf_ctr)); in cb_handler_rx()
357 cfg->uart_buf_ctr += n; in cb_handler_rx()
366 if (cfg->uart_buf_ctr > 0) { in cb_handler_tx()
368 cfg->uart_buf_ctr); in cb_handler_tx()
369 cfg->uart_buf_ctr -= n; in cb_handler_tx()
533 cfg->uart_buf_ctr = 0; in modbus_serial_rx_adu()
595 cfg->uart_buf_ctr = 0; in modbus_serial_init()