/* Build the header of a MODBUS message using the function and the slave ID. */
int32_t modbus_build_header(struct modbus_slave *dev, uint8_t function, uint8_t *rsp)
/* Build the header of a MODBUS message using the function and the slave ID. */
int32_t modbus_build_header(struct modbus_slave *dev, uint8_t function, uint8_t *rsp)
{
	rsp[0] = dev->slave_id;
	rsp[1] = function;
	return MODBUS_HEADER_LENGTH;
}