Lines Matching refs:num_bytes

116 	uint16_t num_bytes;  in mbs_fc01_coil_read()  local
141 num_bytes = ((coil_qty - 1) / 8) + 1; in mbs_fc01_coil_read()
143 ctx->tx_adu.length = num_bytes + 1; in mbs_fc01_coil_read()
145 ctx->tx_adu.data[0] = (uint8_t)num_bytes; in mbs_fc01_coil_read()
149 memset(presp, 0, num_bytes); in mbs_fc01_coil_read()
215 uint16_t num_bytes; in mbs_fc02_di_read() local
240 num_bytes = ((di_qty - 1) / 8) + 1; in mbs_fc02_di_read()
242 ctx->tx_adu.length = num_bytes + 1; in mbs_fc02_di_read()
244 ctx->tx_adu.data[0] = (uint8_t)num_bytes; in mbs_fc02_di_read()
248 for (di_cntr = 0; di_cntr < num_bytes; di_cntr++) { in mbs_fc02_di_read()
315 uint16_t num_bytes; in mbs_fc03_hreg_read() local
333 num_bytes = (uint8_t)(reg_qty * sizeof(uint16_t)); in mbs_fc03_hreg_read()
350 if (num_bytes % sizeof(uint32_t)) { in mbs_fc03_hreg_read()
357 ctx->tx_adu.length = num_bytes + 1; in mbs_fc03_hreg_read()
359 ctx->tx_adu.data[0] = (uint8_t)num_bytes; in mbs_fc03_hreg_read()
427 uint16_t num_bytes; in mbs_fc04_inreg_read() local
445 num_bytes = (uint8_t)(reg_qty * sizeof(uint16_t)); in mbs_fc04_inreg_read()
462 if (num_bytes % sizeof(uint32_t)) { in mbs_fc04_inreg_read()
469 ctx->tx_adu.length = num_bytes + 1; in mbs_fc04_inreg_read()
471 ctx->tx_adu.data[0] = (uint8_t)num_bytes; in mbs_fc04_inreg_read()
736 uint16_t num_bytes; in mbs_fc15_coils_write() local
754 num_bytes = ctx->rx_adu.data[4]; in mbs_fc15_coils_write()
763 if (((((coil_qty - 1) / 8) + 1) != num_bytes) || in mbs_fc15_coils_write()
764 (ctx->rx_adu.length != (num_bytes + 5))) { in mbs_fc15_coils_write()
838 uint16_t num_bytes; in mbs_fc16_hregs_write() local
848 num_bytes = ctx->rx_adu.data[4]; in mbs_fc16_hregs_write()
870 if (num_bytes % sizeof(uint32_t)) { in mbs_fc16_hregs_write()
877 if ((ctx->rx_adu.length - 5) != num_bytes) { in mbs_fc16_hregs_write()
883 if ((num_bytes / reg_qty) != sizeof(uint16_t)) { in mbs_fc16_hregs_write()