Lines Matching refs:header
79 void modbus_raw_put_header(const struct modbus_adu *adu, uint8_t *header) in modbus_raw_put_header() argument
83 sys_put_be16(adu->trans_id, &header[0]); in modbus_raw_put_header()
84 sys_put_be16(adu->proto_id, &header[2]); in modbus_raw_put_header()
85 sys_put_be16(length + MODBUS_ADU_LENGTH_DEVIATION, &header[4]); in modbus_raw_put_header()
86 header[6] = adu->unit_id; in modbus_raw_put_header()
87 header[7] = adu->fc; in modbus_raw_put_header()
90 void modbus_raw_get_header(struct modbus_adu *adu, const uint8_t *header) in modbus_raw_get_header() argument
92 adu->trans_id = sys_get_be16(&header[0]); in modbus_raw_get_header()
93 adu->proto_id = sys_get_be16(&header[2]); in modbus_raw_get_header()
94 adu->length = MIN(sys_get_be16(&header[4]), CONFIG_MODBUS_BUFFER_SIZE); in modbus_raw_get_header()
95 adu->unit_id = header[6]; in modbus_raw_get_header()
96 adu->fc = header[7]; in modbus_raw_get_header()